minor / add button to footer to get new random messages

This commit is contained in:
2025-07-25 09:54:22 -04:00
parent 3d35b0a327
commit 3ea7142b24
3 changed files with 16 additions and 4 deletions

View File

@@ -16,7 +16,6 @@ const currentPath = Astro.url.pathname;
---
<script is:inline>
toggleTheme = () => {
console.log("Toggle!")
const currentTheme = document.documentElement.getAttribute("data-theme");
const newTheme = currentTheme === "dark" ? "light" : "dark";
document.dispatchEvent(new CustomEvent("set-theme", { detail: newTheme }));