update set dark
This commit is contained in:
parent
d84742bae0
commit
422df59dcc
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
||||||
setTimeout(() => htmlClass.remove('not-ready'), 10);
|
setTimeout(() => htmlClass.remove('not-ready'), 10);
|
||||||
|
|
||||||
const setDark = (newDark) => {
|
const setDark = (newDark) => {
|
||||||
metaTheme.setAttribute('content', newDark ? 'var(--dark-bg)' : 'var(--light-bg)');
|
metaTheme.setAttribute('content', newDark ? '#000' : '#fbfbfb');
|
||||||
htmlClass[newDark ? 'add' : 'remove']('dark');
|
htmlClass[newDark ? 'add' : 'remove']('dark');
|
||||||
localStorage.setItem('dark', newDark);
|
localStorage.setItem('dark', newDark);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue