Add title-slide-attributes variable to reveal.js template. (#5981)

This commit is contained in:
Frederik Elwert 2019-12-11 17:26:54 +01:00 committed by John MacFarlane
parent a0df2f676c
commit 90804b5506
2 changed files with 12 additions and 1 deletions

View file

@ -2127,6 +2127,10 @@ To turn off boolean flags that default to true in reveal.js, use `0`.
`slideous-url` `slideous-url`
: base URL for Slideous documents (defaults to `slideous`) : base URL for Slideous documents (defaults to `slideous`)
`title-slide-attributes`
: additional attributes for the title slide of reveal.js slide shows.
See [background in reveal.js and beamer] for an example.
[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration [reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration
### Variables for Beamer slides ### Variables for Beamer slides
@ -5369,6 +5373,10 @@ Other reveal.js background settings also work on individual slides, including
`data-background-size`, `data-background-repeat`, `data-background-color`, `data-background-size`, `data-background-repeat`, `data-background-color`,
`data-transition`, and `data-transition-speed`. `data-transition`, and `data-transition-speed`.
To add a background image to the automatically generated title slide, use the
`title-slide-attributes` variable in the YAML metadata block. It must contain
a map of attribute names and values.
See the [reveal.js See the [reveal.js
documentation](https://github.com/hakimel/reveal.js#slide-backgrounds) documentation](https://github.com/hakimel/reveal.js#slide-backgrounds)
for more details. for more details.
@ -5379,6 +5387,9 @@ For example in reveal.js:
--- ---
title: My Slideshow title: My Slideshow
parallaxBackgroundImage: /path/to/my/background_image.png parallaxBackgroundImage: /path/to/my/background_image.png
title-slide-attributes:
data-background-image: /path/to/title_image.png
data-background-size: contain
--- ---
## Slide One ## Slide One

View file

@ -55,7 +55,7 @@ $endfor$
<div class="slides"> <div class="slides">
$if(title)$ $if(title)$
<section id="$idprefix$title-slide"> <section id="$idprefix$title-slide"$for(title-slide-attributes/pairs)$ $it.key$="$it.value$"$endfor$>
<h1 class="title">$title$</h1> <h1 class="title">$title$</h1>
$if(subtitle)$ $if(subtitle)$
<p class="subtitle">$subtitle$</p> <p class="subtitle">$subtitle$</p>