Merge pull request 'Enlarge participant headings and make theme switch icon-only' (#17) from fix/participant-heading-theme-icon into main
CI / Deploy / test (push) Successful in 52s
CI / Deploy / deploy (push) Successful in 3s

Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
gnilebein committed 2026-11-07 16:49:52 +01:00
commit a138425ab0
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -1,6 +1,7 @@
<?php <?php
/** /**
* Button that cycles the colour scheme (wired up by webroot/js/plenario.js `Theme`). * Icon-only button that cycles the colour scheme (wired up by webroot/js/plenario.js `Theme`);
* the current and next scheme are in aria-label and title.
* Without JavaScript it stays hidden, the system setting applies. * Without JavaScript it stays hidden, the system setting applies.
* *
* @var \App\View\AppView $this * @var \App\View\AppView $this
@@ -18,7 +19,6 @@ $class ??= 'theme-switch';
data-label-prefix="<?= __('Farbschema') ?>" data-label-next="<?= __('wechseln zu') ?>" data-label-prefix="<?= __('Farbschema') ?>" data-label-next="<?= __('wechseln zu') ?>"
<?= !empty($shortcut) ? 'aria-keyshortcuts="' . h($shortcut) . '"' : '' ?>> <?= !empty($shortcut) ? 'aria-keyshortcuts="' . h($shortcut) . '"' : '' ?>>
<span class="theme-switch__icon" aria-hidden="true" data-theme-icon></span> <span class="theme-switch__icon" aria-hidden="true" data-theme-icon></span>
<span data-theme-label></span>
<?php if (!empty($shortcut)) : ?> <?php if (!empty($shortcut)) : ?>
<kbd class="ctrl__key" aria-hidden="true">[<?= h($shortcut) ?>]</kbd> <kbd class="ctrl__key" aria-hidden="true">[<?= h($shortcut) ?>]</kbd>
<?php endif; ?> <?php endif; ?>
+4 -3
View File
@@ -309,7 +309,8 @@ textarea { resize: vertical; }
/* ---------------------------------------------------------------- participant */ /* ---------------------------------------------------------------- participant */
.participant .main { max-width: 640px; } .participant .main { max-width: 640px; }
.participant .site-nav { display: none; } .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; } .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 { 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); } .choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
@@ -603,6 +604,6 @@ body.present {
.qr-overlay p { font-size: 1.4rem; } .qr-overlay p { font-size: 1.4rem; }
/* ---------------------------------------------------------------- theme switch */ /* ---------------------------------------------------------------- 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: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; }
-1
View File
@@ -1807,7 +1807,6 @@
var mode = current(); var mode = current();
var next = modes[(modes.indexOf(mode) + 1) % modes.length]; var next = modes[(modes.indexOf(mode) + 1) % modes.length];
button.querySelector('[data-theme-icon]').textContent = THEME_ICONS[mode]; 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) + ', ' var text = button.getAttribute('data-label-prefix') + ': ' + label(mode) + ', '
+ button.getAttribute('data-label-next') + ' ' + label(next); + button.getAttribute('data-label-next') + ' ' + label(next);
button.setAttribute('aria-label', text); button.setAttribute('aria-label', text);