Compare commits

...

1 commit

Author SHA1 Message Date
10b5ce30a3 fix light toggle
All checks were successful
/ build (push) Successful in 29s
2025-03-21 16:59:41 -07:00

View file

@ -1,5 +1,12 @@
function themeToggle() {
const oldValue = localStorage.getItem('theme');
let oldValue = localStorage.getItem('theme');
if (!oldValue) {
oldValue = 'light';
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
oldValue = 'dark';
}
}
let newValue;
if (oldValue == 'light') {
newValue = 'dark';