hugo-theme-relearn/layouts/shortcodes/expand.html

16 lines
684 B
HTML
Raw Normal View History

<div class="expand">
<div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fa fa-chevron-down' : 'fa fa-chevron-right';});});">
<i style="font-size:x-small;" class="fa fa-chevron-right"></i>
<span>
2017-08-20 20:29:22 +00:00
{{$expandMessage := T "Expand-title"}}
{{ if .IsNamedParams }}
2017-08-20 20:29:22 +00:00
{{.Get "default" | default $expandMessage}}
{{else}}
2017-08-20 20:29:22 +00:00
{{.Get 0 | default $expandMessage}}
{{end}}
</span>
</div>
<div class="expand-content" style="display: none;">
{{.Inner | safeHTML}}
</div>
</div>