42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
---
|
|
import Layout from './Layout.astro';
|
|
import { getSiteMode, copy } from '../lib/siteMode';
|
|
|
|
interface Props {
|
|
title: string;
|
|
wide?: boolean;
|
|
}
|
|
|
|
const { title, wide = false } = Astro.props;
|
|
const c = copy(getSiteMode());
|
|
|
|
if (Astro.cookies.get('admin_session')?.value !== '1') {
|
|
return Astro.redirect('/admin/login');
|
|
}
|
|
---
|
|
|
|
<Layout title={title} wide={wide}>
|
|
<div class="space-y-10 md:space-y-14">
|
|
<header class="flex flex-col md:flex-row md:items-end justify-between gap-6 pb-6 border-b border-[var(--surface2)]/60">
|
|
<div class="flex-1 min-w-0">
|
|
<a href="/" class="back-link mb-3">
|
|
<span class="bl-arrow" aria-hidden="true">←</span>
|
|
{c.adminBack}
|
|
</a>
|
|
<div class="font-display italic text-[var(--mauve)] text-xs tracking-[0.3em] uppercase mb-2">{c.adminEyebrow}</div>
|
|
<h1 class="font-display italic font-semibold text-[var(--text)] text-4xl md:text-5xl tracking-tight leading-[1.05]">
|
|
{title}
|
|
</h1>
|
|
<slot name="header-subtitle" />
|
|
</div>
|
|
<div class="flex flex-wrap items-center gap-2 shrink-0">
|
|
<slot name="header-actions" />
|
|
</div>
|
|
</header>
|
|
|
|
<div>
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</Layout>
|