Image block: a dark theme picture; presented pictures centered
- media_dark (102): shown in place of the image while the site is dark, the block's alt text and caption shared - Present: pictures beside text centered on the slide's height, and a section of only pictures centered both ways Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a59702b7f3
commit
f46deac3cc
7 changed files with 41 additions and 8 deletions
|
|
@ -164,6 +164,8 @@ export const blocksChild = (ownerKind) => ({
|
|||
),
|
||||
text("text"),
|
||||
text("media"),
|
||||
// Image blocks (102): shown in place of media in the dark theme.
|
||||
text("media_dark"),
|
||||
url("href"),
|
||||
text("alt"),
|
||||
text("cite"),
|
||||
|
|
|
|||
13
server/src/migrations/102_image_dark.sql
Normal file
13
server/src/migrations/102_image_dark.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 102 AN IMAGE BLOCK'S DARK THEME PICTURE
|
||||
--
|
||||
-- media_dark shown in place of media while the site is in its
|
||||
-- dark theme (the visitor's setting, or a presentation
|
||||
-- held dark), eg. a chart or a logo drawn light on
|
||||
-- dark. Null shows media in both themes.
|
||||
--
|
||||
-- Image blocks only; other types ignore it. Its alt text and caption
|
||||
-- are the block's, so it should show the same thing.
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE content_blocks ADD COLUMN media_dark TEXT;
|
||||
|
|
@ -86,7 +86,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,
|
||||
`SELECT id, owner_id, type, text, media, media_dark, href, alt, cite, captions, team_id, venue_id,
|
||||
word_motion, word_direction, word_seconds, list_style, image_size, org_kind,
|
||||
present_show, present_text, present_map_split, present_map_no_list,
|
||||
present_map_no_details, present_places, present_place_keys
|
||||
|
|
@ -105,6 +105,7 @@ export function loadBlocks(db, ownerKind, ids, slot = "body", depth = 0) {
|
|||
type: row.type,
|
||||
text: row.text,
|
||||
media: row.media,
|
||||
media_dark: row.media_dark,
|
||||
href: row.href,
|
||||
alt: row.alt,
|
||||
cite: row.cite,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue