Website Summary Files Commits Branches @commit @diff @stats
path: root / website / themes / reveal-hugo / exampleSite / content / plugin-example / _index.md
blob: 507eb5adae560473a4e416903323b4eea001d986 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
+++
title = "plugin-example"
description = "Shows how a Reveal.js plugin can be added and used"
outputs = ["Reveal"]
[reveal_hugo]
theme = "night"
margin = 0.2
plugins = ["plugin/gallery/gallery.plugin.js"]
+++

# plugin-example

---

This presentation demonstrates how a Reveal.js plugin can be added.

---

The plugin is called [revealjs-simple-gallery](https://github.com/marcins/revealjs-simple-gallery).

---

It can make any slide an image gallery. Here are a few examples.

---

<ul class="gallery">
  <li><img src="sample1.jpg" alt="Default settings (Photo by Oscar Fernandez Alonso on Flickr)"></li>
  <li><img src="sample2.jpg" alt="Default settings (Photo by bullcitydogs on Flickr)"></li>
  <li><img src="sample3.jpg" alt="Default settings (Photo by Lance McCord on Flickr)"></li>
</ul>

---

<ul class="gallery" data-iterations="0" data-interval="1">
  <li><img src="sample1.jpg" alt="Infinite iterations, fast transition (Photo by Oscar Fernandez Alonso on Flickr)"></li>
  <li><img src="sample2.jpg" alt="Infinite iterations, fast transition (Photo by bullcitydogs on Flickr)"></li>
  <li><img src="sample3.jpg" alt="Infinite iterations, fast transition (Photo by Lance McCord on Flickr)"></li>
</ul>

---

<ul class="gallery" data-iterations="2" data-interval="2" data-mode="full-screen">
  <li><img src="sample1.jpg" alt="Full screen, two iterations, slow transition (Photo by Oscar Fernandez Alonso on Flickr)"></li>
  <li><img src="sample2.jpg" alt="Full screen, two iterations, slow transition (Photo by bullcitydogs on Flickr)"></li>
  <li><img src="sample3.jpg" alt="Full screen, two iterations, slow transition (Photo by Lance McCord on Flickr)"></li>
</ul>

---

See the [revealjs-simple-gallery GitHub repo](https://github.com/marcins/revealjs-simple-gallery) to learn about more customization options.

---

These were the steps to use this plugin for this reveal-hugo presentation.

---

### 1

Copy the plugin CSS and JavaScript into the static directory

---

### 2

Add the JavaScript file path to the `plugins` field in the front matter

---

### 3

Create a `head.html` partial inside of `layouts/partials/plugin-example/reveal-hugo`

---

### 4

In `head.html`, add a stylesheet link tag that loads the plugin CSS

---

## THE END