From d58f630a8f85851ceae03ab6bd316daa9fadcb46 Mon Sep 17 00:00:00 2001 From: Zaldimmar Date: Thu, 12 Nov 2026 05:20:42 -0600 Subject: [PATCH] Present: events picked on the setup screen, a titles list slide, people centered - Setup, per events block: which events, and what's shown (list slide, picture, type and date, presenter, page content) - An events block's list slide: titles and presenters as rows, not cards - A slide of only people: title and photos centered both ways Co-Authored-By: Claude Opus 5.5 --- src/pages/EventPresent.tsx | 157 +++++++++++++++++++++++++++---------- 1 file changed, 116 insertions(+), 41 deletions(-) diff --git a/src/pages/EventPresent.tsx b/src/pages/EventPresent.tsx index 55d8194..1901052 100644 --- a/src/pages/EventPresent.tsx +++ b/src/pages/EventPresent.tsx @@ -13,9 +13,14 @@ schedule each schedule block's slides (below) venue each map block (088): the map with its locations place then the map once per marked location, it lit up - cards each events block (088): its events on one slide - event then each event alone: picture, title, its person - host and its own page's blocks (else its card text) + cards each events block (088): its events' titles and + presenters on one slide + event then each event alone: picture, type and date, + title, its presenter and its own page's blocks (else + its card text) + The setup picks, per events block, which events (`hide` + e
..) and what is shown (EVENT_PARTS, `hide` + e
.:). list a list block picked for an Overview slide: its items' text, centered item then, picked for A slide per item, each item: its @@ -118,7 +123,7 @@ const KINDS = [ { key: 'tag', label: 'Tag slides', help: "Each schedule tag and everything it's on, after the days", seconds: 15 }, { key: 'venue', label: 'Maps', help: "A map block: the venue's map with its locations", seconds: 15 }, { key: 'place', label: 'Map locations', help: 'The map again for each location, it lit up', seconds: 8 }, - { key: 'cards', label: 'Event lists', help: "An events block's events on one slide", seconds: 15 }, + { key: 'cards', label: 'Event lists', help: "An events block's titles and presenters on one slide", seconds: 15 }, { key: 'event', label: 'Event spotlight', help: 'Each event of an events block alone', seconds: 12 }, { key: 'list', label: 'List overview', help: "A list block's items on one slide, without their detail", seconds: 12 }, { key: 'item', label: 'List items', help: 'Each list item alone, its detail under it', seconds: 10 }, @@ -132,6 +137,20 @@ const OWN_SLIDES = new Map([ ['map', 'Map'], ['events', 'Events'], ]) +/* What an events block's slides can show, each ticked off in `hide` + by eventKey. */ +const EVENT_PARTS = [ + ['overview', 'List slide'], + ['picture', 'Picture'], + ['line', 'Type and date'], + ['person', 'Presenter'], + ['content', 'Its page content'], +] as const +type EventPart = (typeof EVENT_PARTS)[number][0] +/* An events block's event (by number) or part (by name) in `hide`. */ +const eventKey = (s: number, b: number, at: number | EventPart) => + typeof at === 'number' ? `e${s}.${b}.${at}` : `e${s}.${b}:${at}` + /* A list's picks in `lists`: its Overview slide, A slide per item. */ const overviewKey = (s: number, b: number) => `o${s}.${b}` const itemsKey = (s: number, b: number) => `i${s}.${b}` @@ -196,6 +215,8 @@ type Slide = { only?: string[] noList?: boolean noDetails?: boolean + /* An events block's parts ticked off on the setup screen. */ + off?: Set } /* A part of the page: a heading (`headed`, else the event's title) @@ -363,10 +384,13 @@ function buildSlides(sections: Section[], schedules: Map } } if (block.type === 'events') { - const items = (block.items ?? []).filter((item) => item.event) - if (seconds.cards && items.length) slides.push({ id: `c${at}`, kind: 'cards', seconds: seconds.cards, label, items }) + const off = new Set(EVENT_PARTS.map(([part]) => part).filter((part) => hidden.has(eventKey(s, b, part)))) + const items = (block.items ?? []).flatMap((item, i) => (item.event && !hidden.has(eventKey(s, b, i)) ? [{ item, i }] : [])) + if (seconds.cards && items.length && !off.has('overview')) { + slides.push({ id: `c${at}`, kind: 'cards', seconds: seconds.cards, label, title: title ?? undefined, items: items.map(({ item }) => item), off }) + } if (seconds.event) { - items.forEach((entry, i) => slides.push({ id: `e${at}.${i}`, kind: 'event', seconds: seconds.event, label, entry })) + for (const { item, i } of items) slides.push({ id: `e${at}.${i}`, kind: 'event', seconds: seconds.event, label, entry: item, off }) } } }) @@ -734,6 +758,42 @@ function Setup({ ) } + // An events block: what's shown, then which events. + if (block.type === 'events') { + const events = (block.items ?? []).flatMap((item, i) => (item.event ? [{ item, i }] : [])) + if (!events.length) return null + const name = (item: ContentBlockItem) => item.text || item.event!.title + return ( +
+

