Files
commonflow.org/src/layouts/Default.astro
Jim Myhrberg 0a74d4eacd feat(design): complete redesign of website
Redesign the website with a more modern look.
2026-01-10 19:19:06 +00:00

51 lines
1.5 KiB
Plaintext

---
import "../styles/global.css";
import { config } from "../config";
interface Props {
title: string;
description?: string;
}
const { title, description = config.description } = Astro.props;
const fullTitle = title === config.title ? title : `${title} | ${config.title}`;
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="canonical" href={Astro.url} />
<title>{fullTitle}</title>
<meta name="description" content={description} />
<meta name="author" content={config.author} />
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
<!-- Prevent flash of wrong theme -->
<script is:inline>
(function () {
const theme = localStorage.getItem("theme");
if (
theme === "dark" ||
(!theme &&
window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
document.documentElement.classList.add("dark");
}
})();
</script>
</head>
<body class="min-h-screen flex flex-col items-center justify-center p-8">
<slot />
</body>
</html>