Pass through all slide shortcode params to section

Now slides can have ids and arbitrary data attributes, and a whitelist of valid attributes no longer needs to be maintained.
This commit is contained in:
dzello
2018-07-22 18:25:48 +02:00
parent 27e0dc2aa0
commit 3e34fe3bc9
3 changed files with 28 additions and 11 deletions
+19 -6
View File
@@ -4,18 +4,18 @@ weight = 34
## Slide
Customize individual slide parameters like background color and transition.
Customize individual slide attributes like id, background color and transition. Use the same keys as Reveal.js but omit the 'data-' prefix.
[See all slide params](https://github.com/hakimel/reveal.js#slide-backgrounds)
[See more attributes](https://github.com/hakimel/reveal.js#slide-attributes)
---
{{% slide transition="zoom" transition-speed="fast" %}}
{{% slide id="custom-1" transition="zoom" transition-speed="fast" %}}
## Custom slide 1
```
{{%/* slide transition="zoom" transition-speed="fast" */%}}
{{%/* slide id="custom-1" transition="zoom" transition-speed="fast" */%}}
## Custom slide 1
@@ -26,12 +26,12 @@ Customize individual slide parameters like background color and transition.
---
{{% slide background-color="#FF4081" %}}
{{% slide id="custom-2" background="#FF4081" %}}
## Custom slide 2
```
{{%/* slide background-color="#FF4081" */%}}
{{%/* slide id="custom-2" background="#FF4081" */%}}
## Custom slide 2
@@ -42,6 +42,19 @@ Customize individual slide parameters like background color and transition.
---
💡 Tip: Setting a slide's `id` attribute makes it easy to link to from other parts of the presentation.
<br>
```markdown
Go to [custom slide 1](#custom-1)
```
<small>
Go to [custom slide 1](#custom-1)
</small>
---
{{% section %}}
{{% slide content="home.example" /%}}