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,6 +71,7 @@ import { SITE_NAME } from '../lib/site.ts'
import { useSmallImage } from '../lib/useSmallImage.ts'
import { useReadingMode } from '../lib/readingMode.ts'
import { WordMotion, Words } from './RotatingWords.tsx'
import OrgListCards from '../pages/sections/OrgList-Card.tsx'
const BODY = 'var(--color-muted)'
@ -595,6 +596,22 @@ function Block({
return <EventsBlock items={events} accent={accent} level={level} />
}
case 'organizations': {
// Picked ones in their order, else every listed one of its kind.
const ids = (block.items ?? []).map((item) => item.org_id).filter((id): id is string => Boolean(id))
if (ids.length === 0 && !block.org_kind) return null
return (
<OrgListCards
kind={block.org_kind}
ids={ids}
accent={accent}
pageLabel="Their page"
empty="Organizations coming soon."
nested
/>
)
}
case 'people': {
const picked = (block.items ?? [])
.filter((item) => item.person)