Add a Featured Content section to the front page

Front page → Featured cards (migration 030) holds cards of three
kinds: a record on the site, whose title, picture and link fill in
from the record; a link, with a Fetch preview button that reads the
page's title, description and preview image into the media library;
and a video, drawn as a thumbnail that loads the player when pressed.
A 'featured' section draws them.

The cards are shared: featured_cards is owned polymorphically and
FeaturedCards.tsx draws them, ready for the Community blog. Deleting
a record removes its cards; an unpublished record's card is hidden.

The preview fetch only goes to public http(s) addresses on standard
ports, pinned to the vetted IP, with each redirect checked again.

Along the way: repeater fields can show by another field's value (a
hidden one is cleared), a CHECK named as a sentence is shown as the
error, and the timeline's record list is now record_refs for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 15:56:29 -05:00
parent 960c854611
commit d4f65d93b4
17 changed files with 1140 additions and 50 deletions

View file

@ -48,6 +48,10 @@ export const heroVideo = inDir('/front-page')
so it can't share a per-entity directory. */
export const blockMedia = inDir('/media') // ⚠ guess
/* featured_cards.image, a card's own picture. Normally an upload
('/uploads/…'); a bare filename looks here. */
export const featuredImage = inDir('/featured')
/* ── By record kind ────────────────────────────────────────────
The timeline sends `logo: { file, kind }` rather than a path,
because v_timeline COALESCEs across five tables and only the
@ -64,6 +68,9 @@ const BY_KIND: Record<string, (file?: string | null) => string | null> = {
team: teamLogo,
award: awardLogo,
person: personPhoto,
// Featured cards (loadFeaturedCards in shape.js) add two of their own.
'event-background': eventBackground,
featured: featuredImage,
}
export function logoForKind(