general cleanup
Some checks failed
Build and publish the docker image / build (push) Failing after 1m8s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-01-19 12:29:05 +03:00
parent 9e307b7da4
commit 7cea387f02
27 changed files with 94 additions and 535 deletions

View File

@ -75,35 +75,3 @@ function getAnnotation(e) {
}
};
}
window._currentTheme = localStorage.getItem("_theme") || (window.matchMedia("(prefers-color-scheme:dark)").matches ? "dark" : "light");
setTheme(window._currentTheme);
const themeChooser = document.getElementById("choose-theme");
themeChooser.addEventListener("click", function () {
if (window._currentTheme === "dark") {
setTheme("light");
} else {
setTheme("dark");
}
});
function setTheme(theme) {
const toggler = document.getElementById(
"ic_fluent_dark_theme_24_regular"
);
switch (theme) {
case "dark":
toggler.setAttribute("fill", "#fff");
localStorage.setItem("_theme", "dark");
document.body.classList.add("dark");
window._currentTheme = "dark";
return;
case "light":
toggler.setAttribute("fill", "#181d31");
localStorage.setItem("_theme", "light");
document.body.classList.remove("dark");
window._currentTheme = "light";
return;
}
}