Add a speaker view with a next-slide preview and keep the live slide in view
- New /admin/{token}/speaker page for a second window: current slide, preview of
the next slide and the usual controls. It does not start the presentation.
- The presenter state gets `next` (labels only, no solutions).
- The dashboard scrolls the live slide into view when the presenter moves on.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8262411225
commit
66ed198f87
11 files changed
+264
-5
No files matched your search
@@ -4,6 +4,7 @@
|
||||
* (Plenario.presenter) from /admin/{token}/state.
|
||||
*
|
||||
* Keyboard: ←/→ slides, P pause/resume (→ resumes too), V voting on/off, H hide results, F fullscreen, Q QR code, T light/dark.
|
||||
* The speaker view (admin:speaker) is this page plus a preview of the next slide, meant for the presenter's own screen.
|
||||
* Q&A slides: V switches to the next stage; while discussing ←/→ step through the questions first.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
@@ -12,11 +13,13 @@
|
||||
* @var string $joinUrl
|
||||
* @var string $joinBaseUrl
|
||||
* @var int $pollIntervalMs
|
||||
* @var bool|null $speaker Speaker view (second window): adds the preview of the next slide
|
||||
*/
|
||||
$speaker = $speaker ?? false;
|
||||
$this->assign('title', $poll->title);
|
||||
$host = preg_replace('#^https?://#', '', $joinBaseUrl);
|
||||
?>
|
||||
<div class="stage"
|
||||
<div class="stage<?= $speaker ? ' stage--speaker' : '' ?>"
|
||||
data-presenter
|
||||
data-state-url="<?= $this->Url->build(['_name' => 'admin:state', 'token' => $adminToken]) ?>"
|
||||
data-control-url="<?= $this->Url->build(['_name' => 'admin:control', 'token' => $adminToken]) ?>"
|
||||
@@ -42,8 +45,24 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
|
||||
<div class="stage__results" data-results></div>
|
||||
</main>
|
||||
|
||||
<?php if ($speaker) : ?>
|
||||
<aside class="stage__next" data-next aria-label="<?= h(__('Nächste Folie')) ?>">
|
||||
<p class="stage__next-label"><?= __('Als Nächstes') ?> <span data-next-meta></span></p>
|
||||
<h2 class="stage__next-question" data-next-question></h2>
|
||||
<div class="stage__next-description formatted" data-next-description></div>
|
||||
<ul class="stage__next-options" data-next-options></ul>
|
||||
<p class="stage__next-note muted" data-next-note></p>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="stage__controls">
|
||||
<a class="ctrl" href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>" title="<?= __('Zur Verwaltung') ?>">✎</a>
|
||||
<?php if (!$speaker) : ?>
|
||||
<a class="ctrl" href="<?= $this->Url->build(['_name' => 'admin:speaker', 'token' => $adminToken]) ?>" target="_blank" rel="noopener"
|
||||
title="<?= __('Referentenansicht in neuem Fenster öffnen (mit Vorschau der nächsten Folie)') ?>">
|
||||
<span aria-hidden="true">⧉</span><span class="sr-only"><?= __('Referentenansicht öffnen') ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="ctrl" data-action="prev" aria-keyshortcuts="ArrowLeft PageUp" title="<?= __('Vorherige Folie (←)') ?>">
|
||||
<span aria-hidden="true">←</span><span class="sr-only"><?= __('Vorherige Folie') ?></span>
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user