Schedule: entry types, picked times, striped rows, blocks in the presentation

Entries get a type (normal, block, break, heading) and a Featured tick.
Times are picked (start, optional end) and shown as 7:00pm or 9:00 to
10:30am; the typed time stays as the override, so existing entries look
the same. A block holds sub-items (content_block_subitems, migration 086),
each with every entry field. Rows alternate a faint tint. The presentation
gets a Blocks slide (its own seconds) before each sub-item's spotlight,
and sub-items get their own checkboxes on the setup page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-02 23:15:53 -06:00
parent 274ffc26e0
commit 7885d10249
9 changed files with 603 additions and 120 deletions

View file

@ -18,6 +18,14 @@
the place typed in, with a link out to the full map; an entry's
own map image (069) shows instead, the link out kept.
An entry's kind (086): a normal entry; a block, its sub-items
listed under it, each a row of its own with its own fold-out; a
break (a meal, free time), a quieter row with no fold-out; or a
heading across the day. A featured entry stands out in the
accent, with a star. Rows alternate a faint tint, for reading
across. The time shown is `time`, which the API has already made
from the picked times or the typed override.
On an event page a Present button opens the schedule as a
slideshow for a screen (SchedulePresent.tsx).
@ -28,7 +36,7 @@
it, no map frame (ReadingSchedule).
═══════════════════════════════════════════════════════════════ */
import { CaretDown, Presentation } from '@phosphor-icons/react'
import { CaretDown, Presentation, Star } from '@phosphor-icons/react'
import { Fragment, useId, useState, type KeyboardEvent, type ReactNode } from 'react'
import { Link } from 'react-router-dom'
@ -93,7 +101,24 @@ export function Avatar({ person, size }: { person: NonNullable<ContentBlockItem[
)
}
function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
/* A featured entry's star, read as a word by a screen reader. */
export function FeaturedStar({ className = 'h-4 w-4' }: { className?: string }) {
return (
<>
<Star aria-hidden="true" weight="fill" className={`inline shrink-0 ${className}`} />
<span className="sr-only">Featured: </span>
</>
)
}
/* A featured row's look: a faint wash of the accent and a bar down
its left edge. */
export const featuredStyle = (accent: string) => ({
background: withAlpha(accent, 10),
boxShadow: `inset 4px 0 0 ${accent}`,
})
function Entry({ entry, accent, sub = false }: { entry: ContentBlockItem; accent: string; sub?: boolean }) {
const [open, setOpen] = useState(false)
// Google's map loads only when asked for (Privacy page).
const [showMap, setShowMap] = useState(false)
@ -101,7 +126,23 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
const graphic = mediaUrl(entry.media)
const place = entry.map?.trim()
const mapImage = mediaUrl(entry.map_image)
const more = Boolean(entry.description || graphic || place || mapImage || entry.person)
const quiet = entry.kind === 'break'
const more = !quiet && Boolean(entry.description || graphic || place || mapImage || entry.person)
if (entry.kind === 'heading') {
return (
<li className="border-b border-brand/10 px-5 pt-6 pb-2 last:border-b-0">
<p className="text-sm font-bold uppercase tracking-wide" style={{ color: accentText(accent) }}>
{entry.text}
</p>
{entry.detail && (
<p className="mt-1 text-sm" style={{ color: BODY }}>
{entry.detail}
</p>
)}
</li>
)
}
const title = entry.url ? (
<Anchor href={entry.url} className="underline-offset-2 hover:underline" style={{ color: accentText(accent) }}>
@ -112,16 +153,33 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
)
return (
<li className="border-b border-brand/10 last:border-b-0">
<li
className={sub ? 'pl-4' : 'border-b border-brand/10 px-5 last:border-b-0 even:bg-tint-soft/60'}
style={entry.featured ? featuredStyle(accent) : undefined}
>
{/* On a phone the time sits on its own line above the entry,
leaving the title the full width. */}
<div className="flex flex-wrap gap-x-4 gap-y-1 py-4 sm:flex-nowrap sm:gap-6">
<p className="w-full shrink-0 pt-0.5 text-sm font-semibold sm:w-32" style={{ color: accentText(accent) }}>
<div
className={`flex flex-wrap gap-x-4 gap-y-1 sm:flex-nowrap ${quiet || sub ? 'py-2.5' : 'py-4'} ${
sub ? 'sm:gap-4' : 'sm:gap-6'
}`}
>
<p
className={`w-full shrink-0 pt-0.5 text-sm font-semibold ${sub ? 'sm:w-28' : 'sm:w-32'}`}
style={{ color: quiet ? BODY : accentText(accent) }}
>
{entry.time}
</p>
<div className="min-w-0 flex-1">
<p className="font-semibold text-body">{title}</p>
<p className={quiet ? 'text-muted' : 'font-semibold text-body'}>
{entry.featured && (
<span className="mr-1.5" style={{ color: accentText(accent) }}>
<FeaturedStar className="h-4 w-4 -translate-y-px" />
</span>
)}
{title}
</p>
{(entry.location || entry.person) && (
<p className="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm" style={{ color: BODY }}>
{entry.location && <span>{entry.location}</span>}
@ -160,7 +218,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
</div>
{more && open && (
<div id={panelId} className="mb-5 space-y-5 bg-tint-soft p-5 sm:ml-38">
<div id={panelId} className={`mb-5 space-y-5 bg-tint-soft p-5 ${sub ? 'sm:ml-32' : 'sm:ml-38'}`}>
{entry.person && (
<div className="flex items-center gap-4">
<Avatar person={entry.person} size="h-16 w-16" />
@ -228,6 +286,64 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
)}
</div>
)}
{/* A block's sub-items, under its title. */}
{entry.kind === 'block' && entry.items?.length ? (
<ul className="mb-4 sm:ml-38" style={{ borderLeft: `2px solid ${withAlpha(accent, 33)}` }}>
{entry.items.map((item, index) => (
<Entry key={index} entry={item} accent={accent} sub />
))}
</ul>
) : null}
</li>
)
}
/* One entry in reading mode, a block's sub-items in a list under it. */
function readingEntry(entry: ContentBlockItem, accent: string, key: number): ReactNode {
if (entry.kind === 'heading') {
return (
<li key={key}>
<p>
<strong>{entry.text}</strong>
</p>
{entry.detail && <p>{entry.detail}</p>}
</li>
)
}
const graphic = mediaUrl(entry.media)
const place = entry.map?.trim()
const mapImage = mediaUrl(entry.map_image)
const parts: ReactNode[] = [
entry.time,
entry.url ? <Anchor href={entry.url}>{entry.text}</Anchor> : entry.text,
entry.location,
entry.person && <Link to={personHref(entry.person.id)}>{entry.person.name}</Link>,
].filter(Boolean)
return (
<li key={key}>
<p>
{entry.featured && 'Featured: '}
{parts.map((part, j) => (
<Fragment key={j}>
{j > 0 && ' · '}
{part}
</Fragment>
))}
</p>
{entry.detail && <p>{entry.detail}</p>}
{entry.person?.tagline && <p>{entry.person.tagline}</p>}
{entry.description && <Paragraphs text={entry.description} accent={accent} />}
{graphic && <img src={graphic} alt={entry.media_alt ?? ''} />}
{mapImage && <img src={mapImage} alt={mapAlt(entry)} />}
{place && (
<p>
<a href={mapLink(place)}>Open {place} in Google Maps</a>
</p>
)}
{entry.kind === 'block' && entry.items?.length ? (
<ul>{entry.items.map((item, i) => readingEntry(item, accent, i))}</ul>
) : null}
</li>
)
}
@ -241,41 +357,7 @@ function ReadingSchedule({ days, intro, accent }: { days: Day[]; intro?: string
{days.map((day, index) => (
<div key={day.name || index}>
{days.length > 1 && <h4>{day.name || 'Schedule'}</h4>}
<ul>
{day.entries.map((entry, i) => {
const graphic = mediaUrl(entry.media)
const place = entry.map?.trim()
const mapImage = mediaUrl(entry.map_image)
const parts: ReactNode[] = [
entry.time,
entry.url ? <Anchor href={entry.url}>{entry.text}</Anchor> : entry.text,
entry.location,
entry.person && <Link to={personHref(entry.person.id)}>{entry.person.name}</Link>,
].filter(Boolean)
return (
<li key={i}>
<p>
{parts.map((part, j) => (
<Fragment key={j}>
{j > 0 && ' · '}
{part}
</Fragment>
))}
</p>
{entry.detail && <p>{entry.detail}</p>}
{entry.person?.tagline && <p>{entry.person.tagline}</p>}
{entry.description && <Paragraphs text={entry.description} accent={accent} />}
{graphic && <img src={graphic} alt={entry.media_alt ?? ''} />}
{mapImage && <img src={mapImage} alt={mapAlt(entry)} />}
{place && (
<p>
<a href={mapLink(place)}>Open {place} in Google Maps</a>
</p>
)}
</li>
)
})}
</ul>
<ul>{day.entries.map((entry, i) => readingEntry(entry, accent, i))}</ul>
</div>
))}
</div>
@ -374,7 +456,7 @@ export default function ScheduleBlock({
id={`${baseId}-panel`}
role={days.length > 1 ? 'tabpanel' : undefined}
aria-labelledby={days.length > 1 ? `${baseId}-tab-${days.indexOf(current)}` : undefined}
className="border border-brand/15 bg-surface px-5"
className="border border-brand/15 bg-surface"
>
{current.entries.map((entry, index) => (
<Entry key={`${current.name}-${index}`} entry={entry} accent={accent} />

View file

@ -314,6 +314,23 @@ export const BLOCK_TYPES = [
/* An item field that only a schedule's entries have. */
export const SCHEDULE_ENTRY = { scope: "parent", path: "type", value: "schedule" };
/* A schedule entry's kinds (086); blank is a normal entry. */
export const SCHEDULE_KINDS = [
["block", "Block, with sub-items"],
["break", "Break or meal"],
["heading", "Heading"],
];
/* Picked times and the typed override, on an entry and a sub-item. */
const scheduleTimeFields = (when?: any) => [
{ path: "start_time", label: "Starts", widget: "time", when },
{ path: "end_time", label: "Ends", widget: "time", help: "Optional", when },
{
path: "time",
label: "Display as",
help: "Default: the times picked, eg. 7:00pm or 9:00 to 10:30am. Type here to show something else, eg. After dinner.",
when,
},
];
/* Item fields for a link card, and for every other kind of item. */
export const CARD_ITEM = { scope: "parent", path: "type", value: "cards" };
export const NOT_CARD_ITEM = { scope: "parent", path: "type", value: ["list", "links", "schedule"] };
@ -385,6 +402,43 @@ export const wordFields = (prefix: string, label: string, when?: any) => [
{ path: `${prefix}word_seconds`, label: label ? `${label}seconds per word` : "Seconds per word", widget: "number", help: "1 to 20. Default: the site's", when },
];
/* A block entry's sub-item (086): an entry's fields, under its
block's day. */
const SUB_ITEM_FIELDS = [
...scheduleTimeFields(),
{ path: "text", label: "Title", required: true },
{ path: "location", label: "Location", help: "eg. Room B" },
{
path: "person_id",
label: "Person",
widget: "select",
optionsFrom: "people",
blankLabel: "Default: none",
help: "Who hosts or speaks: shown with their photo, linked to their page",
},
{ path: "detail", label: "Detail", help: "A line under the title" },
{ path: "url", label: "URL", help: "Optional: makes the title a link", files: true },
{ path: "description", label: "More", widget: "textarea", full: true, help: "Shown when it's folded out. " + FORMATTING_HELP },
{ path: "media", label: "Graphic", widget: "image", crop: "free", resolve: mediaUrl, full: true, help: "Optional, in the fold-out" },
{
path: "media_alt",
label: "Graphic description",
full: true,
help: "For screen readers: what the graphic shows. Default: skipped as decoration.",
},
{ path: "map", label: "Map", full: true, help: "Optional: a place or address for a Google map" },
{
path: "map_image",
label: "Map image",
widget: "image",
crop: "free",
resolve: mediaUrl,
full: true,
help: "Optional: your own map, shown in place of the Google map and as a slide when presented",
},
{ path: "featured", label: "Featured", widget: "checkbox", help: "Makes it stand out" },
];
export const blocksChild = {
key: "content_blocks",
label: "Content blocks",
@ -488,16 +542,25 @@ export const blocksChild = {
label: "Items",
addLabel: "Add item",
when: { path: "type", value: ["list", "links", "schedule", "cards", "people"] },
title: (row) => [row.day, row.time, row.text].filter(Boolean).join(" · ") || "New item",
title: (row) => [row.day, row.time || row.start_time, row.text].filter(Boolean).join(" · ") || "New item",
blank: { text: "" },
fields: [
{
path: "kind",
label: "Type",
widget: "select",
options: SCHEDULE_KINDS,
blankLabel: "Default: Normal entry",
help: "A block holds several things in one time frame, each a sub-item with its own time. A break is a quieter row (a meal, free time). A heading labels part of the day, eg. Evening sessions.",
when: SCHEDULE_ENTRY,
},
{
path: "day",
label: "Day",
help: "The tab it's under, eg. Friday. Entries with the same day share a tab, in this order.",
when: SCHEDULE_ENTRY,
},
{ path: "time", label: "Time", help: "eg. 7:00pm, or 9:00 to 10:30am", when: SCHEDULE_ENTRY },
...scheduleTimeFields(SCHEDULE_ENTRY),
// A card: the link first, so Fetch preview can fill the rest.
{
path: "url",
@ -589,6 +652,18 @@ export const blocksChild = {
help: "Optional: your own map, eg. the camp with the room marked. Shown in the fold-out in place of the Google map (which stays a link), and as a slide when the schedule is presented.",
when: SCHEDULE_ENTRY,
},
{ path: "featured", label: "Featured", widget: "checkbox", help: "Makes the row stand out", when: SCHEDULE_ENTRY },
],
children: [
{
key: "items",
label: "Sub-items",
addLabel: "Add sub-item",
when: { path: "kind", value: "block" },
title: (row) => [row.time || row.start_time, row.text].filter(Boolean).join(" · ") || "New sub-item",
blank: { text: "" },
fields: SUB_ITEM_FIELDS,
},
],
},
],

View file

@ -74,6 +74,14 @@ export type ContentBlockItem = {
/** The entry's own map picture (069), shown in place of Google's. */
map_image?: string | null
person?: { id: string; name: string; photo?: string | null; tagline?: string | null } | null
/** A schedule entry's kind (086); sub-items have none. */
kind?: 'entry' | 'block' | 'break' | 'heading'
/** Picked times, HH:MM; `time` is already what to show. */
start_time?: string | null
end_time?: string | null
featured?: boolean
/** A block entry's sub-items. */
items?: ContentBlockItem[]
}
export type Link = {

View file

@ -13,8 +13,13 @@
The slides, for each day picked, in order:
overview the day's picked entries on one slide
spotlight one entry: its person beside title, time and place
block a block entry (086) and its sub-items on one slide,
in place of its spotlight; then each sub-item gets
the spotlight, graphic and map slides an entry does
graphic an entry's graphic, full screen
map an entry's own map image (069), full screen
A heading (086) is only a line on the overview; a break gets no
spotlight.
Keys while playing: arrows step, Space pauses, Escape leaves full
screen (the browser's), S goes back to the setup.
@ -25,11 +30,11 @@ import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
import { useParams, useSearchParams } from 'react-router-dom'
import PageState from '../components/PageState.tsx'
import { Avatar, groupByDay, mapAlt, type Day } from '../components/ScheduleBlock.tsx'
import { Avatar, FeaturedStar, featuredStyle, groupByDay, mapAlt, type Day } from '../components/ScheduleBlock.tsx'
import { Paragraphs } from '../components/InlineText.tsx'
import { useEvent, type ContentBlockItem } from '../lib/useContent.ts'
import { mediaUrl } from '../lib/media.ts'
import { BRAND, accentText, readableOn } from '../lib/color.ts'
import { BRAND, accentText, readableOn, withAlpha } from '../lib/color.ts'
import { documentTitle } from '../lib/site.ts'
import './SchedulePresent.css'
@ -37,6 +42,7 @@ import './SchedulePresent.css'
const KINDS = [
{ key: 'overview', label: 'Day overview', help: 'The whole day on one slide', seconds: 20 },
{ key: 'spotlight', label: 'Entry spotlight', help: 'One entry at a time, with its person', seconds: 12 },
{ key: 'block', label: 'Blocks', help: 'A block and the things in it, before each gets a spotlight', seconds: 15 },
{ key: 'graphic', label: 'Graphics', help: "An entry's graphic, full screen", seconds: 10 },
{ key: 'map', label: 'Map images', help: "An entry's own map, full screen", seconds: 10 },
] as const
@ -47,10 +53,15 @@ const ONE_COLUMN = 8
/* How long the controls stay up after the pointer last moved (ms). */
const CONTROLS_FOR = 2500
type Slide = { kind: Kind; seconds: number; day: Day; entry?: ContentBlockItem }
/* `parent` is a sub-item's block. */
type Slide = { kind: Kind; seconds: number; day: Day; entry?: ContentBlockItem; parent?: ContentBlockItem }
/* An entry's key in the address: day index, a dot, entry index. */
const entryKey = (day: number, entry: number) => `${day}.${entry}`
/* An entry's key in the address: day index, a dot, entry index, and
for a sub-item another dot and its index. */
const entryKey = (...at: number[]) => at.join('.')
/* Lines on an overview: entries and sub-items. */
const lineCount = (entries: ContentBlockItem[]) =>
entries.reduce((n, entry) => n + 1 + (entry.kind === 'block' ? (entry.items?.length ?? 0) : 0), 0)
const list = (value: string | null) => (value ? value.split(',').filter(Boolean) : null)
function readSettings(params: URLSearchParams, days: Day[]) {
@ -70,13 +81,32 @@ function buildSlides(days: Day[], { pickedDays, hidden, seconds }: Settings): Sl
const slides: Slide[] = []
days.forEach((all, d) => {
if (!pickedDays.has(d)) return
const day = { ...all, entries: all.entries.filter((_, e) => !hidden.has(entryKey(d, e))) }
if (day.entries.length === 0) return
const entries = all.entries.flatMap((entry, e) => {
if (hidden.has(entryKey(d, e))) return []
if (entry.kind !== 'block') return [entry]
return [{ ...entry, items: (entry.items ?? []).filter((_, i) => !hidden.has(entryKey(d, e, i))) }]
})
if (entries.length === 0) return
const day = { ...all, entries }
if (seconds.overview) slides.push({ kind: 'overview', seconds: seconds.overview, day })
for (const entry of day.entries) {
if (seconds.spotlight) slides.push({ kind: 'spotlight', seconds: seconds.spotlight, day, entry })
if (seconds.graphic && entry.media) slides.push({ kind: 'graphic', seconds: seconds.graphic, day, entry })
if (seconds.map && entry.map_image) slides.push({ kind: 'map', seconds: seconds.map, day, entry })
const media = (entry: ContentBlockItem, parent?: ContentBlockItem) => {
if (seconds.graphic && entry.media) slides.push({ kind: 'graphic', seconds: seconds.graphic, day, entry, parent })
if (seconds.map && entry.map_image) slides.push({ kind: 'map', seconds: seconds.map, day, entry, parent })
}
for (const entry of entries) {
if (entry.kind === 'heading') continue
if (entry.kind === 'block') {
if (seconds.block) slides.push({ kind: 'block', seconds: seconds.block, day, entry })
media(entry)
for (const item of entry.items ?? []) {
if (seconds.spotlight) slides.push({ kind: 'spotlight', seconds: seconds.spotlight, day, entry: item, parent: entry })
media(item, entry)
}
continue
}
if (seconds.spotlight && entry.kind !== 'break') slides.push({ kind: 'spotlight', seconds: seconds.spotlight, day, entry })
media(entry)
}
})
return slides
@ -243,16 +273,26 @@ function Setup({
<ul className="mt-3 space-y-2 pl-7">
{day.entries.map((entry, e) => (
<li key={e}>
<label className={`flex items-baseline gap-3 ${pickedDays.has(d) ? '' : 'opacity-50'}`}>
<input
type="checkbox"
disabled={!pickedDays.has(d)}
checked={!hidden.has(entryKey(d, e))}
onChange={() => setHidden(toggle(hidden, entryKey(d, e)))}
/>
<span className="w-32 shrink-0 text-sm text-muted">{entry.time}</span>
<span>{entry.text}</span>
</label>
<PickEntry
entry={entry}
enabled={pickedDays.has(d)}
checked={!hidden.has(entryKey(d, e))}
onToggle={() => setHidden(toggle(hidden, entryKey(d, e)))}
/>
{entry.kind === 'block' && entry.items?.length ? (
<ul className="mt-2 space-y-2 pl-7">
{entry.items.map((item, i) => (
<li key={i}>
<PickEntry
entry={item}
enabled={pickedDays.has(d) && !hidden.has(entryKey(d, e))}
checked={!hidden.has(entryKey(d, e, i))}
onToggle={() => setHidden(toggle(hidden, entryKey(d, e, i)))}
/>
</li>
))}
</ul>
) : null}
</li>
))}
</ul>
@ -284,6 +324,38 @@ function Setup({
)
}
/* One entry's checkbox on the setup screen, its kind beside it. */
const KIND_NOTE = { block: 'Block', break: 'Break', heading: 'Heading' } as const
function PickEntry({
entry,
enabled,
checked,
onToggle,
}: {
entry: ContentBlockItem
enabled: boolean
checked: boolean
onToggle: () => void
}) {
const note = entry.kind && entry.kind !== 'entry' ? KIND_NOTE[entry.kind] : null
return (
<label className={`flex items-baseline gap-3 ${enabled ? '' : 'opacity-50'}`}>
<input type="checkbox" disabled={!enabled} checked={checked} onChange={onToggle} />
<span className="w-32 shrink-0 text-sm text-muted">{entry.time}</span>
<span className={entry.kind === 'heading' ? 'font-semibold' : ''}>
{entry.featured && (
<span className="mr-1 text-link">
<FeaturedStar />
</span>
)}
{entry.text}
</span>
{note && <span className="text-xs text-muted">{note}</span>}
</label>
)
}
/* ── Player ─────────────────────────────────────────────────── */
function Player({
@ -444,12 +516,60 @@ function Rise({ order = 0, from = 'below', className = '', children }: {
)
}
/* One line of the day overview: an entry, or (`sub`) one of a
block's sub-items under it. A heading is a label; a break is
quieter. */
function OverviewLine({ entry, accent, sub = false }: { entry: ContentBlockItem; accent: string; sub?: boolean }) {
const color = accentText(accent)
if (entry.kind === 'heading') {
return (
<p
className="px-[1vw] pt-[2vh] pb-[0.6vh] text-[clamp(0.9rem,1.5vw,2rem)] font-bold uppercase tracking-wide"
style={{ color }}
>
{entry.text}
</p>
)
}
const quiet = entry.kind === 'break'
return (
<div className={`flex items-baseline gap-[2vw] px-[1vw] ${sub ? 'py-[0.6vh]' : 'border-b border-brand/15 py-[1.2vh]'}`}>
<span
className={`shrink-0 font-semibold ${sub ? 'w-[10vw] text-[clamp(0.9rem,1.4vw,1.9rem)]' : 'w-[12vw] text-[clamp(1rem,1.8vw,2.4rem)]'}`}
style={{ color: quiet ? undefined : color }}
>
{entry.time}
</span>
<span className="min-w-0 flex-1">
<span
className={`block leading-tight ${
quiet ? 'font-semibold text-muted' : 'font-bold text-ink'
} ${sub ? 'text-[clamp(1rem,1.9vw,2.4rem)]' : 'text-[clamp(1.2rem,2.4vw,3rem)]'}`}
>
{entry.featured && (
<span className="mr-[0.6vw]" style={{ color }}>
<FeaturedStar className="h-[0.8em] w-[0.8em]" />
</span>
)}
{entry.text}
</span>
{(entry.location || entry.person) && (
<span className="mt-1 flex flex-wrap items-center gap-x-[1.5vw] text-[clamp(0.9rem,1.4vw,1.8rem)] text-muted">
{entry.location && <span>{entry.location}</span>}
{entry.person && <span>{entry.person.name}</span>}
</span>
)}
</span>
</div>
)
}
function SlideView({ slide, accent }: { slide: Slide; accent: string }) {
const color = accentText(accent)
if (slide.kind === 'overview') {
const entries = slide.day.entries
const two = entries.length > ONE_COLUMN
const two = lineCount(entries) > ONE_COLUMN
return (
<div className="flex h-full flex-col">
<Rise>
@ -459,22 +579,18 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) {
</Rise>
<ul className={`grid min-h-0 flex-1 content-start gap-x-[4vw] ${two ? 'grid-cols-2' : 'grid-cols-1'}`}>
{entries.map((entry, i) => (
<li key={i}>
<Rise order={i + 1} from="left" className="flex items-baseline gap-[2vw] border-b border-brand/15 py-[1.2vh]">
<span className="w-[12vw] shrink-0 text-[clamp(1rem,1.8vw,2.4rem)] font-semibold" style={{ color }}>
{entry.time}
</span>
<span className="min-w-0 flex-1">
<span className="block text-[clamp(1.2rem,2.4vw,3rem)] font-bold leading-tight text-ink">
{entry.text}
</span>
{(entry.location || entry.person) && (
<span className="mt-1 flex flex-wrap items-center gap-x-[1.5vw] text-[clamp(0.9rem,1.4vw,1.8rem)] text-muted">
{entry.location && <span>{entry.location}</span>}
{entry.person && <span>{entry.person.name}</span>}
</span>
)}
</span>
<li key={i} className="even:bg-tint-soft/60" style={entry.featured ? featuredStyle(accent) : undefined}>
<Rise order={i + 1} from="left">
<OverviewLine entry={entry} accent={accent} />
{entry.kind === 'block' && entry.items?.length ? (
<ul className="ml-[14vw] pb-[1vh]">
{entry.items.map((item, j) => (
<li key={j} style={item.featured ? featuredStyle(accent) : undefined}>
<OverviewLine entry={item} accent={accent} sub />
</li>
))}
</ul>
) : null}
</Rise>
</li>
))}
@ -485,6 +601,70 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) {
const entry = slide.entry!
if (slide.kind === 'block') {
const items = entry.items ?? []
return (
<div className="flex h-full flex-col">
<Rise>
<p className="text-[clamp(1.2rem,2.4vw,3rem)] font-semibold" style={{ color }}>
{[slide.day.name, entry.time].filter(Boolean).join(' · ')}
</p>
</Rise>
<Rise order={1}>
<h1 className="mt-[1vh] text-[clamp(2.4rem,5vw,6.5rem)] font-bold leading-[1.05] text-ink">
{entry.featured && (
<span className="mr-[1vw]" style={{ color }}>
<FeaturedStar className="h-[0.8em] w-[0.8em]" />
</span>
)}
{entry.text}
</h1>
</Rise>
{(entry.location || entry.person || entry.detail) && (
<Rise order={2}>
<p className="mt-[1vh] flex flex-wrap gap-x-[2vw] text-[clamp(1.1rem,2vw,2.6rem)] text-muted">
{[entry.location, entry.person?.name, entry.detail].filter(Boolean).map((part, i) => (
<span key={i}>{part}</span>
))}
</p>
</Rise>
)}
<ul className="mt-[4vh] min-h-0 flex-1" style={{ borderLeft: `0.4vw solid ${withAlpha(accent, 40)}` }}>
{items.map((item, i) => (
<li key={i} className="even:bg-tint-soft/60" style={item.featured ? featuredStyle(accent) : undefined}>
<Rise order={i + 3} from="left" className="flex items-center gap-[2vw] px-[2vw] py-[1.6vh]">
<span className="w-[14vw] shrink-0 text-[clamp(1rem,2vw,2.6rem)] font-semibold" style={{ color }}>
{item.time}
</span>
<span className="min-w-0 flex-1">
<span className="block text-[clamp(1.3rem,2.8vw,3.6rem)] font-bold leading-tight text-ink">
{item.featured && (
<span className="mr-[0.6vw]" style={{ color }}>
<FeaturedStar className="h-[0.8em] w-[0.8em]" />
</span>
)}
{item.text}
</span>
{(item.location || item.detail) && (
<span className="mt-1 block text-[clamp(0.9rem,1.6vw,2rem)] text-muted">
{[item.location, item.detail].filter(Boolean).join(' · ')}
</span>
)}
</span>
{item.person && (
<span className="flex shrink-0 items-center gap-[1vw] text-[clamp(0.9rem,1.6vw,2rem)] text-body">
<Avatar person={item.person} size="h-[5vw] w-[5vw] text-[1.4vw]" />
{item.person.name}
</span>
)}
</Rise>
</li>
))}
</ul>
</div>
)
}
if (slide.kind === 'graphic' || slide.kind === 'map') {
const src = mediaUrl(slide.kind === 'map' ? entry.map_image : entry.media)
const alt = slide.kind === 'map' ? mapAlt(entry) : (entry.media_alt ?? '')
@ -521,11 +701,18 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) {
<div className="min-w-0 flex-1">
<Rise from="right">
<p className="text-[clamp(1.2rem,2.4vw,3rem)] font-semibold" style={{ color }}>
{[slide.day.name, entry.time].filter(Boolean).join(' · ')}
{[slide.day.name, slide.parent?.text, entry.time].filter(Boolean).join(' · ')}
</p>
</Rise>
<Rise order={1} from="right">
<h1 className="mt-[1vh] text-[clamp(2.4rem,5.5vw,7rem)] font-bold leading-[1.05] text-ink">{entry.text}</h1>
<h1 className="mt-[1vh] text-[clamp(2.4rem,5.5vw,7rem)] font-bold leading-[1.05] text-ink">
{entry.featured && (
<span className="mr-[1vw]" style={{ color }}>
<FeaturedStar className="h-[0.8em] w-[0.8em]" />
</span>
)}
{entry.text}
</h1>
</Rise>
{entry.location && (
<Rise order={2} from="right">