/* ═══════════════════════════════════════════════════════════════ CONTENT BLOCKS Renders the `body` slot of content_blocks. Events, organizations, teams, people and blog posts all own blocks and all render them the same way, so this is written once and tinted by the caller's accent. The admin's block editor previews each block through this same component. What each type reads (see 032_content_block_types.sql): heading, subheading text paragraph text (formatted), href makes it all a link callout text (formatted), in a tinted box quote text (formatted), cite is who said it list items: text, detail, url links items with a url, as outlined buttons button text is the label, href where it goes image media, alt, text is the caption, href video href is the video, media a still, text the caption; click to play schedule items as entries in day tabs (day, time, text, detail, url, location, person, and a fold-out of description, media, map); text is an optional intro. ScheduleBlock divider nothing "Formatted" is InlineText.tsx: **bold**, *italic*, [text](url), line breaks, and a blank line for a new paragraph. An unknown `type` renders its text as a paragraph rather than disappearing. A block somebody typed into the admin should be visible even if the renderer hasn't caught up with it. ═══════════════════════════════════════════════════════════════ */ import { blockMedia } from '../lib/media.ts' import type { ContentBlock } from '../lib/useContent.ts' import { Anchor, Inline, Paragraphs } from './InlineText.tsx' import VideoPlayer from './VideoPlayer.tsx' import ScheduleBlock from './ScheduleBlock.tsx' const BODY = '#4a6b72' export default function ContentBlocks({ blocks, accent = '#138ba0', className = '', }: { blocks?: ContentBlock[] | null accent?: string className?: string }) { if (!blocks?.length) return null return (
{block.cite && (