From 884cca85f166b664888f7603f5f51381d72aa347 Mon Sep 17 00:00:00 2001 From: Jonathan Hvid Date: Tue, 12 May 2026 11:41:00 +0200 Subject: [PATCH] =?UTF-8?q?feat(component):=20LatestDispatchBanner=20?= =?UTF-8?q?=E2=80=94=20slim=20single-row=20card?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit White card with 0.5px border, 12px radius, 22px/26px padding. Three- column grid (auto / 1fr / auto): - Left: 30px deterministic-pigment avatar + tracked 'LATEST DISPATCH · {relative}' eyebrow + 11px '{first_name} · {title || team}' line. - Middle: 19px serif title + 12px single-line ellipsis excerpt. - Right: 11px terracotta 'READ DISPATCH' link (1px terracotta bottom border) + 10px muted 'ALL DISPATCHES →' below it. The whole card is one targeting the dispatch slug — hover lifts it 1px and tints the surface; entire surface is the click target. Hidden entirely when getLatestPublishedDispatches(1) returns []. The banner doesn't render an empty-state placeholder — the /roadmap page just starts with the route in that case. At <768px the grid collapses to a single column and the excerpt wraps. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/LatestDispatchBanner.astro | 121 ++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 src/components/LatestDispatchBanner.astro diff --git a/src/components/LatestDispatchBanner.astro b/src/components/LatestDispatchBanner.astro new file mode 100644 index 0000000..ed74b37 --- /dev/null +++ b/src/components/LatestDispatchBanner.astro @@ -0,0 +1,121 @@ +--- +import Avatar from './Avatar.astro'; +import { getLatestPublishedDispatches } from '../lib/db'; +import { + dispatchSlug, dispatchExcerptParas, relativeTime, +} from '../lib/format'; + +const [latest] = getLatestPublishedDispatches(1); +const excerpt = latest ? dispatchExcerptParas(latest).lead : ''; +--- +{latest && ( + +)} + +