Files
HugoBlox-kit/wowchemy/layouts/shortcodes/spoiler.html
T
George Cushen dd2bde730e feat(shortcode): migrate Spoiler to new standardized HTML
Toggle lists have now been standardized in HTML. Functions just like the toggle lists on Github.

Also now supports Markdown in title and works better with longer titles (unlike the previous button based component).
2020-12-19 20:17:58 +00:00

6 lines
280 B
HTML

{{- $id := printf "spoiler-%d" .Ordinal -}}
<details class="spoiler {{ .Get "class" }}" {{ with .Get "style" }}style="{{ . | safeCSS }}"{{ end }} id="{{$id}}">
<summary>{{ .Get "text" | markdownify | emojify }}</summary>
<p>{{ .Inner | markdownify | emojify }}</p>
</details>