change default theme to dark

This commit is contained in:
Heidi
2026-06-22 20:08:55 +01:00
parent b8d50d56b7
commit 4dd0153526
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#e82517" />
<style>
html { background: #fefde7; }
html { background: #130d08; }
html[data-theme="dark"] { background: #130d08; color-scheme: dark; }
html[data-theme="dark"] body,
html[data-theme="dark"] #root { background: #130d08; }
@@ -36,7 +36,7 @@
theme = localStorage.getItem('tssbot.theme')
} catch {}
}
theme = theme === 'dark' ? 'dark' : 'light'
theme = theme === 'light' ? 'light' : 'dark'
const bg = theme === 'dark' ? '#130d08' : '#fefde7'
document.documentElement.dataset.theme = theme
+2 -2
View File
@@ -548,7 +548,7 @@ function writeCookie(name, value) {
}
function normalizeThemePreference(value) {
return value === 'dark' ? 'dark' : 'light'
return value === 'light' ? 'light' : 'dark'
}
function storedThemePreference() {
@@ -561,7 +561,7 @@ function storedThemePreference() {
try {
return normalizeThemePreference(window.localStorage.getItem(themePreferenceKey))
} catch {
return 'light'
return 'dark'
}
}