Add a Schedule content block with day tabs
A schedule block's entries (migration 034) each have a day, time, title, detail, location, person and link, and fold out for a longer description, the person's photo and page, a graphic and a Google map of a place or address. Entries sit in one tab per day, in the order entered; the tab for today's weekday opens first, and a one-day schedule draws no tabs. In the editor, the entry fields show only under a schedule block: repeater `when` can now look at the parent row (scope "parent"), and a field's label can depend on the row. The block preview names an entry's person. The showcase retreat and post each have a schedule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d6477b6d30
commit
71a470b66f
10 changed files with 556 additions and 29 deletions
|
|
@ -19,6 +19,10 @@
|
|||
image media, alt, text is the caption, href
|
||||
video href is the video, media a still, text
|
||||
the caption; click to play
|
||||
schedule items as entries in day tabs (day, time,
|
||||
text, detail, url, location, person, and
|
||||
a fold-out of description, media, map);
|
||||
text is an optional intro. ScheduleBlock
|
||||
divider nothing
|
||||
|
||||
"Formatted" is InlineText.tsx: **bold**, *italic*, [text](url),
|
||||
|
|
@ -33,6 +37,7 @@ import { blockMedia } from '../lib/media.ts'
|
|||
import type { ContentBlock } from '../lib/useContent.ts'
|
||||
import { Anchor, Inline, Paragraphs } from './InlineText.tsx'
|
||||
import VideoPlayer from './VideoPlayer.tsx'
|
||||
import ScheduleBlock from './ScheduleBlock.tsx'
|
||||
|
||||
const BODY = '#4a6b72'
|
||||
|
||||
|
|
@ -196,6 +201,10 @@ function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
|||
</figure>
|
||||
)
|
||||
|
||||
case 'schedule':
|
||||
if (!block.items?.length) return null
|
||||
return <ScheduleBlock items={block.items} intro={block.text} accent={accent} />
|
||||
|
||||
case 'divider':
|
||||
return <hr className="border-0 h-px" style={{ background: accent, opacity: 0.3 }} />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue