diff --git a/CLAUDE.md b/CLAUDE.md index e6e5bf6..82a149f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -71,7 +71,9 @@ In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API mu - **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface. - **Colors are tokens, not hex.** Admins can override any token (Panel → Site settings → Colors). The defaults are `server/src/themeDefaults.js` plus the same values as CSS in `src/index.css`; the build fails if they differ (`themeDefaultsCheck` in `vite.config.ts`), and migration 041's CHECK lists the token names. Use the utilities from `src/index.css` (`text-ink`, `text-body`, `text-muted`, `text-link`, `bg-surface`, `bg-tint`, `bg-action`, `border-brand/20`...) so dark mode works; a literal only for something that must look the same in both modes (white on a dark band, a platform's color). Data colors (accents, event and region colors) go through `withAlpha`, `accentText` and `readableOn` in `src/lib/color.ts`, never `${color}55`. - **Icons are Phosphor** (`@phosphor-icons/react`), weight `bold` (or `fill` for play/star). No hand-drawn `` icons and no Unicode glyphs as icons (× › ▶ →). Brand marks are the exception: `DoveMark`, `PlatformIcon`, the Google logo, the group map. -- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, mint). Not a new hex in a page. +- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, olive), all from `PALETTE` (the site's 16-color grid). Not a new hex in a page. +- **No rounded corners.** Everything is square except buttons, which use the `btn` utility (Poppins Bold, a superellipse via `corner-shape`; `var(--btn-radius)` in plain CSS), and things round by nature (dots, radio marks). A note in place of content (empty section, "coming soon") uses the `notice` utility, not a dashed border. Nothing glows: no blur blobs, no glow shadows. +- **Sections paint no background.** `PageBackdrop` (in Layout) draws the page's palette circles behind every public page; a band that needs its own color (the hero, the stats band, the footer) is a deliberate exception. - **No em-dashes** (U+2014) anywhere: UI text, help text, comments, docs, commit messages. Use a colon, comma or parentheses. An empty table cell shows `-`. - **Admin editor text:** blank select options read `Default: …` (what blank means), examples in help text start with `eg.`, and record ids are called "URL ID". Cut-off preview text uses `preview()` from `src/lib/text.ts`, which ends it with an ellipsis. See `docs/updating-data-in-code.md`. diff --git a/docs/updating-data-in-code.md b/docs/updating-data-in-code.md index 667be2d..c9aca8f 100644 --- a/docs/updating-data-in-code.md +++ b/docs/updating-data-in-code.md @@ -277,6 +277,8 @@ The numbers band's "Number Source" dropdown works the same way: | The site's colors, light and dark | the database over `src/index.css` | Admin → Panel → Site settings → Colors (superadmins): pick a color, set its light and/or dark value; saving refuses anything that makes text hard to read. The defaults are `THEME_DEFAULTS` in `server/src/themeDefaults.js` (the admin and the contrast check read it) and the same values as CSS in `src/index.css`; the build stops if the two differ. The admin's labels for them are `THEME_LABELS` in `src/lib/adminSchema/siteSettings.ts`. Change a token's value in both modes and every use follows. Use the token utilities (`text-muted`, `bg-surface`, `border-brand/20`) or `var(--color-…)`, not hex. A color that arrives as data (a page accent, an event's or region's color) goes through `src/lib/color.ts`: `withAlpha` for tints, `accentText` for text in it, `readableOn` for text on it. | | The icons a Front page "Find your way in" path can pick | `src/data/pathIcons.ts` (keys and labels) **and** `ICONS` in `src/pages/sections/home/Pathfinder.tsx` (the Phosphor icon for each key) | Add a line to both. A path saved with an emoji from before the list shows it as it is. | | A page section's accent color | `BRAND` and `ACCENTS` in `src/lib/color.ts` | Pages pick from these (`accent: ACCENTS.green`); add a color there, not a hex in a page. Each is readable as text on white and the tints. | +| The palette (the 16-color grid the theme is drawn from) | `PALETTE` in `src/lib/color.ts` | Four families, a column each. `PALETTE_LIGHT` / `PALETTE_DARK` are the fills things colored by data use (a person's initials tile, `paletteFill`); the page background's circles and tones are in `src/components/PageBackdrop.css`; the admin home's group colors are `GROUPS` in `src/pages/admin/AdminHome.tsx`. | +| Timeline leaf colors (green now, autumn going back) | `leafColor` in `src/lib/color.ts` | The green, gold and autumn stops, and `LEAF_TURNED_BY` (2000), the year before which every leaf is fully turned. | | Privacy Policy and Terms wording | `src/pages/Privacy.tsx`, `src/pages/Terms.tsx` | The `PARTS` list, and `LAST_UPDATED` whenever the wording changes. The Privacy page must stay true of the code: what the feedback form stores, what the browser keeps, which embeds wait for a click. | | Event type labels and plurals (public site) | `src/lib/eventTypes.ts` | Also the order of the type filter chips. | | Event and person role labels (public site) | `ROLE_LABEL` in `src/pages/EventDetail.tsx` and `src/pages/PersonDetail.tsx` | | diff --git a/server/src/themeDefaults.js b/server/src/themeDefaults.js index fc90867..aa44680 100644 --- a/server/src/themeDefaults.js +++ b/server/src/themeDefaults.js @@ -14,16 +14,16 @@ // light dark export const THEME_DEFAULTS = { - ink: ["#073d4a", "#eaf6f8"], - body: ["#26454c", "#cde0e4"], - muted: ["#4a6b72", "#9fb9bf"], - link: ["#0f7183", "#5ccbdc"], - brand: ["#138ba0", "#2aa7bc"], - action: ["#0f7183", "#0f7183"], - "action-hover": ["#0b5c6a", "#0b5c6a"], - surface: ["#ffffff", "#0c1d21"], - tint: ["#eef9fb", "#11292e"], - "tint-soft": ["#f6fbfc", "#0f2428"], + ink: ["#001011", "#fcfffd"], + body: ["#004552", "#c2f6ff"], + muted: ["#004c52", "#aac992"], + link: ["#004552", "#5ce7ff"], + brand: ["#008fa8", "#008fa8"], + action: ["#004552", "#004c52"], + "action-hover": ["#001011", "#004552"], + surface: ["#fcfffd", "#001011"], + tint: ["#c2f6ff", "#004552"], + "tint-soft": ["#dfebd6", "#27371b"], danger: ["#b3261e", "#ff8a80"], "danger-tint": ["#fdf3f2", "#3b1714"], }; diff --git a/src/components/ArrowLink.tsx b/src/components/ArrowLink.tsx index 05188f1..20f5fb9 100644 --- a/src/components/ArrowLink.tsx +++ b/src/components/ArrowLink.tsx @@ -11,7 +11,7 @@ export default function ArrowLink({ to, label, color, size = "h-9 w-9" }) { to={to} aria-label={label} title={label} - className={`${size} shrink-0 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110`} + className={`${size} shrink-0 btn flex items-center justify-center transition-transform duration-200 hover:scale-110`} style={{ border: `1px solid ${color}`, color }} > diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx index e5d32e6..c338108 100644 --- a/src/components/Banner.tsx +++ b/src/components/Banner.tsx @@ -53,7 +53,7 @@ export default function Banner() { diff --git a/src/components/ComingSoon.tsx b/src/components/ComingSoon.tsx index 6565ae2..8e88188 100644 --- a/src/components/ComingSoon.tsx +++ b/src/components/ComingSoon.tsx @@ -12,7 +12,7 @@ const CONTACT = 'info@nextgenerationofunity.org' export default function ComingSoon({ what }: { what: string }) { return (
-

+

We’re putting {what} together. In the meantime, ask us at{' '} {CONTACT} diff --git a/src/components/ContentBlocks.tsx b/src/components/ContentBlocks.tsx index 58bb73b..0650497 100644 --- a/src/components/ContentBlocks.tsx +++ b/src/components/ContentBlocks.tsx @@ -91,7 +91,7 @@ function LinkCard({ item }: { item: ContentBlockItem }) { return ( {!img.failed && ( @@ -147,7 +147,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; case 'subheading': return ( -

+

{text}

) @@ -184,7 +184,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; {item.text} @@ -199,7 +199,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
{text} @@ -245,7 +245,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; return ( // Wide tables scroll sideways inside their box on a phone // rather than squeezing every column to a word. -
+
@@ -282,7 +282,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; if (!text) return null return (
diff --git a/src/components/FeaturedCards.tsx b/src/components/FeaturedCards.tsx index e998b02..c0fc3dc 100644 --- a/src/components/FeaturedCards.tsx +++ b/src/components/FeaturedCards.tsx @@ -16,6 +16,13 @@ A photo fills the picture area; a logo sits inside it on a soft panel instead, since cropping a logo to 16:9 cuts it off. + + The grid is one continuous block: no gaps and no frame, only a + colored rule between cards (each card's right and bottom border, + with the grid pulled past its clipping wrapper so the outer ones + fall outside). With three or more cards the first is the large + one, two rows tall, and the next two stack beside it, so it no + longer stretches its neighbor. ═══════════════════════════════════════════════════════════════ */ @@ -71,22 +78,24 @@ function VideoPicture({ card }: { card: FeaturedCard }) { return } -function Card({ card }: { card: FeaturedCard }) { +const RULE = 'border-brand' + +function Card({ card, large }: { card: FeaturedCard; large: boolean }) { const href = hrefFor(card) const text = ( -
+
{card.eyebrow && (

{card.eyebrow}

)} {card.title && ( -

+

{href ? ( // Stretched over the whole card, so the picture and the // blurb are part of the click without nesting links. {card.title} @@ -95,12 +104,18 @@ function Card({ card }: { card: FeaturedCard }) { )}

)} - {card.blurb &&

{card.blurb}

} + {card.blurb && ( +

{card.blurb}

+ )}
) return ( -
  • +
  • {card.kind === 'video' ? ( // Above the stretched link, which a video card doesn't have // anyway, so the play button always gets the click. @@ -116,11 +131,18 @@ function Card({ card }: { card: FeaturedCard }) { } export default function FeaturedCards({ cards }: { cards: FeaturedCard[] }) { + const leadLarge = cards.length >= 3 return ( -
      - {cards.map((card, index) => ( - - ))} -
    +
    +
      + {cards.map((card, index) => ( + + ))} +
    +
    ) } diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 2223e55..9a8b989 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -53,15 +53,29 @@ const headingClass = "text-white/90 text-sm font-semibold mb-4"; export default function Footer() { return ( -