From ed9616035b573b374a9b4d5c10277c9cecbc4de3 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 21 Jul 2025 16:01:38 +0200 Subject: [PATCH] feat (theme-toggle): replaced theme toggle with the one from daisy UI --- lib/mv_web/components/layouts.ex | 34 ------------------------- lib/mv_web/components/layouts/navbar.ex | 34 ++++++++++++++++++++++--- mix.exs | 4 +-- mix.lock | 12 ++++----- 4 files changed, 38 insertions(+), 46 deletions(-) diff --git a/lib/mv_web/components/layouts.ex b/lib/mv_web/components/layouts.ex index b109b25..1495bb1 100644 --- a/lib/mv_web/components/layouts.ex +++ b/lib/mv_web/components/layouts.ex @@ -86,38 +86,4 @@ defmodule MvWeb.Layouts do """ end - - @doc """ - Provides dark vs light theme toggle based on themes defined in app.css. - - See in root.html.heex which applies the theme before page load. - """ - def theme_toggle(assigns) do - ~H""" -
-
- - - - - - -
- """ - end end diff --git a/lib/mv_web/components/layouts/navbar.ex b/lib/mv_web/components/layouts/navbar.ex index ca87d98..b917ddc 100644 --- a/lib/mv_web/components/layouts/navbar.ex +++ b/lib/mv_web/components/layouts/navbar.ex @@ -4,7 +4,6 @@ defmodule MvWeb.Layouts.Navbar do """ use Phoenix.Component use Gettext, backend: MvWeb.Gettext - import MvWeb.Layouts def navbar(assigns) do ~H""" @@ -24,7 +23,37 @@ defmodule MvWeb.Layouts.Navbar do - <.theme_toggle /> + +