Overwork background image support

This commit is contained in:
Djordje Atlialp 2021-01-10 18:09:12 +01:00
parent 24b4615f73
commit d549a90e48
5 changed files with 8 additions and 11 deletions

View file

@ -14,11 +14,13 @@ if (theme !== null) {
themeToggle.addEventListener("click", () => {
document.body.classList.toggle("dark-theme");
window.localStorage &&
window.localStorage.setItem(
"theme",
document.body.classList.contains("dark-theme") ? "dark" : "light"
);
document.body.classList.contains("dark-theme")
? metaThemeColor.setAttribute("content", "#252627")
: metaThemeColor.setAttribute("content", "#fafafa");