Added PageComponents

This commit is contained in:
2026-09-30 16:20:40 +02:00
parent c6023cf857
commit e57e2da09d
37 changed files with 1408 additions and 62 deletions

View File

@@ -1,17 +1,28 @@
---
type Props = {
title: string
/** Small label above the title: "Page", "Tag". */
eyebrow?: string
standfirst?: string
count?: number
}
const { title, eyebrow, standfirst } = Astro.props
const { title, eyebrow, standfirst, count } = Astro.props
---
<header class="header">
{eyebrow && <p class="eyebrow">{eyebrow}</p>}
<h1 class="title">{title}</h1>
{standfirst && <p class="standfirst">{standfirst}</p>}
<slot />
<header class="simple-header dark">
<div class="simple-header__inner">
<div class="simple-header__text">
{eyebrow && <p class="simple-header__eyebrow">{eyebrow}</p>}
<h1 class="simple-header__title">{title}</h1>
{standfirst && <p class="simple-header__standfirst">{standfirst}</p>}
</div>
{count !== undefined && (
<p class="simple-header__count">
<span aria-hidden="true">{String(count).padStart(2, '0')}</span>
<span class="simple-header__hidden">
{count} {count === 1 ? 'entry' : 'entries'}
</span>
</p>
)}
</div>
</header>