mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-05 16:13:52 +00:00
See https://discord.com/channels/722225264733716590/738924091511144489/1406144559188283494 See https://gohugo.io/templates/new-templatesystem-overview/
19 lines
566 B
HTML
19 lines
566 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#toggle-list
|
|
|
|
Parameters
|
|
----------
|
|
text :
|
|
Spoiler title.
|
|
class : optional
|
|
Additional class for <details> tag.
|
|
style : optional
|
|
Additional style for <details> tag.
|
|
*/}}
|
|
|
|
{{- $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> |