Add a featured event as a hero option

Front page → Feature gains "Featured event" (migration 033): the
event's card beside the headline, with its photo or colour, dates or
schedule, place, tagline, action buttons and a link to its page,
under a "Featured event" badge, over either backdrop.

Front page → Featured event pins one. Blank uses the countdown's
event, and a pinned event that's over or unpublished falls back to
it, so the hero and the countdown never disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 20:58:37 -05:00
parent 29202f2eb1
commit d6477b6d30
7 changed files with 187 additions and 11 deletions

View file

@ -181,7 +181,7 @@ also in `admin-schema.js` and a CHECK):
| Timeline → Precision (and on events/orgs) | year, month, day | no | the history page's grouping |
| Front page → Countdown → Only this type | retreat, class, workshop, meeting, other | **yes** | `server/src/routes/home.js` (picks the countdown event). The same values as Events → Type, so adding a type widens both CHECKs. |
| Front page → Background | brand, photos | **yes** | `HeroStage.tsx` |
| Front page → Feature | none, livestream, video | **yes** | `HeroStage.tsx` |
| Front page → Feature | none, livestream, video, event | **yes** | `HeroStage.tsx`; the event is picked in `server/src/routes/home.js` |
| Front page → Sections → Section | countdown, retreats, calendar, stats, timeline, connect, featured | **yes**, `FRONT_PAGE_SECTIONS` | `SECTIONS` in `src/pages/Home.tsx`; see [below](#front-page-section-names) |
| Front page → Stats → Number Source | manual, years_since, regions, … | **yes**, `STAT_SOURCES` | `STAT_QUERIES` in `server/src/routes/home.js`; see [below](#front-page-stat-sources) |
| Front page → Featured cards → Card type (Community blog section → Pinned community posts offers link and video only) | record, link, video | **yes**, `FEATURED_KINDS` | `FeaturedCards.tsx` (how each kind draws), `loadFeaturedCards` in `server/src/shape.js` |
@ -204,7 +204,7 @@ code):
| Timeline → Record; Featured cards → Record | `record_refs` | every event, organization, award, person and team, narrowed by the type picked beside it |
| Affiliations → Team | `teams` | teams, filtered to the chosen organization |
| Person awards → Award | `awards` | awards, labelled "Award (Organization)" |
| Person awards → Presented at; Front page → Count down to | `events` | events |
| Person awards → Presented at; Front page → Count down to; Front page → Featured event | `events` | events |
| Timeline → Record | `timeline_refs` | all five kinds, filtered by "Points at" |
---