transition-speed param and example cleanup
This commit is contained in:
parent
f7427d4631
commit
99b4363c90
6 changed files with 18 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Welcome to reveal-hugo!"
|
title = "reveal-hugo features and usage"
|
||||||
outputs = ["Reveal"]
|
outputs = ["Reveal"]
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ The `fragment` shortcode makes content appear incrementally.
|
||||||
|
|
||||||
## Frag shortcode
|
## 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" */>}}
|
{{</* frag c="One" */>}}
|
||||||
|
|
|
@ -14,7 +14,7 @@ This markdown is not processed by Hugo, but by Reveal.js itself.
|
||||||
|
|
||||||
Many handy slide shortcuts and customizations are possible.
|
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.
|
For example, an HTML comment can change the background color of a slide.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
{{</* markdown */>}}
|
||||||
<!-- .slide: data-background="blue" -->
|
<!-- .slide: data-background="blue" -->
|
||||||
|
# I'm a blue slide
|
||||||
|
{{</* /markdown */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /markdown >}}
|
{{< /markdown >}}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
|
@ -4,18 +4,18 @@ weight = 34
|
||||||
|
|
||||||
## Slide shortcode
|
## 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)
|
[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
|
## Custom slide 1
|
||||||
{{%/* /slide */%}}
|
{{%/* /slide */%}}
|
||||||
```
|
```
|
||||||
|
|
|
@ -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">
|
<script type="text/template">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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 := . }}
|
{{ $params := . }}
|
||||||
<section data-noprocess
|
<section data-noprocess
|
||||||
{{ range $attribute := $attributes -}}
|
{{- range $attribute := $attributes -}}
|
||||||
{{- with $params.Get $attribute }} data-{{ $attribute | safeHTMLAttr }}="{{ . }}"{{ end -}}
|
{{- with $params.Get $attribute }} data-{{ $attribute | safeHTMLAttr }}="{{ . }}"{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue