gtm-test-site/themes/papercss-hugo-theme/layouts/shortcodes/collapsible.html
2024-01-23 17:47:24 +03:00

17 lines
413 B
HTML

{{ $summary := .Get 0 | markdownify }}
{{ $body := .Inner | markdownify }}
{{ $seed := "yolo" }}
{{ $random := delimit (shuffle (split (md5 $seed) "" )) "" }}
{{ $id := printf "collapsible_%s" $random }}
<div class="collapsible">
<input id="{{ $id }}" type="checkbox" name="collapsible">
<label for="{{ $id }}">
{{ $summary }}
</label>
<div class="collapsible-body">
{{ $body }}
</div>
</div>