From bdf9e3ea5034022d3c4ac9e588e5e6a07d2588ae Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:37:16 +0200 Subject: Different theme icons for dark/light, minor colour changes --- dst/scripts/darktheme.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dst/scripts') diff --git a/dst/scripts/darktheme.js b/dst/scripts/darktheme.js index 66a3194..b44db9a 100644 --- a/dst/scripts/darktheme.js +++ b/dst/scripts/darktheme.js @@ -1,3 +1,4 @@ +const themeButton = document.getElementById('darkmodetoggle'); const theme = localStorage.getItem("theme"); var isDark = false; @@ -11,9 +12,11 @@ if (theme) { function setTheme(dark) { if (dark) { document.body.classList.add("dark-mode"); + themeButton.className = "fa fa-sun-o"; localStorage.setItem("theme", "dark"); } else { document.body.classList.remove("dark-mode"); + themeButton.className = "fa fa-moon-o"; localStorage.setItem("theme", "light"); } isDark = dark; -- cgit v1.2.3-70-g09d2