hugo-geekblog/layouts/shortcodes/expand.html

12 lines
471 B
HTML
Raw Normal View History

2020-07-06 18:55:32 +00:00
{{ $id := substr (sha1 .Inner) 0 8 }}
<div class="gblog-expand">
<label class="gblog-expand__head flex justify-between" for="{{ $id }}-{{ .Ordinal }}">
<span>{{ default "Expand" (.Get 0) }}</span>
<span>{{ default "↕" (.Get 1) }}</span>
</label>
<input id="{{ $id }}-{{ .Ordinal }}" type="checkbox" class="gblog-expand__control hidden" />
<div class="gblog-markdown--nested gblog-expand__content">
{{ .Inner | $.Page.RenderString }}
2020-07-06 18:55:32 +00:00
</div>
</div>