schmelczer-dev/src/layouts/Page.astro
2026-05-25 09:49:09 +01:00

22 lines
520 B
Text

---
import type { ComponentProps } from 'astro/types';
import Base from './Base.astro';
type Props = Omit<ComponentProps<typeof Base>, 'title'> & { title: string };
const { title, description } = Astro.props;
if (!title) {
throw new Error('Page layout requires a `title` prop.');
}
---
<Base {...Astro.props}>
<div class="page-shell">
<header class="page-header">
<slot name="breadcrumbs" />
<h1>{title}</h1>
{description && <p>{description}</p>}
</header>
<slot />
</div>
</Base>