feat(frontend): unify page shell and move create flows to dedicated routes
This commit is contained in:
parent
e20c18c2ee
commit
0253b2377d
50 changed files with 2235 additions and 1042 deletions
62
frontend/src/lib/components/PageHeader.svelte
Normal file
62
frontend/src/lib/components/PageHeader.svelte
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
import { ArrowLeft } from 'lucide-svelte';
|
||||
|
||||
let {
|
||||
title,
|
||||
kicker,
|
||||
subtitle,
|
||||
backHref,
|
||||
backLabel,
|
||||
className = '',
|
||||
titleClassName = 'editorial-title',
|
||||
meta,
|
||||
actions,
|
||||
children
|
||||
}: {
|
||||
title: string;
|
||||
kicker?: string;
|
||||
subtitle?: string;
|
||||
backHref?: string;
|
||||
backLabel?: string;
|
||||
className?: string;
|
||||
titleClassName?: string;
|
||||
meta?: Snippet;
|
||||
actions?: Snippet;
|
||||
children?: Snippet;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<section class={`editorial-hero reveal-1 ${className}`.trim()}>
|
||||
{#if backHref && backLabel}
|
||||
<a href={backHref} class="editorial-backlink"><ArrowLeft class="size-4" /> {backLabel}</a>
|
||||
{/if}
|
||||
|
||||
{#if kicker}
|
||||
<p class="editorial-kicker">{kicker}</p>
|
||||
{/if}
|
||||
|
||||
<h1 class={titleClassName}>{title}</h1>
|
||||
|
||||
{#if subtitle}
|
||||
<p class="editorial-subtitle">{subtitle}</p>
|
||||
{/if}
|
||||
|
||||
{#if meta}
|
||||
<div class="page-header-meta">
|
||||
{@render meta()}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if actions}
|
||||
<div class="editorial-toolbar">
|
||||
{@render actions()}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if children}
|
||||
<div class="page-header-foot">
|
||||
{@render children()}
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue