From 1bf199304041a4f9c844c8d4d2945bea09baced8 Mon Sep 17 00:00:00 2001 From: Jonathan Hvid Date: Mon, 11 May 2026 16:07:13 +0200 Subject: [PATCH] feat(page): /dispatches index + /dispatches/[slug] detail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /dispatches: editorial header (DISPATCHES · 'Notes from the studio.' · 'Decisions, half-built ideas, and things we've changed our mind about.') + a vertical list of every published dispatch. Each row is a single link target with a three-column grid: 180px byline (avatar + author name + title or role label) / 1fr body (serif italic title + kind pill, then a single- paragraph excerpt) / 130px date column. 0.5px bottom borders, hover tint. /dispatches/[slug]: 720px single-column read view. Header is kind pill + publish date, serif italic title at 2rem, author byline with 32px avatar. Body uses the existing renderMd() (marked) with serif italic h2s, copper blockquotes, mono code blocks. Footer is a 0.5px divider then two adj-card links (prev / next in published order) on opposite ends — the missing side renders an empty grid slot so layout is preserved. Canonical-slug redirect: if /dispatches/12-old-title is hit but the title has since changed, the page issues a 302 to /dispatches/12-new-title. id is the authority, kebab title is for readability. format.ts: adds roleLabel (pilot/cab/fenja → 'Pilot' / 'Council' / 'Fenja team') for the byline. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/format.ts | Bin 10178 -> 10376 bytes src/pages/dispatches/[slug].astro | 258 ++++++++++++++++++++++++++++++ src/pages/dispatches/index.astro | 182 +++++++++++++++++++++ 3 files changed, 440 insertions(+) create mode 100644 src/pages/dispatches/[slug].astro create mode 100644 src/pages/dispatches/index.astro diff --git a/src/lib/format.ts b/src/lib/format.ts index 7126bc17965c56867bfe9f858e11cb6787e93566..5405d12d4083914e958ff8f8f09e78dc42f27f8b 100644 GIT binary patch delta 157 zcmX@)-x0WBg`BxtQD$mhN=~IhQGQOULQY~*YL1RVT4GL4u|iT}a<)QAzCuZ6NlvP6 za$<2RL{VO1Zt7%5Nihzf4j+()$ua^8?i$q!1(`YdB~}XR0U%mkMe3CMHKFU?EN r%mMP#QuDGBfg)}oTA?I0F;`uoRw1!iAvr& + + + + diff --git a/src/pages/dispatches/index.astro b/src/pages/dispatches/index.astro new file mode 100644 index 0000000..459cfda --- /dev/null +++ b/src/pages/dispatches/index.astro @@ -0,0 +1,182 @@ +--- +import AppLayout from '../../layouts/AppLayout.astro'; +import Avatar from '../../components/Avatar.astro'; +import { getLatestPublishedDispatches } from '../../lib/db'; +import { + dispatchSlug, dispatchKindLabel, dispatchKindPigment, + dispatchExcerptParas, roleLabel, +} from '../../lib/format'; + +const user = Astro.locals.user; +const dispatches = getLatestPublishedDispatches(200); + +function parseUtc(s: string): Date { + if (/T.*[Zz]$/.test(s) || /[+-]\d{2}:?\d{2}$/.test(s)) return new Date(s); + return new Date(s.replace(' ', 'T') + 'Z'); +} +function fmt(iso: string): string { + return new Intl.DateTimeFormat('en-GB', { + day: 'numeric', month: 'long', year: 'numeric', timeZone: 'Europe/Copenhagen', + }).format(parseUtc(iso)); +} +--- + +
+ +
+

Dispatches

+

Notes from the studio.

+

Decisions, half-built ideas, and things we've changed our mind about.

+
+ + {dispatches.length === 0 ? ( +

Nothing posted yet.

+ ) : ( + + )} + +
+
+ +