From fbad8c64b2186c803ffe4dbcd6b6cd522f1aa089 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 20 Jan 2026 16:56:49 -0600 Subject: [PATCH] dark mode --- assets/css/app.css | 2 +- lib/towerops_web/components/layouts.ex | 66 ++++++++++++------- .../components/layouts/root.html.heex | 43 ++++++++---- 3 files changed, 74 insertions(+), 37 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 4221b944..30425cfb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -96,7 +96,7 @@ @custom-variant phx-submit-loading (.phx-submit-loading&, .phx-submit-loading &); @custom-variant phx-change-loading (.phx-change-loading&, .phx-change-loading &); -/* Use the data attribute for dark mode */ +/* Use the data attribute for dark mode */ @custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *)); /* Make LiveView wrapper divs transparent for layout */ diff --git a/lib/towerops_web/components/layouts.ex b/lib/towerops_web/components/layouts.ex index f70f212c..0e957993 100644 --- a/lib/towerops_web/components/layouts.ex +++ b/lib/towerops_web/components/layouts.ex @@ -175,7 +175,8 @@ defmodule ToweropsWeb.Layouts do -
+
+ <.theme_toggle /> - - - +
+ + + +
+
""" end @@ -411,7 +430,8 @@ defmodule ToweropsWeb.Layouts do -
+
+ <.theme_toggle /> <.link navigate={~p"/orgs"} class="text-sm text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100" diff --git a/lib/towerops_web/components/layouts/root.html.heex b/lib/towerops_web/components/layouts/root.html.heex index 677969e5..dea4e23e 100644 --- a/lib/towerops_web/components/layouts/root.html.heex +++ b/lib/towerops_web/components/layouts/root.html.heex @@ -12,20 +12,37 @@