mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 16:15:51 +00:00
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).
6 lines
280 B
HTML
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> |