hugo-theme-relearn/layouts/shortcodes/expand.html
2021-07-16 23:07:15 +02:00

15 lines
No EOL
645 B
HTML

{{ $_hugo_config := `{ "version": 1 }` }}
<div class="expand">
<a class="expand-label" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});">
<i class="fas fa-chevron-right"></i>
{{$expandMessage := T "Expand-title"}}
{{ if .IsNamedParams }}
{{.Get "default" | default $expandMessage}}
{{else}}
{{.Get 0 | default $expandMessage}}
{{end}}
</a>
<div class="expand-content" style="display: none;">
{{.Inner | safeHTML}}
</div>
</div>