Venues, map blocks and event blocks; schedule entries link to them

Data → Venues: a map picture with its locations marked as pins or
boxes (088). A Map block draws a venue with its locations listed;
a schedule names a venue and its entries pick a location, linking to
the map on the page with it lit up. Entries and sub-items can name
an event (a workshop) and take what they leave blank from it, and an
Events block shows event cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-09 03:21:18 -06:00
parent 3d087da005
commit 818d648e91
18 changed files with 964 additions and 35 deletions

View file

@ -79,6 +79,7 @@ const MEMBERS = ["showcase-member-1", "showcase-member-2", "showcase-member-3"];
const EVENT = "showcase-event";
const SERIES = "showcase-series";
const PAST = "showcase-past-event";
const VENUE = "showcase-venue";
/* ── Content ───────────────────────────────────────────────── */
@ -87,21 +88,24 @@ const PAST = "showcase-past-event";
a description, graphic and map, one linked, a heading, a featured
entry, a block with sub-items, a break, typed and picked times,
tags (one a tab of its own in its color, one with No tab), and one
with no day (it lands in a tab of its own). */
with no day (it lands in a tab of its own). Its venue's locations
(088) are picked on some entries, one with no typed Location, and
one sub-item is the showcase workshop, filled in from it. */
const SCHEDULE = [
"schedule",
{ text: "The weekend at a glance. Tap an entry for more." },
{ text: "The weekend at a glance. Tap an entry for more.", venue_id: VENUE },
[
{ day: "Friday", start_time: "16:00", text: "Arrivals and check-in", location: "Front desk", tags: "showcase-youth,showcase-all" },
{ day: "Friday", kind: "heading", text: "Evening", detail: "A heading across the day" },
{ day: "Friday", time: "7:00 to 8:30pm", text: "Opening session", location: "Main Hall", person_id: "showcase-person", detail: "Welcome and worship", description: "The **opening session** sets the theme for the weekend.\n\nBring a notebook.", media: "/uploads/showcase.jpg", map: "Camp Hebron, Halifax PA", map_image: "/uploads/showcase.jpg" },
{ day: "Friday", time: "7:00 to 8:30pm", text: "Opening session", location_key: "hall", person_id: "showcase-person", detail: "Welcome and worship", description: "The **opening session** sets the theme for the weekend.\n\nBring a notebook.", media: "/uploads/showcase.jpg", map: "Camp Hebron, Halifax PA", map_image: "/uploads/showcase.jpg" },
{ day: "Saturday", start_time: "08:00", end_time: "09:00", kind: "break", text: "Breakfast", location: "Dining hall" },
{ day: "Saturday", start_time: "09:00", end_time: "10:30", kind: "block", text: "Workshops", location: "Classrooms", detail: "Pick one of three", items: [
{ start_time: "09:00", end_time: "09:45", text: "Leading worship", location: "Room A", person_id: "showcase-member-2", url: "/blog/content-block-showcase" },
{ start_time: "09:00", end_time: "09:45", text: "Leading worship", location: "Room A", location_key: "rooma", person_id: "showcase-member-2", url: "/blog/content-block-showcase" },
{ start_time: "09:00", end_time: "09:45", text: "Showcase Past Workshop", event_id: PAST, location_key: "rooma" },
{ start_time: "09:00", end_time: "09:45", text: "Speaking with confidence", location: "Room B", featured: 1, tags: "showcase-youth", description: "A featured sub-item that folds out." },
{ time: "After the first round", text: "Open questions", location: "Room C" },
] },
{ day: "Saturday", start_time: "19:00", featured: 1, tags: "showcase-youth", text: "Talent night", location: "Main Hall", person_id: "showcase-member-3", description: "Sign up at the front desk by noon." },
{ day: "Saturday", start_time: "19:00", featured: 1, tags: "showcase-youth", text: "Talent night", location: "Main Hall", location_key: "hall", person_id: "showcase-member-3", description: "Sign up at the front desk by noon." },
{ day: "Sunday", time: "10:00am", text: "Closing service", location: "Chapel", map: "Main Street, Halifax PA" },
{ time: "Any time", text: "Quiet room open", location: "Library", detail: "An entry with no day" },
],
@ -141,6 +145,13 @@ const ALL_BLOCKS = [
["image", { media: IMAGE, alt: "The same picture, linked", href: "/history" }],
["subheading", { text: "Schedule" }],
SCHEDULE,
["subheading", { text: "Map" }],
["map", { venue_id: VENUE }],
["subheading", { text: "Events" }],
["events", {}, [
{ event_id: PAST, text: "Showcase Past Workshop" },
{ event_id: "showcase-event", text: "A card with its own title", detail: "And its own text in place of the event's." },
]],
["subheading", { text: "Video" }],
["video", { href: "https://www.youtube.com/watch?v=dQw4w9WgXcQ", text: "A YouTube video, with its own thumbnail" }],
["video", { href: "https://vimeo.com/76979871", media: IMAGE, text: "A Vimeo video with an uploaded still" }],
@ -255,6 +266,7 @@ tx(db, () => {
db.prepare(`DELETE FROM awards WHERE id LIKE 'showcase-%'`).run();
db.prepare(`DELETE FROM affiliations WHERE person_id LIKE 'showcase-%' OR org_id LIKE 'showcase-%'`).run();
db.prepare(`DELETE FROM teams WHERE id LIKE 'showcase-%'`).run();
db.prepare(`DELETE FROM venues WHERE id LIKE 'showcase-%'`).run();
db.prepare(`DELETE FROM people WHERE id LIKE 'showcase-%'`).run();
db.prepare(`DELETE FROM organizations WHERE id = ?`).run(GROUP);
db.prepare(`DELETE FROM organizations WHERE id LIKE 'showcase-%'`).run();
@ -412,7 +424,6 @@ tx(db, () => {
{ kind: "social", platform: "instagram", label: "@showcaseretreat", url: "https://instagram.com/showcaseretreat" },
]);
blocks("event", EVENT, "both", cardText("event"));
blocks("event", EVENT, "body", [...pageBody("event"), ["heading", { text: "Schedule" }], SCHEDULE]);
insert("events", {
id: SERIES,
@ -458,6 +469,23 @@ tx(db, () => {
insert("event_people", { event_id: PAST, person_id: PERSON, role: "host", is_public: 1, sort_order: 0 });
blocks("event", PAST, "card", cardText("past event"));
/* ── Venue (088): a pin, a box and an unmarked location ── */
insert("venues", { id: VENUE, name: "Showcase Retreat Center", address: "123 Example Road, Exampletown PA", map_image: IMAGE });
[
{ location_key: "hall", name: "Main Hall", detail: "Sessions and talent night", x: 30, y: 40 },
{ location_key: "rooma", name: "Room A", detail: "Workshops", x: 55, y: 20, w: 25, h: 30 },
{ location_key: "desk", name: "Front desk", detail: "Not marked on the map" },
].forEach((location, i) => insert("venue_locations", { venue_id: VENUE, sort_order: i, ...location }));
// The retreat's page, after the workshop and venue its schedule names.
blocks("event", EVENT, "body", [
...pageBody("event"),
["heading", { text: "Schedule" }],
SCHEDULE,
["heading", { text: "Map" }],
["map", { venue_id: VENUE }],
]);
/* ── Award ── */
insert("awards", {
id: AWARD,