refactor: remove theme toggle functionality and related styles

This commit is contained in:
Adrian Altner 2026-04-22 18:23:06 +02:00
parent 3152e8f72b
commit 981c81a865
4 changed files with 2 additions and 112 deletions

View file

@ -32,19 +32,6 @@ const {
<html lang={locale}>
<head>
<BaseHead title={title} description={description} image={image} locale={locale} />
<script is:inline>
(() => {
const root = document.documentElement;
const stored = localStorage.getItem('theme');
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const theme = stored === 'dark' || stored === 'light' ? stored : prefersDark ? 'dark' : 'light';
root.dataset.theme = theme;
// Enable theme transitions after initial render
requestAnimationFrame(() =>
requestAnimationFrame(() => root.setAttribute('data-theme-ready', '')),
);
})();
</script>
<slot name="head" />
</head>
<body class={bodyClass}>