change default theme to dark
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user