77 lines
2.3 KiB
Plaintext
77 lines
2.3 KiB
Plaintext
---
|
|
import "@styles/global.css";
|
|
|
|
import Footer from "@components/Footer.astro";
|
|
import H1 from "@components/H1.astro";
|
|
import Navbar from "@components/Navbar.astro";
|
|
import PageGroup from "@components/PageGroup.astro";
|
|
|
|
import { pathToMetadata } from "@data/site-layout.ts";
|
|
|
|
interface Props {
|
|
title?: string;
|
|
subTitles?: string[];
|
|
|
|
showTitle?: boolean;
|
|
}
|
|
|
|
const { title, subTitles, showTitle = true } = Astro.props;
|
|
|
|
const pageTitle = Astro.props.title
|
|
? `${Astro.props.title} - Corwin Perren`
|
|
: "Corwin Perren";
|
|
const pageEnabled = pathToMetadata(Astro.url.pathname).enabled ?? true;
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
|
|
<link rel="icon" href="/48x48-favicon.png" type="image/x-icon" />
|
|
<link rel="icon" href="/512x512-favicon.png" type="image/png" />
|
|
<link rel="icon" href="/192x192-favicon.png" type="image/png" />
|
|
<link rel="icon" href="/180x180-favicon.png" type="image/png" />
|
|
<link rel="icon" href="/48x48-favicon.png" type="image/png" />
|
|
<link rel="icon" href="/32x32-favicon.png" type="image/png" />
|
|
<link rel="icon" href="/16x16-favicon.png" type="image/png" />
|
|
|
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{pageEnabled ? pageTitle : "Corwin Perren"}</title>
|
|
</head>
|
|
<body
|
|
class="grid h-dvh w-full max-w-full grid-cols-1 gap-0 bg-black text-white"
|
|
>
|
|
<div
|
|
id="content-body-scrolling"
|
|
class="grow overflow-x-hidden overflow-y-scroll"
|
|
>
|
|
<Navbar />
|
|
<main class="mx-6 my-2">
|
|
{
|
|
showTitle && pageEnabled && (
|
|
<PageGroup>
|
|
<Fragment slot="header">
|
|
<div class="leading-3">
|
|
<H1>{title}</H1>
|
|
{subTitles?.map((subTitle) => (
|
|
<p class="md:text-md text-sm font-bold italic">
|
|
{subTitle}
|
|
</p>
|
|
))}
|
|
</div>
|
|
</Fragment>
|
|
</PageGroup>
|
|
)
|
|
}
|
|
<div class="grid grid-cols-1 gap-4">
|
|
{pageEnabled ? <slot /> : <H1>Under Construction</H1>}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<Footer />
|
|
<script src="../scripts/main.ts"></script>
|
|
</body>
|
|
</html>
|