1
0
Fork 0

update set dark

This commit is contained in:
nanxiaobei 2022-07-19 23:54:20 +08:00
parent d84742bae0
commit 422df59dcc

View file

@ -18,7 +18,7 @@
setTimeout(() => htmlClass.remove('not-ready'), 10);
const setDark = (newDark) => {
metaTheme.setAttribute('content', newDark ? 'var(--dark-bg)' : 'var(--light-bg)');
metaTheme.setAttribute('content', newDark ? '#000' : '#fbfbfb');
htmlClass[newDark ? 'add' : 'remove']('dark');
localStorage.setItem('dark', newDark);
};