This commit is contained in:
parent
82ad79d97c
commit
0214631b36
10 changed files with 136 additions and 15 deletions
|
|
@ -4,7 +4,7 @@ document.querySelector('nav > button').addEventListener('click', (e) => {
|
|||
|
||||
function applyTheme(theme){
|
||||
const html = document.querySelector('html')
|
||||
document.cookie = `theme=${theme}; expires=; SameSite=Strict; Secure`
|
||||
document.cookie = `theme=${theme}; path=/; expires=; SameSite=Strict; Secure`
|
||||
html.classList.remove('dark', 'light')
|
||||
html.classList.add(theme)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue