diff options
1 files changed, 41 insertions, 0 deletions
| -rw-r--r-- | exampleSite/content/home/shortcodes/fragment.md | 41 |
diff --git a/exampleSite/content/home/shortcodes/fragment.md b/exampleSite/content/home/shortcodes/fragment.md new file mode 100644 index 0000000..e53592c --- /dev/null +++ b/exampleSite/content/home/shortcodes/fragment.md @@ -0,0 +1,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 + |
