Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Jun 19, 2024
1 parent 363cb84 commit fd9c19a
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/components/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,3 @@
</ul>
</nav>
</header>

<!-- <script>
function loadTheme() {
if (
localStorage.theme === "dark" ||
(!("theme" in localStorage) &&
window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.remove("dark");
}
}
loadTheme();
const btn = document.querySelectorAll("[dark-theme-button]");
console.log(btn);
btn.forEach((btn) => {
btn.addEventListener("click", () => {
if (localStorage.theme === "dark") {
localStorage.theme = "light";
} else {
localStorage.theme = "dark";
}
loadTheme();
});
});
console.log("HELLO");
</script> -->

0 comments on commit fd9c19a

Please sign in to comment.