Present: dark theme settings, a Theme pick, and a content inset

- Event Presentation, dark theme (096): background image and color,
  dim, accent, text color and logo for a dark screen; blank takes the
  light one
- Setup's Theme holds a screen light or dark while it plays (`theme=`)
- Inset top, right, bottom and left (097), percent of the screen, so
  the slides sit inside a frame drawn in the background image; with
  any set the image is stretched to the screen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-12 04:14:14 -06:00
parent 7e21a0dd40
commit b76f2a5707
8 changed files with 209 additions and 12 deletions

View file

@ -1,4 +1,4 @@
import { text, int, bool, date, time, enumeration, placeColumns, timelineExtension, linksChild, blocksChild, hostsChild } from "./columns.js";
import { text, int, real, bool, date, time, enumeration, placeColumns, timelineExtension, linksChild, blocksChild, hostsChild } from "./columns.js";
import { tagsChild } from "./tags.js";
/* ── Events ──────────────────────────────────────────────────── */
@ -77,6 +77,18 @@ export const events = {
text("present_accent"),
text("present_text_color"),
text("present_logo"),
// The same in the dark theme (096), null the above.
text("present_background_dark"),
text("present_background_color_dark"),
int("present_dim_dark"),
text("present_accent_dark"),
text("present_text_color_dark"),
text("present_logo_dark"),
// Room clear at each edge, eg. inside a frame picture (097).
real("present_inset_top"),
real("present_inset_right"),
real("present_inset_bottom"),
real("present_inset_left"),
// A repeating schedule. Columns rather than a side table: the
// schedule is always exactly one per event, and the public view

View file

@ -0,0 +1,24 @@
-- ═══════════════════════════════════════════════════════════════
-- 096 PRESENTATION SETTINGS IN THE DARK THEME
--
-- The same as 095's, for a screen in the dark theme (the device's
-- setting, or the setup's Theme pick). Each one null takes the
-- light theme's (095), so only what differs needs setting.
--
-- present_background_dark the image behind every slide
-- present_background_color_dark the slides' background color
-- present_dim_dark percent of the color over the
-- image, 0 to 90
-- present_accent_dark in place of the accent
-- present_text_color_dark the slides' text
-- present_logo_dark the bottom-right logo, eg. a
-- light version
-- ═══════════════════════════════════════════════════════════════
ALTER TABLE events ADD COLUMN present_background_dark TEXT;
ALTER TABLE events ADD COLUMN present_background_color_dark TEXT;
ALTER TABLE events ADD COLUMN present_dim_dark INTEGER
CHECK (present_dim_dark BETWEEN 0 AND 90);
ALTER TABLE events ADD COLUMN present_accent_dark TEXT;
ALTER TABLE events ADD COLUMN present_text_color_dark TEXT;
ALTER TABLE events ADD COLUMN present_logo_dark TEXT;

View file

@ -0,0 +1,20 @@
-- ═══════════════════════════════════════════════════════════════
-- 097 PRESENTATION CONTENT INSET
--
-- Room kept clear at each edge of a presented slide, so its content
-- sits inside a background image that is a frame (eg. a 1920x1080
-- picture with a border drawn in it). Percent of the screen: top
-- and bottom of its height, left and right of its width, 0 to 45.
-- Null is 0. With any set, the background image is stretched to the
-- screen rather than cropped, so the frame stays where the inset
-- expects it. Both themes share them.
-- ═══════════════════════════════════════════════════════════════
ALTER TABLE events ADD COLUMN present_inset_top REAL
CHECK (present_inset_top BETWEEN 0 AND 45);
ALTER TABLE events ADD COLUMN present_inset_right REAL
CHECK (present_inset_right BETWEEN 0 AND 45);
ALTER TABLE events ADD COLUMN present_inset_bottom REAL
CHECK (present_inset_bottom BETWEEN 0 AND 45);
ALTER TABLE events ADD COLUMN present_inset_left REAL
CHECK (present_inset_left BETWEEN 0 AND 45);

View file

@ -604,6 +604,24 @@ content.get("/events/:id", (c) => {
accent: row.present_accent,
text_color: row.present_text_color,
logo: row.present_logo,
// Room clear at each edge, percent of the screen (097).
inset: [row.present_inset_top, row.present_inset_right, row.present_inset_bottom, row.present_inset_left].some((n) => n)
? {
top: row.present_inset_top ?? 0,
right: row.present_inset_right ?? 0,
bottom: row.present_inset_bottom ?? 0,
left: row.present_inset_left ?? 0,
}
: null,
// In the dark theme (096); null takes the above.
dark: {
background: row.present_background_dark,
background_color: row.present_background_color_dark,
dim: row.present_dim_dark,
accent: row.present_accent_dark,
text_color: row.present_text_color_dark,
logo: row.present_logo_dark,
},
},
blocks: body,
people,