added theme checking if localstorage is empty
11ty build and deploy for ${{ gitea.repository }} / build-deploy (push) Successful in 21s
Details
11ty build and deploy for ${{ gitea.repository }} / build-deploy (push) Successful in 21s
Details
This commit is contained in:
parent
dff1fa475b
commit
9055bf392f
|
@ -28,6 +28,9 @@ customElements.define('theme-switcher', class extends HTMLElement {
|
|||
} else if (this.currentTheme == 'light') {
|
||||
checkbox.checked = false
|
||||
document.body.classList.toggle('light')
|
||||
} else {
|
||||
console.log(this.preferDark)
|
||||
checkbox.checked = this.preferDark
|
||||
}
|
||||
|
||||
checkbox.addEventListener('click', () => {
|
||||
|
|
Loading…
Reference in New Issue