fix: Fix default theme value
This commit is contained in:
parent
17deb772cf
commit
b6244030a3
4 changed files with 7 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
|||
<!--================= add analytics if enabled =========================-->
|
||||
{{- partial "analytics.html" . -}}
|
||||
<script>
|
||||
theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'system';
|
||||
theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light';
|
||||
if (theme == 'system') {
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
theme = 'dark';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue