Organizations block: the Partners page's cards, picked one by one or every one of a kind

Migration 093 adds the 'organizations' block type (rebuilding
content_blocks for its CHECK, as 088 did), content_blocks.org_kind and
content_block_items.org_id. OrgListCards takes `nested` for a block:
no page gutter, names a level under the block's heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-11 03:23:58 -06:00
parent e9ea75a68d
commit bd271ef02d
8 changed files with 182 additions and 13 deletions

View file

@ -71,7 +71,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
const blockRows = db
.prepare(
`SELECT id, owner_id, type, text, media, href, alt, cite, captions, team_id, venue_id,
word_motion, word_direction, word_seconds, list_style
word_motion, word_direction, word_seconds, list_style, org_kind
FROM content_blocks
WHERE owner_kind = ? AND slot IN (?, 'both') AND owner_id IN (${placeholders(ids.length)})
ORDER BY owner_id, sort_order`,
@ -94,6 +94,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
team_id: row.team_id,
venue_id: row.venue_id,
list_style: row.list_style,
org_kind: row.org_kind,
// Its rotating words' motion (084), when it has its own.
words: row.word_motion || row.word_direction || row.word_seconds
? { motion: row.word_motion, direction: row.word_direction, seconds: row.word_seconds }
@ -117,7 +118,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, i.heading, i.subheading, ${ENTRY_FIELDS}
`SELECT i.id, i.block_id, i.day, i.kind, i.heading, i.subheading, i.org_id, ${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)})
@ -135,6 +136,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
kind: row.kind ?? "entry",
heading: row.heading,
subheading: row.subheading,
org_id: row.org_id,
items: [],
};
itemsById.set(row.id, item);