Events block: featured events open in full above the cards, under a heading

Migration 090 adds heading and subheading to content_block_items. An
events block's item ticked Featured shows in full above the cards,
under its heading and subheading when set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-11 02:57:26 -06:00
parent a7495f09e5
commit 8a79206998
6 changed files with 88 additions and 28 deletions

View file

@ -116,7 +116,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
const itemRows = db
.prepare(
`SELECT i.id, i.block_id, i.day, i.kind, ${ENTRY_FIELDS}
`SELECT i.id, i.block_id, i.day, i.kind, i.heading, i.subheading, ${ENTRY_FIELDS}
FROM content_block_items i
LEFT JOIN v_people_public p ON p.id = i.person_id AND p.is_published = 1
WHERE i.block_id IN (${placeholders(blockIds.length)})
@ -128,7 +128,14 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
// ride along anyway rather than branching on the block's type.
const itemsById = new Map();
for (const row of itemRows) {
const item = { ...scheduleEntry(row), day: row.day, kind: row.kind ?? "entry", items: [] };
const item = {
...scheduleEntry(row),
day: row.day,
kind: row.kind ?? "entry",
heading: row.heading,
subheading: row.subheading,
items: [],
};
itemsById.set(row.id, item);
byId.get(row.block_id)?.items.push(item);
}