This repository has been archived on 2024-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
vitrine/themes/reveal-hugo/exampleSite/content/home/shortcodes/fragment.md

42 lines
800 B
Markdown
Raw Normal View History

2022-01-05 23:28:57 +01:00
+++
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