2018-04-30 20:47:20 -05:00
|
|
|
+++
|
|
|
|
weight = 34
|
|
|
|
+++
|
|
|
|
|
2018-07-19 09:49:24 -05:00
|
|
|
## Slide
|
2018-04-30 20:47:20 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
Use this shortcode when you need to customize slide attributes like id, class, background color and transition.
|
2018-04-30 20:47:20 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-08-13 16:57:09 -05:00
|
|
|
{{< slide class="hello" >}}
|
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
## Slide
|
2018-04-30 20:47:20 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
Add the shortcode above the slide's content, below the `---`.
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
---
|
|
|
|
|
|
|
|
{{</* slide class="hello" */>}}
|
2018-04-30 20:47:20 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
## Hello, world!
|
|
|
|
|
|
|
|
---
|
2018-04-30 20:47:20 -05:00
|
|
|
```
|
2018-08-03 09:07:12 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
{{< slide transition="zoom" transition-speed="fast" >}}
|
2018-07-19 09:49:24 -05:00
|
|
|
|
2018-04-30 20:47:20 -05:00
|
|
|
## Custom slide 1
|
2018-07-19 09:49:24 -05:00
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
<small>Did you notice? This slide has a fast zoom transition.</small>
|
2018-04-30 20:47:20 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
```markdown
|
2018-08-03 09:32:50 -05:00
|
|
|
---
|
|
|
|
|
|
|
|
{{</* slide transition="zoom" transition-speed="fast" */>}}
|
2018-08-03 09:07:12 -05:00
|
|
|
|
|
|
|
## Custom slide 1
|
2018-08-03 09:32:50 -05:00
|
|
|
|
|
|
|
---
|
2018-08-03 09:07:12 -05:00
|
|
|
```
|
2018-04-30 20:47:20 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
{{< slide background="#FF4081" >}}
|
2018-04-30 20:47:20 -05:00
|
|
|
|
|
|
|
## Custom slide 2
|
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
<small>This slide has a different background color.</small>
|
2018-07-19 09:49:24 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
```markdown
|
2018-08-03 09:32:50 -05:00
|
|
|
---
|
|
|
|
|
|
|
|
{{</* slide background="#FF4081" */>}}
|
2018-07-19 09:49:24 -05:00
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
## Custom slide 2
|
2018-08-03 09:32:50 -05:00
|
|
|
|
|
|
|
---
|
2018-04-30 20:47:20 -05:00
|
|
|
```
|
|
|
|
|
2018-07-21 03:55:03 -05:00
|
|
|
---
|
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
{{< slide id="custom-slide" >}}
|
|
|
|
|
2018-07-22 11:25:48 -05:00
|
|
|
💡 Tip: Setting a slide's `id` attribute makes it easy to link to from other parts of the presentation.
|
2018-08-03 09:07:12 -05:00
|
|
|
<br><br>
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
---
|
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
{{</* slide id="custom-slide" */>}}
|
|
|
|
|
|
|
|
## Custom slide
|
2018-08-03 09:07:12 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
```
|
2018-07-22 11:25:48 -05:00
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
---
|
|
|
|
|
2018-07-22 11:25:48 -05:00
|
|
|
```markdown
|
2018-08-03 09:32:50 -05:00
|
|
|
[Try the link](#custom-slide)
|
2018-07-22 11:25:48 -05:00
|
|
|
```
|
|
|
|
|
2018-08-03 09:32:50 -05:00
|
|
|
<br>
|
|
|
|
[Try the link](#custom-slide)
|
2018-07-22 11:25:48 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-22 11:42:27 -05:00
|
|
|
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`
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-21 03:55:03 -05:00
|
|
|
{{% section %}}
|
|
|
|
|
2018-07-22 17:44:05 -05:00
|
|
|
## Slide templates
|
|
|
|
|
|
|
|
Store sets of common slide attributes in front matter variables and apply them to slides with the template attribute.
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<small>
|
|
|
|
navigate down to learn more
|
|
|
|
</small>
|
|
|
|
<br>
|
|
|
|
<a href="#" class="navigate-down">🔽</a>
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Create templates in config.toml, _index.md or the current page's front matter. Put them under the **templates** key with a meaningful name:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[reveal_hugo.templates.hotpink]
|
2018-07-22 17:49:48 -05:00
|
|
|
class = "hotpink"
|
2018-07-22 17:44:05 -05:00
|
|
|
background = "#FF4081"
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
{{< slide template="hotpink" >}}
|
2018-07-22 17:44:05 -05:00
|
|
|
|
|
|
|
Apply the template using the **template** attribute of the slide shortcode:
|
|
|
|
|
|
|
|
```markdown
|
2018-08-03 09:07:12 -05:00
|
|
|
{{</* slide template="hotpink" */>}}
|
2018-07-22 17:44:05 -05:00
|
|
|
|
|
|
|
# I'm a hot pink slide!
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-23 03:49:05 -05:00
|
|
|
If a template exists in multiple configurations, it's properties will be merged. If a property is declared multiple times, the order of precedence is:
|
|
|
|
|
|
|
|
- page
|
|
|
|
- section (_index.md)
|
|
|
|
- site (config.toml)
|
2018-07-22 17:44:05 -05:00
|
|
|
|
|
|
|
{{% /section %}}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
{{% section %}}
|
|
|
|
|
2018-08-03 09:07:12 -05:00
|
|
|
{{< slide content="home.reusable" >}}
|
2018-07-21 03:55:03 -05:00
|
|
|
|
|
|
|
{{% /section %}}
|
2018-08-13 18:00:03 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
{{% section %}}
|
|
|
|
|
|
|
|
## Slide-specific CSS
|
|
|
|
|
|
|
|
Add more variety to your presentation by applying slide-specific CSS.
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<small>
|
|
|
|
navigate down to learn more
|
|
|
|
</small>
|
|
|
|
<br>
|
|
|
|
<a href="#" class="navigate-down">🔽</a>
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
First, use the `slide` shortcode to give the slide a class:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
---
|
|
|
|
|
|
|
|
{{</* slide class="side-by-side" */>}}
|
|
|
|
|
|
|
|
# 📈
|
|
|
|
|
|
|
|
# 📊
|
|
|
|
|
|
|
|
---
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Next, use a layout extension partial like `reveal-hugo/head.html` to add CSS selectors:
|
|
|
|
|
|
|
|
```html
|
|
|
|
<style>
|
|
|
|
.reveal section.side-by-side h1 {
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.reveal section.side-by-side h1:first-of-type {
|
|
|
|
left: 25%;
|
|
|
|
}
|
|
|
|
.reveal section.side-by-side h1:nth-of-type(2) {
|
|
|
|
right: 25%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
{{< slide class="side-by-side" >}}
|
|
|
|
|
|
|
|
# 📈
|
|
|
|
|
|
|
|
# 📊
|
|
|
|
|
|
|
|
{{% /section %}}
|