Present: slide order, presentation settings, blocks drawn for a screen

- Setup's Order list: drag or move any slide; saved in the address
- A heading-only section titles the slides after it, no slide of its own
- Event Presentation settings (095): background image and color, dim,
  frame, accent, text color, logo
- Blocks: Presentation text and Leave out of the presentation; map
  blocks get a slide per section, map only, no details, location slides
- Presented, links are plain text, people a row of round photos and
  names, organizations their logos

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-12 03:41:06 -06:00
parent a79559d290
commit 7e21a0dd40
16 changed files with 652 additions and 68 deletions

View file

@ -1,5 +1,8 @@
import { mediaUrl } from "../media.ts";
import { PLACE_FIELDS, PUBLISHED_FIELD, LISTED_FIELD, timelineGroup, timelineDetailGroup, linksChild, hostsChild, blocksChild, tagsChild } from "./shared.ts";
import { PLACE_FIELDS, PUBLISHED_FIELD, LISTED_FIELD, timelineGroup, timelineDetailGroup, linksChild, hostsChild, blocksChild, tagsChild, PRESENT_BLOCK_FIELDS } from "./shared.ts";
/* An event's blocks also say how they're presented (095). */
const eventBlocksChild = { ...blocksChild, fields: [...blocksChild.fields, ...PRESENT_BLOCK_FIELDS] };
/* ── Events ──────────────────────────────────────────────────── */
@ -189,6 +192,58 @@ export const events = {
},
],
},
{
legend: "Presentation",
fields: [
{
path: "present_background",
label: "Background image",
widget: "image",
crop: "free",
resolve: mediaUrl,
full: true,
help: "Behind every slide when the page is presented, under the background color. Default: none.",
},
{
path: "present_background_color",
label: "Background color",
widget: "color",
help: "The slides' background, laid over the image at Dim. Default: the site's background.",
},
{
path: "present_dim",
label: "Dim",
widget: "number",
help: "How much of the background color covers the image, 0 to 90 percent, so the text stays readable. Default: 60.",
},
{
path: "present_frame",
label: "Frame",
widget: "select",
options: [
["border", "A border around the slide"],
["none", "None: the slide alone"],
],
blankLabel: "Default: a bar on top, the title line and the timer",
},
{ path: "present_accent", label: "Accent", widget: "color", help: "Default: the event's color" },
{
path: "present_text_color",
label: "Text color",
widget: "color",
help: "Default: readable on the background color, else the site's text colors",
},
{
path: "present_logo",
label: "Logo",
widget: "image",
folder: "logos",
resolve: mediaUrl,
full: true,
help: "In the bottom-right corner of every slide. Default: none.",
},
],
},
timelineGroup("event"),
timelineDetailGroup("event"),
{ legend: "Publishing", fields: [PUBLISHED_FIELD, LISTED_FIELD] },
@ -231,6 +286,6 @@ export const events = {
],
},
linksChild,
blocksChild,
eventBlocksChild,
],
};

View file

@ -494,6 +494,65 @@ const SUB_ITEM_FIELDS = [
TAGS_FIELD,
];
/* An event's blocks' presentation fields (095), EventPresent.tsx. */
export const PRESENT_BLOCK_FIELDS = [
{
path: "present_hide",
label: "Leave out of the presentation",
widget: "checkbox",
help: "The page still shows it.",
},
{
path: "present_text",
label: "Presentation text",
widget: "textarea",
full: true,
when: { path: "type", value: TEXT_TYPES },
help: "Shown in place of the text when the page is presented, eg. a shorter heading. Default: the text.",
},
{
path: "present_map_split",
label: "A slide per section",
widget: "checkbox",
help: "Presented: each of the sections below gets its own map slide with only its locations. Default: one map slide with every location.",
when: { path: "type", value: "map" },
},
{
path: "present_map_no_list",
label: "Map only",
widget: "checkbox",
help: "Presented: no locations list beside the map, so the map fills the slide.",
when: { path: "type", value: "map" },
},
{
path: "present_map_no_details",
label: "No location details",
widget: "checkbox",
help: "Presented: each location's name only, without its detail line.",
when: { path: "type", value: "map" },
},
{
path: "present_places",
label: "Location slides",
widget: "select",
options: [
["picked", "Only the locations picked below"],
["none", "None"],
],
blankLabel: "Default: each marked location, lit up on the map",
when: { path: "type", value: "map" },
},
{
path: "present_place_keys",
label: "Locations with a slide",
widget: "checklist",
optionsFrom: "mapLocations",
full: true,
when: { path: "present_places", value: "picked" },
emptyNote: "No locations yet: pick the block's Venue, and give it locations under Data → Venues.",
},
];
export const blocksChild = {
key: "content_blocks",
label: "Content blocks",

10
src/lib/presenting.ts Normal file
View file

@ -0,0 +1,10 @@
/* Whether the blocks are drawn for a presentation screen
(EventPresent.tsx, 095): ContentBlocks leaves out the blocks set to,
takes their Presentation text, and draws links as plain text,
people as a row of round photos and organizations as logos. */
import { createContext, useContext } from 'react'
export const Presenting = createContext(false)
export const usePresenting = () => useContext(Presenting)

View file

@ -70,6 +70,35 @@ export type ContentBlock = {
/** A map block's own sections of its venue's locations, by key
* (094). With any, `venue` holds only the locations they name. */
map_sections?: MapSection[]
/** How it's presented (095); null with nothing set. */
present?: BlockPresent | null
}
/** A block's presentation settings (095), EventPresent.tsx. */
export type BlockPresent = {
hide: boolean
/** In place of its text, eg. a shorter heading. */
text: string | null
/** A map: a slide per map section. */
map_split: boolean
map_no_list: boolean
map_no_details: boolean
/** A map: which locations get a slide; null every marked one. */
places: 'picked' | 'none' | null
place_keys: string[]
}
/** An event's presentation look (095). */
export type EventPresentLook = {
background: string | null
background_color: string | null
/** Percent of the color over the image; null 60. */
dim: number | null
/** null the accent bar, title line and timer. */
frame: 'border' | 'none' | null
accent: string | null
text_color: string | null
logo: string | null
}
export type MapSection = { name: string; keys: string[] }
@ -246,6 +275,8 @@ export type EventRecord = {
show_contents?: boolean
/** Above the link buttons; null shows none (089). */
links_heading?: string | null
/** Its page presented (095). */
present?: EventPresentLook
blocks: ContentBlock[]
people: EventPerson[]
awards: EventAward[]