function appDarkMode() {
const body = document.querySelector("body");
document.querySelector(".switch-day").addEventListener("change", event => {
body.toggleAttribute("dark", event.target.checked);
document.querySelector("#darkmode").checked ? localStorage.setItem("dark", "") : localStorage.removeItem("dark", "");
});
if (localStorage.getItem("dark") !== null) {
body.setAttribute("dark", "");
}
}