Add link card blocks to post bodies

A "cards" content block: each item is a card with a picture, title and
description that links somewhere, like a link shared in a chat. Fetch
preview fills the card from the link. Migration 044 (not deployed yet)
now allows both table and cards.

Also fixes hidden-field clearing when two fields share a path, and adds
table and card blocks to the showcase post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-29 15:40:24 -05:00
parent 5dceeb5860
commit 4e9b4e3329
8 changed files with 123 additions and 18 deletions

View file

@ -1,12 +1,20 @@
-- ═══════════════════════════════════════════════════════════════
-- 044 TABLE BLOCKS
-- 044 TABLE AND CARD BLOCKS
--
-- A content block of type 'table': a grid of text, for comparison
-- charts and the like (a blog post imported from Word, say). The
-- grid is the block's text, one row per line, cells split by "|",
-- the first row the header; cells take the same inline formatting as
-- a paragraph (**bold**, *italic*, [link](url)). ContentBlocks.tsx
-- draws it.
-- Two content block types:
--
-- table a grid of text, for comparison charts and the like (a
-- blog post imported from Word, say). The grid is the
-- block's text, one row per line, cells split by "|", the
-- first row the header; cells take the same inline
-- formatting as a paragraph (**bold**, *italic*,
-- [link](url)).
-- cards link cards, one per item, like a link shared in a chat:
-- the item's text is the title, detail the description,
-- url the link and media the picture (all as today's item
-- columns). Fetch preview in the admin fills them.
--
-- ContentBlocks.tsx draws both.
--
-- Only the type's CHECK changes, and SQLite can't alter a CHECK, so
-- the table is rebuilt the way 031, 032 and 034 did it
@ -25,7 +33,7 @@ CREATE TABLE content_blocks_new (
type TEXT NOT NULL
CHECK (type IN ('heading', 'subheading', 'paragraph',
'list', 'links', 'quote', 'image', 'divider',
'video', 'button', 'callout', 'schedule', 'table')),
'video', 'button', 'callout', 'schedule', 'table', 'cards')),
text TEXT,
media TEXT,
href TEXT,