website/src/layouts/Layout.astro
~hedy dd3a81b5bf refactor: Avoid duplicating pages for each language
This makes use of Astro dynamic routing to avoid having to redefine all
pages for each language.

Note that they still have to be defined in `i18n/ui.ts` which is not
refactored in this PR.

The Index will also now use the `defaultLang` from `i18n/ui.ts` rather
than hardcoding `/en/`.
2024-05-07 07:26:56 +10:00

44 lines
941 B
Text

---
import Header from "../components/Header.astro";
interface Props {
title: string;
}
const { title } = Astro.props;
const { lang } = Astro.params;
---
<!doctype html>
<html lang={lang}>
<head>
<meta charset="UTF-8" />
<meta name="description" content="An alternative to the Nix ecosystem." />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
<meta name="verify" content="https://github.com/jakehamilton" />
</head>
<body>
<Header />
<slot />
</body>
</html>
<style is:global>
:root {
--accent: 136, 58, 234;
--background: 24, 24, 24;
--background-light: 34, 34, 38;
--text: 255, 255, 255;
}
html {
font-size: 16px;
font-family: system-ui, sans-serif;
color: rgb(var(--text));
background: rgb(var(--background));
background-size: 224px;
}
</style>