List block: bold text and a plain detail by default, with a Style to keep the old look
Migration 092 adds content_blocks.list_style: blank is bold text and a detail in the body color, 'plain' the plain text and gray detail lists had before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6a0271efd9
commit
e9ea75a68d
7 changed files with 44 additions and 11 deletions
|
|
@ -175,6 +175,8 @@ export const blocksChild = (ownerKind) => ({
|
|||
text("team_id"),
|
||||
// Map and schedule blocks (088): whose map and locations.
|
||||
text("venue_id"),
|
||||
// List blocks (092): null bold text, 'plain' the old look.
|
||||
enumeration("list_style", ["plain"]),
|
||||
],
|
||||
children: [
|
||||
{
|
||||
|
|
|
|||
13
server/src/migrations/092_list_style.sql
Normal file
13
server/src/migrations/092_list_style.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 092 A LIST BLOCK'S STYLE
|
||||
--
|
||||
-- How a list block's items read:
|
||||
--
|
||||
-- null the item's text bold, its detail in the body color
|
||||
-- plain the text plain, the detail gray (the look before 092)
|
||||
--
|
||||
-- Other block types ignore it.
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE content_blocks ADD COLUMN list_style TEXT
|
||||
CHECK (list_style IN ('plain'));
|
||||
|
|
@ -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
|
||||
word_motion, word_direction, word_seconds, list_style
|
||||
FROM content_blocks
|
||||
WHERE owner_kind = ? AND slot IN (?, 'both') AND owner_id IN (${placeholders(ids.length)})
|
||||
ORDER BY owner_id, sort_order`,
|
||||
|
|
@ -93,6 +93,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
|
|||
captions: row.captions,
|
||||
team_id: row.team_id,
|
||||
venue_id: row.venue_id,
|
||||
list_style: row.list_style,
|
||||
// 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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue