git.iko.soy/typeable/pandoc
on master help sign in
Add title-slide-attributes variable to reveal.js template. (#5981)
90804b5Frederik Elwert
MANUAL.txt+11
@@ -2127,6 +2127,10 @@ To turn off boolean flags that default to true in reveal.js, use `0`.
2127`slideous-url`
2127`slideous-url`
2128: base URL for Slideous documents (defaults to `slideous`)
2128: base URL for Slideous documents (defaults to `slideous`)
2129
2129
2130+`title-slide-attributes`
2131+: additional attributes for the title slide of reveal.js slide shows.
2132+ See [background in reveal.js and beamer] for an example.
2133+
2130[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration
2134[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration
2131
2135
2132### Variables for Beamer slides
2136### Variables for Beamer slides
@@ -5369,6 +5373,10 @@ Other reveal.js background settings also work on individual slides, including
5369`data-background-size`, `data-background-repeat`, `data-background-color`,
5373`data-background-size`, `data-background-repeat`, `data-background-color`,
5370`data-transition`, and `data-transition-speed`.
5374`data-transition`, and `data-transition-speed`.
5371
5375
5376+To add a background image to the automatically generated title slide, use the
5377+`title-slide-attributes` variable in the YAML metadata block. It must contain
5378+a map of attribute names and values.
5379+
5372See the [reveal.js
5380See the [reveal.js
5373documentation](https://github.com/hakimel/reveal.js#slide-backgrounds)
5381documentation](https://github.com/hakimel/reveal.js#slide-backgrounds)
5374for more details.
5382for more details.
@@ -5379,6 +5387,9 @@ For example in reveal.js:
5379---
5387---
5380title: My Slideshow
5388title: My Slideshow
5381parallaxBackgroundImage: /path/to/my/background_image.png
5389parallaxBackgroundImage: /path/to/my/background_image.png
5390+title-slide-attributes:
5391+ data-background-image: /path/to/title_image.png
5392+ data-background-size: contain
5382---
5393---
5383
5394
5384## Slide One
5395## Slide One
data/templates/default.revealjs+1−1
@@ -55,7 +55,7 @@ $endfor$
55 <div class="slides">
55 <div class="slides">
56
56
57$if(title)$
57$if(title)$
58−<section id="$idprefix$title-slide">
58+<section id="$idprefix$title-slide"$for(title-slide-attributes/pairs)$ $it.key$="$it.value$"$endfor$>
59 <h1 class="title">$title$</h1>
59 <h1 class="title">$title$</h1>
60$if(subtitle)$
60$if(subtitle)$
61 <p class="subtitle">$subtitle$</p>
61 <p class="subtitle">$subtitle$</p>