Compare commits

..
2 Commits
Author SHA1 Message Date
Riyyi 12fa6f4b56 Cleanup 2025-04-04 07:14:38 +02:00
Riyyi a205f7ff95 Persistent color theme 2025-04-04 00:29:23 +02:00
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
background-color: #fff; background-color: #fff;
} }
.dark { body.dark {
background-color: #1a1d20; background-color: #1a1d20;
} }
@@ -78,7 +78,7 @@
css = "dark"; css = "dark";
} }
const element = document.querySelector("html"); const element = document.querySelector("body");
element.classList.add(css); element.classList.add(css);
</script> </script>
</body> </body>
+3 -1
View File
@@ -29,10 +29,12 @@ export const useStateStore = defineStore("state", () => {
html.setAttribute('data-bs-theme', css); html.setAttribute('data-bs-theme', css);
// Theme class used by shiki syntax highlighting // Theme class used by shiki syntax highlighting
html.classList.remove("dark");
if (css === "dark") { if (css === "dark") {
html.classList.add("dark"); html.classList.add("dark");
} }
else {
html.classList.remove("dark");
}
} }
const popoverList = ref<any[]>([]); const popoverList = ref<any[]>([]);