I used https://revealjs.com/ in the past for this successfully. I have very good experience with that from circa 10 years ago.
HTML Slides with notes
41–46 of 46 posts
Re: HTML Slides with notes
#42(i = slide.nextElementSibling)?.className == "slidenote" ? i : slide ]), An alternative approach: slide.querySelector(":scope+.slidenote") ?? slide (|| would work just as well as ??, but ?? feels more appropriate.)
You could also make the notes mandatory.
Notes:
Hide
Inline
Only
Slide
Notes
section {
position: relative;
}
aside {
background: #feb;
padding: 1em;
body:has(#notes-only:checked) & {
position: absolute;
inset: 0;
}
body:has(#notes-inline:checked) & {
margin-top: auto; /* concept: if the slide uses flex, notes can try sticking to the bottom */
}
body:has(#notes-hide:checked) & {
display: none;
}
}
Re: HTML Slides with notes
#43I used https://revealjs.com/ in the past for this successfully. I have very good experience with that from circa 10 years ago.
... in 22 lines of JavaScript?
ps: one thing I like on HN is the many related projects linked for each interesting topic, which allow discovery of new tools.
Re: HTML Slides with notes
#44Earlier quoted context omitted.
You could also make the notes mandatory.
Or put the notes inside the slide, and then CSS is enough, the JavaScript doesn’t even need to know about notes: Notes: Hide Inline Only Slide Notes section { position: relative; } aside { background: #feb; padding: 1em; body:has(#notes-only:checked) & { position: absolute; inset: 0; } body:has(#notes-inline:checked) & { margin-top: auto; /* concept: if the slide uses flex, notes can try sticking to the bottom */ } b…
This seems perfectly heretical.
document.write(`
.${location.search.replace(/\W/g, '')}{
display:none
}
`)
Re: HTML Slides with notes
#45Re: HTML Slides with notes
#46I find the notes mode confusing. You can't tell if you're viewing a note or a slide. Why would you use it? In PowerPoint the point of notes is to have an aside view for the presenter for extra info. Here all is revealed to the viewer.
Open the page in two windows, with one that has note mode enabled
Wasn't familiar with BroadcastChannel, which allows communication between different ... windows and tabs ... of the same origin
https://developer.mozilla.org/en-US/docs/Web/API/BroadcastCh...