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>
32 lines
1.4 KiB
TypeScript
32 lines
1.4 KiB
TypeScript
/* ═══════════════════════════════════════════════════════════════
|
|
FEATURED BAND
|
|
|
|
The front page's featured content: the cards from the admin's
|
|
Front page editor (Featured cards), under the section's heading.
|
|
The cards themselves are FeaturedCards, which the Community
|
|
blog will share. No cards, no band.
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
import FeaturedCards from '../../../components/FeaturedCards.tsx'
|
|
import type { FeaturedCard } from '../../../lib/useFrontPage.ts'
|
|
|
|
type FeaturedBandProps = {
|
|
id: string
|
|
title: string
|
|
blurb?: string | null
|
|
cards: FeaturedCard[]
|
|
}
|
|
|
|
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
|
return (
|
|
<section id={id} className="py-24" style={{ background: '#f6fbfc' }}>
|
|
<div className="mx-auto max-w-6xl px-6">
|
|
<h2 className="font-display text-4xl font-extrabold text-[#073d4a] md:text-5xl">{title}</h2>
|
|
{blurb && <p className="mt-4 max-w-2xl text-lg text-[#4a6b72]">{blurb}</p>}
|
|
<div className="mt-12">
|
|
<FeaturedCards cards={cards} />
|
|
</div>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|