Add big list of Reveal.js slide attributes to the docs

This commit is contained in:
dzello 2018-07-22 18:42:27 +02:00
parent 3e34fe3bc9
commit b1bf995acd
2 changed files with 50 additions and 3 deletions

View File

@ -158,7 +158,7 @@ Like fragment but more terse - content is placed inline in a self-closing shortc
#### slide shortcode
The slide shortcode lets you set custom Reveal.js attributes for each slide - things like id, transition, background and [much more](https://github.com/hakimel/reveal.js/#slide-attributes).
The slide shortcode lets you set custom Reveal.js attributes for each slide - things like id, transition, background and [much more](https://github.com/hakimel/reveal.js/#slide-attributes). The names are the same as Reveal.js but without the 'data-' prefix.
```markdown
{{% slide id="hello" background="#FFF" transition="zoom" transition-speed="fast" %}}
@ -168,6 +168,29 @@ The slide shortcode lets you set custom Reveal.js attributes for each slide - th
{{% /slide %}}
```
Here's a list of documented slide attributes from the Reveal.js docs:
- `autoslide`
- `state`
- `background`
- `background-color`
- `background-image`
- `background-size`
- `background-position`
- `background-repeat`
- `background-video`
- `background-video-loop`
- `background-video-muted`
- `background-interactive`
- `background-iframe`
- `background-transition`
- `transition` (can have different in and out transitions)
- `transition-speed`
- `notes` (can also use the note shortcode)
- `timing`
You can also pass through your own, a `data-` prefix will be added automatically to each one.
#### section shortcode
To create groups of slides that can be navigated vertically, surround your markdown with the section shortcode.

View File

@ -6,8 +6,6 @@ weight = 34
Customize individual slide attributes like id, background color and transition. Use the same keys as Reveal.js but omit the 'data-' prefix.
[See more attributes](https://github.com/hakimel/reveal.js#slide-attributes)
---
{{% slide id="custom-1" transition="zoom" transition-speed="fast" %}}
@ -55,6 +53,32 @@ Go to [custom slide 1](#custom-1)
---
Slide attribute possibilities from the [Reveal.js docs](https://github.com/hakimel/reveal.js):
- `autoslide`
- `state`
- `background`
- `background-color`
- `background-image`
- `background-size`
- `background-position`
- `background-repeat`
---
- `background-video`
- `background-video-loop`
- `background-video-muted`
- `background-interactive`
- `background-iframe`
- `background-transition`
- `transition` (can have different in and out transitions)
- `transition-speed`
- `notes` (can also use the note shortcode)
- `timing`
---
{{% section %}}
{{% slide content="home.example" /%}}