|
|
|
@ -72,9 +72,8 @@ |
|
|
|
|
setTheme('light'); |
|
|
|
|
} |
|
|
|
|
H.set('padTheme', newTheme); |
|
|
|
|
console.log('here'); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setTheme(newTheme) { |
|
|
|
|
document.body.classList.remove('light'); |
|
|
|
|
document.body.classList.remove('dark'); |
|
|
|
@ -101,10 +100,12 @@ |
|
|
|
|
setTheme('dark'); |
|
|
|
|
} else { |
|
|
|
|
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches |
|
|
|
|
if (isDarkMode) setTheme('dark'); |
|
|
|
|
else setTheme('light'); |
|
|
|
|
if (isDarkMode) { |
|
|
|
|
setTheme('dark'); |
|
|
|
|
} else { |
|
|
|
|
setTheme('light'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $writer = H.getEl('writer'); |
|
|
|
|
var $btnPublish = H.getEl('publish'); |
|
|
|
|