7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-22 14:21:31 +00:00
web-ansol.org/themes/academic/layouts/shortcodes/spoiler.html

13 lines
518 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{- $id := printf "spoiler-%d" .Ordinal -}}
<div class="spoiler {{ .Get "class" }}" {{ with .Get "style" }}style="{{ . | safeCSS }}"{{ end }}>
<p>
<a class="btn btn-primary" data-toggle="collapse" href="#{{$id}}" role="button" aria-expanded="false" aria-controls="{{$id}}">
{{ .Get "text" | emojify }}
</a>
</p>
<div class="collapse card {{ if (eq (.Get "open") "true") }}show{{ end }}" id="{{$id}}">
<div class="card-body">
{{ .Inner | markdownify | emojify }}
</div>
</div>
</div>