Editing code with my formatting
This commit is contained in:
parent
caae7b85b7
commit
aa2d0606ce
9 changed files with 503 additions and 283 deletions
|
@ -1,9 +1,9 @@
|
|||
let theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light'
|
||||
let theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'dark'
|
||||
if (theme === 'system') {
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
theme = 'dark'
|
||||
} else {
|
||||
theme = 'light'
|
||||
theme = 'dark'
|
||||
}
|
||||
}
|
||||
document.documentElement.setAttribute('data-theme', theme)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue