Update ThothII presentation tour, annotated screenshots and speaker notes
This commit is contained in:
@@ -13,12 +13,13 @@
|
||||
let nextPreviewReady = false;
|
||||
let slides = [];
|
||||
let current = null;
|
||||
let currentNoteKey = null;
|
||||
let audience = null;
|
||||
let lastAudienceSeen = 0;
|
||||
let lastPreviewSeen = 0;
|
||||
let notesSize = 25;
|
||||
let blocked = false;
|
||||
const urlFor = role => `../deck/index.html?view=${role}&session=${encodeURIComponent(session)}`;
|
||||
const urlFor = role => `../deck/index.html?v=18&view=${role}&session=${encodeURIComponent(session)}`;
|
||||
const pad = value => String(value).padStart(2, '0');
|
||||
function showNoteLens(event) {
|
||||
const cue = event.target.closest('[data-note-lens]');
|
||||
@@ -101,7 +102,8 @@
|
||||
$('notes-number').textContent = `SLIDE ${pad(state.index + 1)}`;
|
||||
$('notes-title').textContent = slide.title;
|
||||
// Trusted, same-origin authored notes, never channel-provided HTML.
|
||||
renderNotes(slide.notes);
|
||||
if (!slide.popupNotes?.length) renderNotes(slide.notes);
|
||||
currentNoteKey = null;
|
||||
$('reading').scrollTop = 0;
|
||||
$('next-title').textContent = slides[state.index + 1]?.title || 'End of presentation';
|
||||
updateNextPreview();
|
||||
@@ -148,6 +150,18 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (slide.popupNotes?.length) {
|
||||
// Keep the last selected notes readable when its screenshot is closed.
|
||||
const note = slide.popupNotes.find(note => state.popup?.kind === 'screenshot' && note.key === state.popup.key)
|
||||
|| slide.popupNotes.find(note => note.key === currentNoteKey)
|
||||
|| slide.popupNotes[0];
|
||||
if (note.key !== currentNoteKey) {
|
||||
currentNoteKey = note.key;
|
||||
$('notes-title').textContent = note.title;
|
||||
renderNotes(note.html);
|
||||
$('reading').scrollTop = 0;
|
||||
}
|
||||
}
|
||||
$('popup-controls').querySelectorAll('button').forEach(button => {
|
||||
button.setAttribute('aria-pressed', String(state.popup?.kind === button.dataset.kind && state.popup?.key === button.dataset.key));
|
||||
});
|
||||
@@ -194,7 +208,7 @@
|
||||
updateNextPreview();
|
||||
});
|
||||
// No session token: the thumbnail must never navigate or publish to the audience.
|
||||
nextPreview.src = '../deck/index.html?view=thumbnail#/1';
|
||||
nextPreview.src = '../deck/index.html?v=18&view=thumbnail#/1';
|
||||
const stage = document.querySelector('.stage');
|
||||
function sizeCurrentPreview() {
|
||||
const style = getComputedStyle(stage);
|
||||
|
||||
Reference in New Issue
Block a user