Timeline years as leaves, green now and turning autumn going back; notices instead of dashed boxes

A year's leaf eases from green to gold to autumn between this year
and 2000 (leafColor in color.ts); every year before 2000 is fully
turned. Empty-section and form notes use one notice style, a flat
tinted panel with a solid left bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 14:53:50 -05:00
parent 592e07f614
commit d5428297a4
12 changed files with 99 additions and 66 deletions

View file

@ -19,7 +19,7 @@
Nothing featured, and the section doesn't render at all.
═══════════════════════════════════════════════════════════════ */
import { ArrowRight, CaretRight, CaretLeft } from '@phosphor-icons/react';
import { ArrowRight, CaretRight, CaretLeft, Leaf } from '@phosphor-icons/react';
import { useRef, useState, type PointerEvent as ReactPointerEvent } from 'react'
import { Link } from 'react-router-dom'
@ -27,7 +27,7 @@ import HomeLink from './HomeLink.tsx'
import { useHistory } from '../../../lib/useHistory.ts'
import { hrefFor, logoSrc } from '../../../lib/timelineRefs.ts'
import { MONTH_LABELS, type TimelineItem } from '../../../lib/timeline.ts'
import { accentText, BRAND } from '../../../lib/color.ts'
import { accentText, BRAND, leafColor } from '../../../lib/color.ts'
import { scrollBehavior } from '../../../lib/motion.ts';
const DRAG_SLOP = 6
@ -220,16 +220,19 @@ function RailCard({ item, showYear }: { item: TimelineItem; showYear: boolean })
return (
<div className="flex h-full flex-col">
{/* The line, its dot, and the year where it changes. */}
{/* The line, its leaf (colored by the year, as on the History
page), and the year where it changes. */}
<div className="relative mb-4 h-8">
<div className="absolute inset-x-[-1.5rem] top-1/2 h-px bg-brand/30" />
<span
className="absolute left-0 top-1/2 h-3 w-3 -translate-y-1/2 rounded-full border-2 bg-surface"
style={{ borderColor: BRAND }}
<Leaf
weight="fill"
aria-hidden="true"
className="absolute -left-1 top-1/2 h-5 w-5 -translate-y-1/2 -rotate-12"
style={{ color: leafColor(Number(year(item))) }}
/>
{showYear && (
<span
className="absolute left-5 top-1/2 -translate-y-1/2 px-3 py-0.5 font-display text-sm font-bold text-white"
className="absolute left-6 top-1/2 -translate-y-1/2 px-3 py-0.5 font-display text-sm font-bold text-white"
style={{ background: BRAND }}
>
{year(item)}