feat: some shit
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 7m4s
Deploy to GitHub Pages / deploy (push) Has been skipped

This commit is contained in:
2024-04-03 18:54:51 +02:00
parent 58b74bb801
commit feb9b21ff8
43 changed files with 60 additions and 71 deletions

View File

@ -57,12 +57,13 @@ const { title, width = "compact" } = Astro.props;
<script>
(function () {
try {
var mode = localStorage.getItem("mode");
var mode = localStorage.getItem("theme");
var supportDarkMode =
window.matchMedia("(prefers-color-scheme: dark)").matches === true;
if (!mode && supportDarkMode)
document.documentElement.classList.add("dark");
if (!mode) return;
console.log({ mode });
document.documentElement.classList.add(mode);
} catch (e) {}
})();