From 91447b1ba90143073d1a4a8b87785f57f6da307f Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 31 May 2023 00:25:28 +0200 Subject: [PATCH] dark mode icon --- gawa/start/templates/start/base.html | 35 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/gawa/start/templates/start/base.html b/gawa/start/templates/start/base.html index e7bcd47..284ba0a 100644 --- a/gawa/start/templates/start/base.html +++ b/gawa/start/templates/start/base.html @@ -2,17 +2,18 @@ {% load helper_tags %} {% load static %} - +{% get_current_language as LANGUAGE_CODE %} + {% block title %}{% endblock title %} + @@ -46,7 +47,6 @@ {% block MainSearchFormSpace %} @@ -147,7 +169,7 @@ -
+
© 2023 Christoph J. Scherr
cscherr.de @@ -160,14 +182,17 @@ const storedTheme = localStorage.getItem('theme'); if (storedTheme == null) { localStorage.setItem("theme", "dark"); + document.getElementById("toggleThemeIcon").className = "bi bi-sun"; setTheme("dark"); } else if (storedTheme == "dark") { localStorage.setItem("theme", "light"); + document.getElementById("toggleThemeIcon").className = "bi bi-sun-fill"; setTheme("light"); } else if (storedTheme == "light") { localStorage.setItem("theme", "dark"); + document.getElementById("toggleThemeIcon").className = "bi bi-sun"; setTheme("dark"); } };