+ Events: {preview(events.map(({ item }) => name(item)).join(', '), 60)} +

+
+ {EVENT_PARTS.map(([part, partLabel]) => ( + setHidden(toggle(hidden, eventKey(s, b, part)))} + /> + ))} +
+
    + {events.map(({ item, i }) => ( +
  • + setHidden(toggle(hidden, eventKey(s, b, i)))} + /> +
  • + ))} +
+
+ ) + } const schedule = schedules.get(block) if (!schedule) return null const { n, days } = schedule @@ -1317,6 +1377,22 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) { // The page's own blocks, zoomed up from the page's size. The // zoom is inside Scroll, so it measures what the screen shows. const zoom = Math.max(1, window.innerWidth / TEXT_WIDTH) + // Only people: the title and their photos in the middle of the + // slide, both ways. + if (slide.blocks!.every((block) => block.type === 'people' || FILLER.has(block.type))) { + return ( +
+ + {slide.label} + +
+ +
+
+
+
+ ) + } return (
{slide.label} @@ -1409,35 +1485,30 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) { } if (slide.kind === 'cards') { + // The events' titles, each with its presenter, as rows. const items = slide.items ?? [] + const off = slide.off ?? new Set() return (
{slide.title ?? slide.label} -
    4 ? 'grid-cols-3' : 'grid-cols-2'}`}> - {items.map((item, i) => { - const image = mediaUrl(item.event!.image) - return ( -
  • - - {image && } -
    - {eventLine(item.event!) && ( -

    - {eventLine(item.event!)} -

    - )} -

    - {item.text || item.event!.title} -

    - {item.person && ( -

    {item.person.name}

    - )} -
    -
    -
  • - ) - })} +
      ONE_COLUMN ? 'grid-cols-2' : 'grid-cols-1'}`}> + {items.map((item, i) => ( +
    • + + + {item.text || item.event!.title} + + {item.person && !off.has('person') && ( + {item.person.name} + )} + +
    • + ))}
@@ -1491,11 +1562,15 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) { if (slide.kind === 'event') { const event = entry.event! - const image = mediaUrl(event.image) - const blurb = entry.detail || event.blurb + // What the setup left on (EVENT_PARTS). + const off = slide.off ?? new Set() + const image = off.has('picture') ? null : mediaUrl(event.image) + const line = off.has('line') ? null : eventLine(event) + const person = off.has('person') ? null : entry.person + const blurb = off.has('content') ? null : entry.detail || event.blurb // Its own page's blocks, when it has some, in place of its card // text, zoomed for the column they're in. - const blocks = event.blocks?.length ? event.blocks : null + const blocks = !off.has('content') && event.blocks?.length ? event.blocks : null const zoom = Math.max(1, (window.innerWidth * 0.75) / TEXT_WIDTH) return (
@@ -1505,10 +1580,10 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) { )} - {eventLine(event) && ( + {line && (

- {eventLine(event)} + {line}

)} @@ -1517,13 +1592,13 @@ function SlideView({ slide, accent }: { slide: Slide; accent: string }) { {entry.text || event.title} - {entry.person && ( + {person && ( - + - {entry.person.name} - {entry.person.tagline && ( - {entry.person.tagline} + {person.name} + {person.tagline && ( + {person.tagline} )}