From b1bf995acd9e68637784ec853d1683945b4013b2 Mon Sep 17 00:00:00 2001 From: dzello Date: Sun, 22 Jul 2018 18:42:27 +0200 Subject: [PATCH] Add big list of Reveal.js slide attributes to the docs --- README.md | 25 ++++++++++++++++- exampleSite/content/home/shortcodes/slide.md | 28 ++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c10b20..4b40827 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/exampleSite/content/home/shortcodes/slide.md b/exampleSite/content/home/shortcodes/slide.md index 21458fa..7c77e51 100644 --- a/exampleSite/content/home/shortcodes/slide.md +++ b/exampleSite/content/home/shortcodes/slide.md @@ -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" /%}}