Rotating words: {Next|Now} in titles and text cycles through its choices

Migration 084: site defaults for the motion (slide, flip, fade, type,
mirror), direction and seconds per word in Site settings, and a hero's
and a block's own. The hero's headline, section and band titles,
headings, paragraphs, callouts and quotes rotate; menus, tab titles,
search text and emails show the first word; less motion shows it still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-17 00:43:59 -05:00
parent ab8dcdd608
commit a10ff6d75f
30 changed files with 411 additions and 37 deletions

View file

@ -70,7 +70,8 @@ export function loadBlocks(db, ownerKind, ids, slot = "body") {
const blockRows = db
.prepare(
`SELECT id, owner_id, type, text, media, href, alt, cite, captions, team_id
`SELECT id, owner_id, type, text, media, href, alt, cite, captions, team_id,
word_motion, word_direction, word_seconds
FROM content_blocks
WHERE owner_kind = ? AND slot IN (?, 'both') AND owner_id IN (${placeholders(ids.length)})
ORDER BY owner_id, sort_order`,
@ -91,6 +92,10 @@ export function loadBlocks(db, ownerKind, ids, slot = "body") {
cite: row.cite,
captions: row.captions,
team_id: row.team_id,
// 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 }
: null,
items: [],
};
byId.set(row.id, block);