transition-speed param and example cleanup

This commit is contained in:
dzello 2018-04-30 23:02:09 -07:00
parent f7427d4631
commit 99b4363c90
6 changed files with 18 additions and 11 deletions

View File

@ -1,5 +1,5 @@
+++
title = "Welcome to reveal-hugo!"
title = "reveal-hugo features and usage"
outputs = ["Reveal"]
+++

View File

@ -20,7 +20,7 @@ The `fragment` shortcode makes content appear incrementally.
## Frag shortcode
The `frag` shortcode more terse than `fragment`. It accepts a `c` attribute.
The `frag` shortcode is more terse than `fragment`. It accepts a `c` attribute.
```
{{</* frag c="One" */>}}

View File

@ -14,7 +14,7 @@ This markdown is not processed by Hugo, but by Reveal.js itself.
Many handy slide shortcuts and customizations are possible.
[See them all](https://github.com/hakimel/reveal.js#markdown)
[See the Reveal.js markdown docs](https://github.com/hakimel/reveal.js#markdown)
---
@ -23,8 +23,12 @@ Many handy slide shortcuts and customizations are possible.
For example, an HTML comment can change the background color of a slide.
```
{{</* markdown */>}}
<!-- .slide: data-background="blue" -->
# I'm a blue slide
{{</* /markdown */>}}
```
{{< /markdown >}}
---

View File

@ -4,18 +4,18 @@ weight = 34
## Slide shortcode
Used to customize the parameters of individual slides like background color and transition.
Customize individual slide parameters like background color and transition.
[See all parameters](https://github.com/hakimel/reveal.js#slide-backgrounds)
---
{{% slide transition="zoom" %}}
{{% slide transition="zoom" transition-speed="fast" %}}
## Custom slide 2
## Custom slide 1
```
{{%/* slide transition="zoom" */%}}
{{%/* slide transition="zoom" transition-speed="fast" */%}}
## Custom slide 1
{{%/* /slide */%}}
```

View File

@ -1,4 +1,7 @@
<section data-noprocess data-markdown data-separator="^\r?\n---\r?\n$">
<section data-noprocess data-markdown
data-separator="^\r?\n---\r?\n$"
data-separator-vertical="^\r?\n------\r?\n$"
data-separator-notes="notes?:">
<script type="text/template">
{{ .Inner }}
</script>

View File

@ -1,7 +1,7 @@
{{ $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" "background-size" }}
{{ $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "transition-speed" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" }}
{{ $params := . }}
<section data-noprocess
{{ range $attribute := $attributes -}}
{{- range $attribute := $attributes -}}
{{- with $params.Get $attribute }} data-{{ $attribute | safeHTMLAttr }}="{{ . }}"{{ end -}}
{{- end -}}
>