feat: add some stuff
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user