---
import { getLangFromUrl } from '../i18n/utils';
import Header from "../components/Header.astro";

interface Props {
	title: string;
}

const { title } = Astro.props;

const lang = getLangFromUrl(Astro.url);
---

<!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>