RoamJS / presentation

MIT License
5 stars 2 forks source link

Presentation

Build slideshow presentations from within Roam!

Usage

Type {{presentation}} or {{slides}} in a block. Clicking the button will overlay a presentation directly from Roam! Exit the presentation by hitting 'ESC'.

To specify what content is part of the presentation, create a child block for each slide. The text of each child will serve as the slide title. Each child block then in turn renders its children as the slide contents in a bulleted outline. For example, the Playground presentation below uses the following structure:

- {{presentation}}
  - First Slide
  - Second Slide
    - With a Subtitle on what we're all about
  - Third Slide
    - First bullet with a point
    - Second Bullet supporting that point
      - With a nested point!
    - Third bullet sealing the deal
  - Final Slide

If a slide has {title} in the title or has no children, it will render as a title slide. Otherwise, the slide will render as a content slide.

By default, presentations start on the first slide. If the cursor is in any of the other slide trees when the button is pressed, the presentation will start on that slide. When the presentation closes, it will return focus to the title block of whichever slide it was on.

Any blocks with images will be rendered without a bullet. Any bullets that are collapsed will be filtered out of the presentation view.

Themes

There are 11 themes supported, which could be found here. To use one, add a :{theme:[value]} to the presentation button. For example, the demo below uses the black theme:

Note: currently Safari only supports the following three themes: black, white, and beige.

Apart from these themes, you could also use roam/css to style the presentation. Here are some classes to keep in mind:

Notes

To add Speaker notes, add {notes:true} to the button text. The last bullet of each child will be used as the speaker notes of the slide. To combine with theme above, the button text would look like this:

Layouts

You could configure layouts per slide. To define a layout, add a {layout:} text in the top level block with the slide title. For example, to specify the default layout, it will look like

The following layouts are also supported:

Transitions

You could configure individual slides to have custom transitions. To give a slide a transition, add the {transition:(type)} attribute next to the slide title like this:

To apply to all of the slides in a presentation, add to it inside the presentation button:

The following transition types are supported:

Collapsible

You could configure individual slides to have collapsible bullets. To make a slide collapsible, add the {collapsible} attribute next to the slide title like this:

To apply to all of the slides in a presentation, add to it inside the presentation button:

If you apply collapsible to the whole presentation, you could then ignore it for specific slides by adding :ignore to the braces.

Auto Animate

You could configure individual slides to have automatically animate between them. The extension will make its best guess on matching elements to be animated across slides. To add animation to the slide, add the {animate} attribute next to the slide title like this:

To apply to all of the slides in a presentation, add to it inside the presentation button:

Hide

You could hide certain slides from your presentation by adding {hide} to the slide title like this:

You could also hide any given bullet within the slide tree by placing {hide} on the bullet itself

Resources

Check out some of these presentations put together and made public by Ivo Velitchkov!

Demo

roamjs-presentation-demo