Move screen tools to header as icon buttons
Fullscreen and keep-awake sit next to the theme switch (layout block headerTools), icon only with aria-label/title. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1efa61f9bc
commit
cae11c4f40
5 files changed
+34
-14
No files matched your search
@@ -40,13 +40,26 @@ $countdown = function (?int $remaining): string {
|
||||
|
||||
<p class="eyebrow eyebrow--poll center"><?= h($poll->title) ?></p>
|
||||
|
||||
<?php // Both buttons stay hidden unless the browser supports the API (no fullscreen on iPhone Safari). ?>
|
||||
<div class="screen-tools center" role="group" aria-label="<?= h(__('Anzeige')) ?>">
|
||||
<button type="button" class="button button--small" data-fullscreen-toggle hidden aria-pressed="false"
|
||||
data-label-on="<?= h(__('Vollbild beenden')) ?>" data-label-off="<?= h(__('Vollbild')) ?>"><?= __('Vollbild') ?></button>
|
||||
<button type="button" class="button button--small" data-wakelock-toggle hidden aria-pressed="false"
|
||||
data-label-on="<?= h(__('Display bleibt an')) ?>" data-label-off="<?= h(__('Display anlassen')) ?>"><?= __('Display bleibt an') ?></button>
|
||||
</div>
|
||||
<?php // Icon buttons in the header, next to the theme switch. Hidden unless the browser supports the API (no fullscreen on iPhone). ?>
|
||||
<?php $this->start('headerTools'); ?>
|
||||
<button type="button" class="theme-switch" data-fullscreen-toggle hidden aria-pressed="false"
|
||||
data-label-on="<?= h(__('Vollbild beenden')) ?>" data-label-off="<?= h(__('Vollbild')) ?>"
|
||||
aria-label="<?= h(__('Vollbild')) ?>" title="<?= h(__('Vollbild')) ?>">
|
||||
<svg class="theme-switch__icon" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="theme-switch" data-wakelock-toggle hidden aria-pressed="false"
|
||||
data-label-on="<?= h(__('Display bleibt an – tippen zum Ausschalten')) ?>"
|
||||
data-label-off="<?= h(__('Display bleibt nicht an – tippen zum Anlassen')) ?>"
|
||||
aria-label="<?= h(__('Display anlassen')) ?>" title="<?= h(__('Display anlassen')) ?>">
|
||||
<svg class="theme-switch__icon" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>
|
||||
</svg>
|
||||
</button>
|
||||
<?php $this->end(); ?>
|
||||
|
||||
<?php if (!$poll->is_active) : ?>
|
||||
<section class="card center">
|
||||
|
||||
@@ -32,7 +32,10 @@ $title = $this->fetch('title');
|
||||
<a href="<?= $this->Url->build(['_name' => 'join']) ?>"><?= __('Teilnehmen') ?></a>
|
||||
<a href="<?= $this->Url->build(['_name' => 'recover']) ?>"><?= __('Admin-Link verloren?') ?></a>
|
||||
</nav>
|
||||
<?= $this->element('theme_switch') ?>
|
||||
<div class="header-tools">
|
||||
<?= $this->fetch('headerTools') ?>
|
||||
<?= $this->element('theme_switch') ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container main">
|
||||
|
||||
Reference in new issue
Block a user