fix: change execution mode
This commit is contained in:
@@ -43,13 +43,12 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
const applyTheme = () => {
|
(() => {
|
||||||
const isDark =
|
const isDark =
|
||||||
localStorage.theme === 'dark' ||
|
localStorage.theme === 'dark' ||
|
||||||
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||||
document.documentElement.classList.toggle('dark', isDark);
|
document.documentElement.classList.toggle('dark', isDark);
|
||||||
};
|
})();
|
||||||
applyTheme();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user