Live data from Hacker News

HTML Slides with notes

nbd.neocities.org

41–46 of 46 posts

Re: HTML Slides with notes

#42
post #37

(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.

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 */
          }

          body:has(#notes-hide:checked) & {
              display: none;
          }
      }
  

Re: HTML Slides with notes

#43

I 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?

Not, but in an actually useful way.

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

#44
post #37

Earlier 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…

I think one would want either slides or notes?

This seems perfectly heretical.

    
    document.write(`
    
    .${location.search.replace(/\W/g, '')}{
      display:none
    }
    
    `)
    

Re: HTML Slides with notes

#45

Nice, I hv been working on engine that renders pptx (without compromising original styles) in web browsers...

Have you check https://pitch.com/ ?

nope, however my use case requires high level of customization so I had to build it from scratch...

Re: HTML Slides with notes

#46
post #21
post #20

I 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

Thanks, I totally missed that the site is intended to be opened in multiple windows/tabs! That lede is buried in the code.

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...

Post reply on HN