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:
parent
29202f2eb1
commit
d6477b6d30
7 changed files with 187 additions and 11 deletions
|
|
@ -12,12 +12,13 @@
|
|||
|
||||
import { useRecord, type Resource } from './useRecord.ts'
|
||||
import type { EventSeries } from './eventSeries.ts'
|
||||
import type { Link } from './useContent.ts'
|
||||
|
||||
/** What fills the hero's background. */
|
||||
export type HeroBackdrop = 'brand' | 'photos'
|
||||
|
||||
/** What sits beside the words, over the backdrop. */
|
||||
export type HeroFeature = 'none' | 'livestream' | 'video'
|
||||
export type HeroFeature = 'none' | 'livestream' | 'video' | 'event'
|
||||
|
||||
/** The CHECK list on front_page_sections.section. */
|
||||
export type FrontPageSectionKey =
|
||||
|
|
@ -51,6 +52,8 @@ export type Hero = {
|
|||
livestream: { url: string; title?: string | null } | null
|
||||
/** A link to embed or a video file; see videoSource in embeds.ts. */
|
||||
video: { url: string; title?: string | null } | null
|
||||
/** With the 'event' feature: the pinned event, else the countdown's. */
|
||||
event: HeroEvent | null
|
||||
}
|
||||
|
||||
export type FrontPageSection = {
|
||||
|
|
@ -105,6 +108,14 @@ export type FeaturedCard = {
|
|||
image: { file: string; kind: string } | null
|
||||
}
|
||||
|
||||
/** The countdown's event plus what the hero's event card draws. */
|
||||
export type HeroEvent = CountdownEvent & {
|
||||
tagline?: string | null
|
||||
card_image?: string | null
|
||||
org_logo?: string | null
|
||||
links: Link[]
|
||||
}
|
||||
|
||||
export type FrontPage = {
|
||||
hero: Hero
|
||||
sections: FrontPageSection[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue