diff --git a/src/components/RoadmapInMotion.astro b/src/components/RoadmapInMotion.astro deleted file mode 100644 index 216c9a4..0000000 --- a/src/components/RoadmapInMotion.astro +++ /dev/null @@ -1,69 +0,0 @@ ---- -import type { RoadmapItemWithAttribution } from '../lib/db'; - -interface Props { - items: RoadmapItemWithAttribution[]; -} - -const { items } = Astro.props; - -/** First sentence of a description — naive but matches the user's needs. - * Returns '' for null/empty input. Falls back to a 200-char slice if no - * sentence-ending punctuation is found in a reasonable window. */ -function firstSentenceOf(text: string | null): string { - if (!text) return ''; - const trimmed = text.trim(); - const match = trimmed.match(/^[^.!?]*[.!?](?=\s|$)/); - return match ? match[0] : trimmed.slice(0, 200); -} - -// Most recent shipping item, in display_order (same selection rule as -// the .rr-current marker on the route). -let currentItem: RoadmapItemWithAttribution | null = null; -items.forEach((it) => { if (it.status === 'shipping') currentItem = it; }); - -const line = currentItem ? firstSentenceOf(currentItem.description) : ''; -const visible = !!currentItem && line.length > 0; ---- -{visible && ( -
- In motion right now -

{line}

-
-)} - - diff --git a/src/components/admin/RoadmapTab.astro b/src/components/admin/RoadmapTab.astro index 91f4872..db42c6b 100644 --- a/src/components/admin/RoadmapTab.astro +++ b/src/components/admin/RoadmapTab.astro @@ -64,7 +64,6 @@ const grouped: Record = {
- For shipping items: the first sentence appears on /roadmap as the "In motion right now" line. Make it count.
diff --git a/src/pages/roadmap.astro b/src/pages/roadmap.astro index 771b7d3..5a1fe1c 100644 --- a/src/pages/roadmap.astro +++ b/src/pages/roadmap.astro @@ -1,7 +1,6 @@ --- import AppLayout from '../layouts/AppLayout.astro'; import LatestDispatchBanner from '../components/LatestDispatchBanner.astro'; -import RoadmapInMotion from '../components/RoadmapInMotion.astro'; import RoadmapRoute from '../components/RoadmapRoute.astro'; import { getAllRoadmapItems } from '../lib/db'; @@ -26,8 +25,6 @@ const items = getAllRoadmapItems() - -
@@ -66,14 +63,16 @@ const items = getAllRoadmapItems() max-width: 540px; } - /* In-motion strip lives between banner and route; banner margin - tightens to 40px because the strip carries its own 36px below. */ - .page :global(.banner) { margin-bottom: 40px; } + /* Banner sits directly above the route now — restore the original + 56px gap so the editorial banner reads as its own beat. */ + .page :global(.banner), + .page :global(.rr-dispatch) { margin-bottom: 56px; } @media (max-width: 767px) { .page { padding: 32px 24px 64px; } .page-title { font-size: 36px; } .page-header { margin-bottom: 28px; } - .page :global(.banner) { margin-bottom: 28px; } + .page :global(.banner), + .page :global(.rr-dispatch) { margin-bottom: 40px; } }