This commit is contained in:
2026-02-12 23:54:49 +01:00
commit 724500ae0b
16 changed files with 575 additions and 0 deletions

31
components/Layout.ts Normal file
View File

@@ -0,0 +1,31 @@
import { ghPagesBasePath, html, type Html } from "@mastrojs/mastro";
import { Header } from "./Header.ts";
import { Footer } from "./Footer.ts";
export const basePath = ghPagesBasePath();
interface Props {
title?: string;
children: Html;
}
export const Layout = (props: Props) =>
html`
<!doctype html>
<html lang="en">
<head>
<title>${props.title}</title>
<link rel="stylesheet" href=${basePath + "/styles.css"}>
<meta name="viewport" content="width=device-width">
</head>
<body>
${Header()}
<main>
${props.children}
</main>
${Footer()}
</body>
</html>
`;