aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoradam <56338480+adastx@users.noreply.github.com>2022-08-30 18:37:16 +0200
committeradam <56338480+adastx@users.noreply.github.com>2022-08-30 18:37:16 +0200
commitbdf9e3ea5034022d3c4ac9e588e5e6a07d2588ae (patch)
treee7f212e4148c626defd524ba3df1541218def699 /src
parent7c366e26ffcb31e04b8d64a8ceb2849da4faecf9 (diff)
Different theme icons for dark/light, minor colour changes
Diffstat (limited to 'src')
-rw-r--r--src/scripts/darktheme.js3
-rw-r--r--src/styles/style.css4
2 files changed, 5 insertions, 2 deletions
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 {