Overwork background image support
This commit is contained in:
parent
24b4615f73
commit
d549a90e48
5 changed files with 8 additions and 11 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue