From 048c7599ce4ffcb2c78a18eff9cc7bfaccf430d6 Mon Sep 17 00:00:00 2001 From: Zaldimmar Date: Tue, 29 Sep 2026 02:54:03 -0500 Subject: [PATCH] Fix dark mode and bring the public design in line with the taste audit - Dark mode: the countdown card, timeline section, Giving text, error text, the Leadership button, skeletons and the admin's dark text all follow the tokens; logos get a light plate in dark mode - One BRAND accent (the button token, so the admin palette reaches every page) and one ACCENTS family in color.ts, replacing 20 local teal constants and the purple, ochre and rust section colours; neon green and gold become mint and brand green - Shadows are tinted with the site's ink; glow shadows are gone - One giving label, Give, in the nav, footer and Giving page - Phosphor icons replace the hand-drawn SVGs and the glyph icons; Pathfinder paths pick a named icon (emoji still shown) and lose the watermark - Home keeps two eyebrows; StatsBand's title is a real heading; section headings step down under the page title - Nav links switch to the menu below lg, so they never wrap; jump links land clear of the header; press feedback on buttons - Empty sections say what's coming and who to ask; loading is a skeleton; form placeholders and borders are readable; one corner-radius rule; theme-color for both modes Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 + docs/updating-data-in-code.md | 2 + index.html | 3 + package.json | 1 + pnpm-lock.yaml | 15 +++++ src/components/ArrowLink.tsx | 14 +---- src/components/Banner.tsx | 5 +- src/components/ComingSoon.tsx | 24 ++++++++ src/components/ContentBlocks.tsx | 4 +- src/components/FeaturedCards.tsx | 6 +- src/components/Footer.tsx | 4 +- src/components/Layout.tsx | 32 ++++++---- src/components/Logo.tsx | 3 +- src/components/PageShell.tsx | 14 ++--- src/components/PageState.tsx | 23 ++++--- src/components/PeopleTiles.css | 2 +- src/components/PeopleTiles.tsx | 16 ++--- src/components/ThemeToggle.tsx | 14 +---- src/components/VideoPlayer.tsx | 7 +-- src/components/admin/fields.tsx | 7 ++- src/data/pathIcons.ts | 28 +++++++++ src/index.css | 38 +++++++++++- src/lib/adminSchema/frontPage.ts | 11 +++- src/lib/color.ts | 15 +++++ src/pages/AwardDetail.tsx | 7 +-- src/pages/BlogPost.tsx | 15 +++-- src/pages/Community.tsx | 7 ++- src/pages/EventDetail.tsx | 5 +- src/pages/Feedback.tsx | 4 +- src/pages/Giving.tsx | 14 ++--- src/pages/History.tsx | 6 +- src/pages/Leadership.tsx | 19 +++--- src/pages/OrganizationDetail.tsx | 5 +- src/pages/PersonDetail.tsx | 5 +- src/pages/Privacy.tsx | 6 +- src/pages/QrCodes.tsx | 3 +- src/pages/Resources.tsx | 26 +++----- src/pages/Retreats.tsx | 13 ++-- src/pages/TeamDetail.tsx | 5 +- src/pages/Terms.tsx | 3 +- src/pages/admin/AdminClips.tsx | 11 ++-- src/pages/admin/AdminHome.tsx | 7 ++- src/pages/admin/AdminLogin.tsx | 2 +- src/pages/admin/AdminPanel.tsx | 10 ++-- src/pages/admin/EntityEdit.tsx | 5 +- src/pages/sections/CommunityBlog.tsx | 8 +-- src/pages/sections/EventCalendar.tsx | 28 ++++----- src/pages/sections/EventList-Cards.tsx | 40 ++++--------- src/pages/sections/FeedbackForm.tsx | 26 ++------ src/pages/sections/OrgList-Card.tsx | 5 +- src/pages/sections/OrgList-Map.tsx | 15 +---- src/pages/sections/OrgList-Vertical.tsx | 19 ++---- src/pages/sections/QrCodeMaker.tsx | 15 +++-- .../sections/home/FeaturedTimelineRail.tsx | 32 +++++----- src/pages/sections/home/HeroStage.tsx | 26 ++++---- .../sections/home/NextEventCountdown.tsx | 10 ++-- src/pages/sections/home/Pathfinder.tsx | 60 +++++++++++++------ src/pages/sections/home/RetreatsBand.tsx | 10 ++-- src/pages/sections/home/StatsBand.tsx | 4 +- 59 files changed, 416 insertions(+), 350 deletions(-) create mode 100644 src/components/ComingSoon.tsx create mode 100644 src/data/pathIcons.ts diff --git a/CLAUDE.md b/CLAUDE.md index 43a287e..3382282 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,6 +68,8 @@ In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API mu - **Vite resolves `.js` before `.ts`**, so a `.js` and `.ts` file with the same base name will import the wrong one. Give new hooks distinct names. - **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface. - **Colours are tokens, not hex.** Admins can override any token (Panel → Site settings → Colours); the defaults live in three places that must agree: `src/index.css`, `THEME_DEFAULTS` in `server/src/theme.js`, `THEME_COLORS` in `src/lib/adminSchema/siteSettings.ts`. 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 colour). Data colours (accents, event and region colours) 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 chapter 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. - **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 b66302b..7e3baac 100644 --- a/docs/updating-data-in-code.md +++ b/docs/updating-data-in-code.md @@ -275,6 +275,8 @@ The numbers band's "Number Source" dropdown works the same way: | Chapter map tiles and area names | `src/data/mapGrid.ts` | `AREAS` (tile positions) and `AREA_NAMES`. Which region paints which tile is in the database (Admin → Data → Organizations → a region → Map areas). | | Feedback form types | `src/data/feedbackTypes.ts` **and** `TYPES` in `server/src/routes/feedback.js` | Keep the ids identical in both; the server stores unknown ids as `general`. Labels and hints are client-only. `DATA_REQUEST` ('privacy') isn't a tile: the Privacy page's form sends it, and the server requires an email for it. | | The site's colours, light and dark | the database over `src/index.css` | Admin → Panel → Site settings → Colours (superadmins): pick a colour, set its light and/or dark value; saving refuses anything that makes text hard to read. The defaults are the `@theme` tokens and dark block in `src/index.css`, and must stay the same in `THEME_DEFAULTS` (`server/src/theme.js`) and `THEME_COLORS` (`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 colour that arrives as data (a page accent, an event's or region's colour) 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 colour | `BRAND` and `ACCENTS` in `src/lib/color.ts` | Pages pick from these (`accent: ACCENTS.green`); add a colour there, not a hex in a page. Each is readable as text on white and the tints. | | 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/index.html b/index.html index c10f0c2..ae2cbc2 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,9 @@ <!-- site:title --> + + +