diff --git a/server/src/admin-schema/columns.js b/server/src/admin-schema/columns.js
index e5831c0..9fe002b 100644
--- a/server/src/admin-schema/columns.js
+++ b/server/src/admin-schema/columns.js
@@ -189,6 +189,9 @@ export const blocksChild = (ownerKind) => ({
bool("present_map_no_details"),
enumeration("present_places", ["picked", "none"]),
text("present_place_keys"),
+ // A list's own slides (098).
+ bool("present_list_overview"),
+ bool("present_list_items"),
],
children: [
{
diff --git a/server/src/migrations/098_present_list.sql b/server/src/migrations/098_present_list.sql
new file mode 100644
index 0000000..7851b18
--- /dev/null
+++ b/server/src/migrations/098_present_list.sql
@@ -0,0 +1,18 @@
+-- ═══════════════════════════════════════════════════════════════
+-- 098 A LIST BLOCK'S PRESENTATION SLIDES
+--
+-- A list block presented (EventPresent.tsx) is a section's text,
+-- unless it has slides of its own:
+--
+-- present_list_overview one slide of every item's text, without
+-- the detail, centered
+-- present_list_items a slide per item: its text the heading,
+-- its detail under it, centered
+--
+-- Either or both. Other block types ignore them.
+-- ═══════════════════════════════════════════════════════════════
+
+ALTER TABLE content_blocks ADD COLUMN present_list_overview INTEGER NOT NULL DEFAULT 0
+ CHECK (present_list_overview IN (0, 1));
+ALTER TABLE content_blocks ADD COLUMN present_list_items INTEGER NOT NULL DEFAULT 0
+ CHECK (present_list_items IN (0, 1));
diff --git a/server/src/shape.js b/server/src/shape.js
index 5870af4..c64aa66 100644
--- a/server/src/shape.js
+++ b/server/src/shape.js
@@ -74,6 +74,8 @@ function presentOf(row) {
map_no_details: row.present_map_no_details === 1,
places: row.present_places,
place_keys: row.present_place_keys ? row.present_place_keys.split(",").filter(Boolean) : [],
+ list_overview: row.present_list_overview === 1,
+ list_items: row.present_list_items === 1,
};
return Object.values(present).some((value) => (Array.isArray(value) ? value.length : value)) ? present : null;
}
@@ -87,7 +89,8 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
`SELECT id, owner_id, type, text, media, href, alt, cite, captions, team_id, venue_id,
word_motion, word_direction, word_seconds, list_style, org_kind,
present_hide, present_text, present_map_split, present_map_no_list,
- present_map_no_details, present_places, present_place_keys
+ present_map_no_details, present_places, present_place_keys,
+ present_list_overview, present_list_items
FROM content_blocks
WHERE owner_kind = ? AND slot IN (?, 'both') AND owner_id IN (${placeholders(ids.length)})
ORDER BY owner_id, sort_order`,
diff --git a/src/components/PeopleTiles.tsx b/src/components/PeopleTiles.tsx
index 906acad..262b37e 100644
--- a/src/components/PeopleTiles.tsx
+++ b/src/components/PeopleTiles.tsx
@@ -777,7 +777,7 @@ function Tile({
function PeopleRow({ groups, people }: { groups?: PeopleGroup[]; people?: Person[] }) {
const everyone = [...(groups ?? []).flatMap((group) => group.people), ...(people ?? [])];
return (
-
+
{everyone.map((person, i) => (
diff --git a/src/lib/adminSchema/shared.ts b/src/lib/adminSchema/shared.ts
index 1c225b5..cba02d3 100644
--- a/src/lib/adminSchema/shared.ts
+++ b/src/lib/adminSchema/shared.ts
@@ -551,6 +551,20 @@ export const PRESENT_BLOCK_FIELDS = [
when: { path: "present_places", value: "picked" },
emptyNote: "No locations yet: pick the block's Venue, and give it locations under Data → Venues.",
},
+ {
+ path: "present_list_overview",
+ label: "Overview slide",
+ widget: "checkbox",
+ help: "Presented: a slide of every item's text, without the detail, centered.",
+ when: { path: "type", value: "list" },
+ },
+ {
+ path: "present_list_items",
+ label: "A slide per item",
+ widget: "checkbox",
+ help: "Presented: each item alone, its text the heading and its detail under it, centered. With either of these the list leaves its section's text slide.",
+ when: { path: "type", value: "list" },
+ },
];
export const blocksChild = {
diff --git a/src/lib/useContent.ts b/src/lib/useContent.ts
index 071eb3a..075a319 100644
--- a/src/lib/useContent.ts
+++ b/src/lib/useContent.ts
@@ -86,6 +86,10 @@ export type BlockPresent = {
/** A map: which locations get a slide; null every marked one. */
places: 'picked' | 'none' | null
place_keys: string[]
+ /** A list: one slide of its items' text (098). */
+ list_overview: boolean
+ /** A list: a slide per item, its detail under its text (098). */
+ list_items: boolean
}
/** An event's presentation look (095). */
diff --git a/src/pages/EventPresent.tsx b/src/pages/EventPresent.tsx
index 1a7239c..7e6e8d3 100644
--- a/src/pages/EventPresent.tsx
+++ b/src/pages/EventPresent.tsx
@@ -16,6 +16,13 @@
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)
+ list a list block with an Overview slide (098): its
+ items' text, centered
+ item then, with A slide per item, each item: its text
+ the heading, its detail under it, centered
+ A list without either is part of its section's text. The setup
+ ticks a list's overview (`hide` l.) and its items
+ (l..) on and off.
A schedule's slides, for each day picked, in order:
overview the day's picked entries on one slide
@@ -81,7 +88,7 @@ import {
} from '../components/ScheduleBlock.tsx'
import ContentBlocks, { eventLine } from '../components/ContentBlocks.tsx'
import { LocationNumber, MapPicture, isMarked, locationNumber } from '../components/MapBlock.tsx'
-import { Paragraphs } from '../components/InlineText.tsx'
+import { Inline, Paragraphs } from '../components/InlineText.tsx'
import { Presenting } from '../lib/presenting.ts'
import {
useEvent,
@@ -111,6 +118,8 @@ const KINDS = [
{ 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: '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 },
] as const
type Kind = (typeof KINDS)[number]['key']
@@ -121,6 +130,14 @@ const OWN_SLIDES = new Map([
['map', 'Map'],
['events', 'Events'],
])
+/* What the setup calls a block with slides of its own (a list with
+ an Overview slide or A slide per item, 098), else null. */
+const ownSlides = (block: ContentBlock): string | null =>
+ OWN_SLIDES.get(block.type) ??
+ (block.type === 'list' && (block.present?.list_overview || block.present?.list_items) ? 'List' : null)
+/* A list's overview's key in `hide`, and an item's (`i`). */
+const listKey = (s: number, b: number, i?: number) => `l${s}.${b}${i == null ? '' : `.${i}`}`
+
/* Blocks that start a section. */
const STARTS_SECTION = new Set(['heading', 'tab'])
/* Text that alone makes no section slide: the heading titles what
@@ -311,15 +328,16 @@ function mapSlides(slides: Slide[], block: ContentBlock, at: string, label: stri
/* Each slide's id says where it comes from, so a saved order still
finds it: t a section's text; v and p a map and its
locations, c and e an events list and its events, by
- .; o, k, s, g and m a schedule's overview, block,
- spotlight, graphic and map image, and x its tag slides, by key(). */
+ .; l and i a list's overview and items (listKey);
+ o, k, s, g and m a schedule's overview, block, spotlight, graphic
+ and map image, and x its tag slides, by key(). */
function buildSlides(sections: Section[], schedules: Map, picks: Picks): Slide[] {
- const { skipped, seconds } = picks
+ const { skipped, seconds, hidden } = picks
const slides: Slide[] = []
sections.forEach((section, s) => {
if (skipped.has(s)) return
const label = section.title
- const text = section.blocks.filter((block) => !OWN_SLIDES.has(block.type))
+ const text = section.blocks.filter((block) => !ownSlides(block))
// Nothing but a heading: it titles the slides that follow.
const own = text.some((block) => !FILLER.has(block.type))
if (seconds.section && own) slides.push({ id: `t${s}`, kind: 'section', seconds: seconds.section, label, blocks: text })
@@ -329,6 +347,15 @@ function buildSlides(sections: Section[], schedules: Map
const schedule = schedules.get(block)
if (schedule) scheduleSlides(slides, schedule, picks)
if (block.type === 'map' && block.venue) mapSlides(slides, block, at, label, title, seconds)
+ if (block.type === 'list' && ownSlides(block)) {
+ const items = (block.items ?? []).flatMap((item, i) => (hidden.has(listKey(s, b, i)) ? [] : [{ item, i }]))
+ if (seconds.list && block.present?.list_overview && items.length && !hidden.has(listKey(s, b))) {
+ slides.push({ id: `l${at}`, kind: 'list', seconds: seconds.list, label, title: title ?? undefined, items: items.map(({ item }) => item) })
+ }
+ if (seconds.item && block.present?.list_items) {
+ for (const { item, i } of items) slides.push({ id: `i${at}.${i}`, kind: 'item', seconds: seconds.item, label, entry: item })
+ }
+ }
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 })
@@ -374,6 +401,10 @@ function slideName(slide: Slide): string {
return slide.location!.name
case 'event':
return entry!.text || entry!.event!.title
+ case 'list':
+ return slide.title ?? (slide.items ?? []).map((item) => item.text).join(', ')
+ case 'item':
+ return entry!.text
default:
return [slide.day?.name, entry!.time, entry!.text].filter(Boolean).join(' · ')
}
@@ -649,7 +680,7 @@ function Setup({