added error component to make my life easier

Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
pull/1/head
Ash Entwisle 2024-02-20 14:34:59 +00:00
parent 3020a2d693
commit fb678c0211
No known key found for this signature in database
GPG Key ID: 0E3CBB6B4BE9FE33
1 changed files with 28 additions and 0 deletions

28
src/layouts/Error.astro Normal file
View File

@ -0,0 +1,28 @@
---
import Center from "../components/base/Center.astro";
import Boilerplate from "./Boilerplate.astro";
export interface Props {
code: string;
title: string;
}
const kw: string[] = [];
const props = Astro.props;
const title = `Error: ${props.code} (${props.title})`;
---
<Boilerplate
title={props.code}
description={props.title}
keywords={kw}
header={true}
footer={true}
>
<Center id="error_main">
<h1>{title}</h1>
<p><slot /></p>
</Center>
</Boilerplate>