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:
parent
960c854611
commit
d4f65d93b4
17 changed files with 1140 additions and 50 deletions
|
|
@ -33,11 +33,16 @@
|
|||
event" (National + Retreat skips a sooner regional class). Null
|
||||
means any. They don't apply to a pinned event: the admin chose
|
||||
that one by name.
|
||||
|
||||
── Featured ──
|
||||
The featured band's cards, record cards filled in from their
|
||||
records (loadFeaturedCards in shape.js, which the Community
|
||||
blog will share).
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { Hono } from "hono";
|
||||
|
||||
import { asBool, shapeSeries } from "../shape.js";
|
||||
import { asBool, loadFeaturedCards, shapeSeries } from "../shape.js";
|
||||
|
||||
const home = new Hono();
|
||||
|
||||
|
|
@ -200,6 +205,7 @@ home.get("/front-page", (c) => {
|
|||
sections,
|
||||
stats,
|
||||
paths,
|
||||
featured: loadFeaturedCards(db, "front_page", PAGE_ID),
|
||||
countdown: shapeCountdown(next),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue