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 ( -