Refine presentation flow and speaker notes

This commit is contained in:
Codex
2026-09-24 22:28:58 +02:00
parent d5310d5a3f
commit 08f42a5f48
6 changed files with 162 additions and 276 deletions
+2 -17
View File
@@ -19,20 +19,8 @@
let lastPreviewSeen = 0;
let notesSize = 25;
let blocked = false;
const urlFor = role => `../deck/index.html?v=18&view=${role}&session=${encodeURIComponent(session)}`;
const urlFor = role => `../deck/index.html?v=19&view=${role}&session=${encodeURIComponent(session)}`;
const pad = value => String(value).padStart(2, '0');
function showNoteLens(event) {
const cue = event.target.closest('[data-note-lens]');
if (!cue || !slides[current?.index]?.popups.some(popup => popup.kind === 'lens' && popup.key === cue.dataset.noteLens)) return;
if (current?.popup?.key !== cue.dataset.noteLens) command('popup', { popup: { kind: 'lens', key: cue.dataset.noteLens } });
}
$('notes').addEventListener('click', showNoteLens);
$('notes').addEventListener('click', event => {
const cue = event.target.closest('[data-note-screenshot]');
if (cue && slides[current?.index]?.popups.some(popup => popup.kind === 'screenshot' && popup.key === cue.dataset.noteScreenshot)) {
command('popup', { popup: { kind: 'screenshot', key: cue.dataset.noteScreenshot } });
}
});
function renderNotes(html) {
const template = document.createElement('template');
template.innerHTML = html;
@@ -99,8 +87,6 @@
$('next').disabled = state.index === slides.length - 1;
$('close-popup').disabled = !state.popup;
if (changed) {
$('notes-number').textContent = `SLIDE ${pad(state.index + 1)}`;
$('notes-title').textContent = slide.title;
// Trusted, same-origin authored notes, never channel-provided HTML.
if (!slide.popupNotes?.length) renderNotes(slide.notes);
currentNoteKey = null;
@@ -157,7 +143,6 @@
|| slide.popupNotes[0];
if (note.key !== currentNoteKey) {
currentNoteKey = note.key;
$('notes-title').textContent = note.title;
renderNotes(note.html);
$('reading').scrollTop = 0;
}
@@ -208,7 +193,7 @@
updateNextPreview();
});
// No session token: the thumbnail must never navigate or publish to the audience.
nextPreview.src = '../deck/index.html?v=18&view=thumbnail#/1';
nextPreview.src = '../deck/index.html?v=19&view=thumbnail#/1';
const stage = document.querySelector('.stage');
function sizeCurrentPreview() {
const style = getComputedStyle(stage);