Event page: a contents list, a links heading, full-width blocks; schedule tags in their own row
Migration 089 adds show_contents and links_heading to events (Page group in the editor). The content blocks fill the column, beside the contents list when it shows. A schedule's tag tabs sit in a row of their own under the days, with a note on what they do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
375c364861
commit
b8a744cf41
7 changed files with 149 additions and 61 deletions
|
|
@ -67,6 +67,8 @@ export const events = {
|
|||
bool("is_published"),
|
||||
bool("is_listed"),
|
||||
bool("in_timeline"),
|
||||
bool("show_contents"),
|
||||
text("links_heading"),
|
||||
|
||||
// A repeating schedule. Columns rather than a side table: the
|
||||
// schedule is always exactly one per event, and the public view
|
||||
|
|
|
|||
14
server/src/migrations/089_event_page_options.sql
Normal file
14
server/src/migrations/089_event_page_options.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 089 EVENT PAGE OPTIONS
|
||||
--
|
||||
-- show_contents the page's headings listed beside its content
|
||||
-- blocks, as a blog post's are (PostContents.tsx)
|
||||
-- links_heading a heading above the event's link buttons; null
|
||||
-- shows none
|
||||
--
|
||||
-- v_events is SELECT e.*, so it carries both with no rebuild.
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE events ADD COLUMN show_contents INTEGER NOT NULL DEFAULT 0
|
||||
CHECK (show_contents IN (0, 1));
|
||||
ALTER TABLE events ADD COLUMN links_heading TEXT;
|
||||
|
|
@ -591,7 +591,14 @@ content.get("/events/:id", (c) => {
|
|||
citation: r.citation,
|
||||
}));
|
||||
|
||||
const event = { ...shapeEvent(row, links, cards, hosts), blocks: body, people, awards };
|
||||
const event = {
|
||||
...shapeEvent(row, links, cards, hosts),
|
||||
show_contents: row.show_contents === 1,
|
||||
links_heading: row.links_heading,
|
||||
blocks: body,
|
||||
people,
|
||||
awards,
|
||||
};
|
||||
attachTags(db, "event", [event]);
|
||||
|
||||
return json(c, { event });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue