themes
ci / docker_image (push) Successful in 58s
ci / deploy (push) Successful in 16s

This commit is contained in:
2025-01-01 18:59:01 -06:00
parent 1ba1c25c84
commit 327ba53b69
7 changed files with 23 additions and 38 deletions
+11 -1
View File
@@ -9,7 +9,17 @@
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<script src="%sveltekit.assets%/themeGetter.ts"></script>
<!-- <script>-->
<!-- const saved_theme = localStorage.getItem('theme');-->
<!-- if (saved_theme) {-->
<!-- document.body.setAttribute('data-theme', saved_theme);-->
<!-- } else {-->
<!-- const prefers_dark = window.matchMedia('(prefers-color-scheme: dark)').matches;-->
<!-- const theme = prefers_dark ? 'dark' : 'light';-->
<!-- document.body.setAttribute('data-theme', theme);-->
<!-- localStorage.setItem('theme', theme);-->
<!-- }-->
<!-- </script>-->
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>