Files
familienarchiv/frontend/src/lib/timeline/GapSpan.svelte
Marcel bea0e0d056 feat(timeline): add GapSpan for folded empty-year runs
A thin dashed span rendering '{from}–{to} · keine Einträge', collapsing to a
single year when the run has length 1 (REQ-015).

Refs #779
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 19:36:39 +02:00

21 lines
746 B
Svelte
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script lang="ts">
import * as m from '$lib/paraglide/messages.js';
/**
* A folded run of fully-empty interior years (REQ-015), rendered as a thin
* dashed span so the scroll stays oriented. Collapses to a single year when the
* run has length 1.
*/
let { from, to }: { from: number; to: number } = $props();
const yearLabel = $derived(from === to ? `${from}` : `${from}${to}`);
</script>
<div
class="mx-auto my-2 flex max-w-md items-center gap-2 rounded-full border border-dashed border-line bg-canvas px-4 py-1 font-sans text-xs text-ink-3"
>
<span class="h-px flex-1 bg-line"></span>
<span><span class="font-serif text-ink-2">{yearLabel}</span> · {m.timeline_gap_empty()}</span>
<span class="h-px flex-1 bg-line"></span>
</div>