Website Summary Files Commits Branches @commit @diff @stats
path: root / website / themes / reveal-hugo / exampleSite / content / home / shortcodes / fragment.md
blob: e53592cdf88aab9f38a1ebe1e4433710c3dc98a4 (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
+++
weight = 30
+++

## Fragment

The `fragment` shortcode makes content appear incrementally.

```
{{%/* fragment */%}} One {{%/* /fragment */%}}
{{%/* fragment */%}} Two {{%/* /fragment */%}}
{{%/* fragment */%}} Three {{%/* /fragment */%}}
```

{{% fragment %}} One {{% /fragment %}}
{{% fragment %}} Two {{% /fragment %}}
{{% fragment %}} Three {{% /fragment %}}

---

## Frag

The `frag` shortcode is more terse than `fragment`. It accepts a `c` attribute.

```
{{</* frag c="One" */>}}
{{</* frag c="Two" */>}}
{{</* frag c="Three" */>}}
```

{{< frag c="One" >}}
{{< frag c="Two" >}}
{{< frag c="Three" >}}

---

Both `fragment` and `frag` accept two additional parameters:

- `class`: sets the class of the wrapping `span` element
- `index`: controls the order in which sections will appear