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/.files | 2 +- dst/scripts/darktheme.js | 3 +++ dst/sitemap.xml | 8 ++++---- dst/styles/style.css | 4 ++-- src/scripts/darktheme.js | 3 +++ src/styles/style.css | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dst/.files b/dst/.files index db883e9..a425f16 100644 --- a/dst/.files +++ b/dst/.files @@ -1 +1 @@ -./scripts/darktheme.js +./styles/style.css 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; diff --git a/dst/sitemap.xml b/dst/sitemap.xml index d9cdd6e..5c9e7c9 100644 --- a/dst/sitemap.xml +++ b/dst/sitemap.xml @@ -4,8 +4,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> -https://adast.xyz/game.html2022-08-281.0 -https://adast.xyz/index.html2022-08-281.0 -https://adast.xyz/ase.html2022-08-281.0 -https://adast.xyz/spo.html2022-08-281.0 +https://adast.xyz/game.html2022-08-301.0 +https://adast.xyz/index.html2022-08-301.0 +https://adast.xyz/ase.html2022-08-301.0 +https://adast.xyz/spo.html2022-08-301.0 diff --git a/dst/styles/style.css b/dst/styles/style.css index 0cee77a..e0bac34 100644 --- a/dst/styles/style.css +++ b/dst/styles/style.css @@ -11,13 +11,13 @@ .dark-mode { --bg: #282c34; - --fg: #a6adba; + --fg: #c8ceda; --link: #56b6c2; --code: #363a45; --footer: #828997; --home-link: #e06c75; --quote-border: #c678dd; - --theme-toggle: #5d8ffc; + --theme-toggle: #f9e2af; } body { diff --git a/src/scripts/darktheme.js b/src/scripts/darktheme.js index 66a3194..b44db9a 100644 --- a/src/scripts/darktheme.js +++ b/src/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; diff --git a/src/styles/style.css b/src/styles/style.css index 0cee77a..e0bac34 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -11,13 +11,13 @@ .dark-mode { --bg: #282c34; - --fg: #a6adba; + --fg: #c8ceda; --link: #56b6c2; --code: #363a45; --footer: #828997; --home-link: #e06c75; --quote-border: #c678dd; - --theme-toggle: #5d8ffc; + --theme-toggle: #f9e2af; } body { -- cgit v1.2.3-70-g09d2