feat: add some stuff

This commit is contained in:
2024-03-28 18:30:52 +01:00
parent 31b24de86c
commit d4128840b9
196 changed files with 3393 additions and 390 deletions

View File

@@ -16,6 +16,7 @@ const { title, width = "compact" } = Astro.props;
<meta charset="UTF-8" />
<meta name="description" content="Astro description" />
<meta name="viewport" content="width=device-width" />
<meta name="props" content={JSON.stringify(Astro.props)} />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<AstroFont
config={[
@@ -60,18 +61,18 @@ const { title, width = "compact" } = Astro.props;
var supportDarkMode =
window.matchMedia("(prefers-color-scheme: dark)").matches === true;
if (!mode && supportDarkMode)
document.body.classList.add("theme-dark");
document.documentElement.classList.add("dark");
if (!mode) return;
document.body.classList.add("theme-" + mode);
document.documentElement.classList.add(mode);
} catch (e) {}
})();
</script>
</head>
<body class=`layout-${width}`>
<body class=`layout-${width} bg-dark text-neutral p-2`>
<header>
<Nav />
</header>
<main>
<main class="flex flex-col gap-y-2xl">
<slot />
</main>
<LanguagePicker />
@@ -79,7 +80,6 @@ const { title, width = "compact" } = Astro.props;
.layout-compact {
max-width: 600px;
margin: 0 auto;
padding: 0px 20px;
}
</style>
</body>