From 1cb439de1874e2236fe060bc70496d7b41a1719c Mon Sep 17 00:00:00 2001 From: Patrick Niebeling Date: Sat, 7 Nov 2026 16:48:59 +0100 Subject: [PATCH] Enlarge participant headings and make theme switch icon-only The slide heading on the participant page was smaller than a regular h1 on phones. The theme switch now shows only its icon; the current and next scheme stay available as aria-label and tooltip. Co-Authored-By: Claude Opus 5.5 --- templates/element/theme_switch.php | 4 ++-- webroot/css/plenario.css | 7 ++++--- webroot/js/plenario.js | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/element/theme_switch.php b/templates/element/theme_switch.php index 969c927..23df365 100644 --- a/templates/element/theme_switch.php +++ b/templates/element/theme_switch.php @@ -1,6 +1,7 @@ " data-label-next="" > - diff --git a/webroot/css/plenario.css b/webroot/css/plenario.css index c089640..16440f4 100644 --- a/webroot/css/plenario.css +++ b/webroot/css/plenario.css @@ -295,7 +295,8 @@ textarea { resize: vertical; } /* ---------------------------------------------------------------- participant */ .participant .main { max-width: 640px; } .participant .site-nav { display: none; } -.question { font-size: 1.5rem; } +/* Slide headings must read well on phones: bigger than the generic h1 on small screens. */ +.participant-view h1 { font-size: clamp(1.75rem, 6vw, 2.4rem); line-height: 1.2; word-break: break-word; } .choices { display: grid; gap: 10px; margin: 16px 0 20px; } .choice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 500; } .choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); } @@ -559,6 +560,6 @@ body.present { .qr-overlay p { font-size: 1.4rem; } /* ---------------------------------------------------------------- theme switch */ -.theme-switch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; } +.theme-switch { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; } .theme-switch:hover { border-color: var(--primary); } -.theme-switch__icon { font-size: 1.05em; line-height: 1; } +.theme-switch__icon { font-size: 1.3em; line-height: 1; } diff --git a/webroot/js/plenario.js b/webroot/js/plenario.js index d1ce843..c24ea95 100644 --- a/webroot/js/plenario.js +++ b/webroot/js/plenario.js @@ -1655,7 +1655,6 @@ var mode = current(); var next = modes[(modes.indexOf(mode) + 1) % modes.length]; button.querySelector('[data-theme-icon]').textContent = THEME_ICONS[mode]; - button.querySelector('[data-theme-label]').textContent = label(mode); var text = button.getAttribute('data-label-prefix') + ': ' + label(mode) + ', ' + button.getAttribute('data-label-next') + ' ' + label(next); button.setAttribute('aria-label', text);