cupper-hugo-theme/themes/inclusive-docs/layouts/shortcodes/expandable.html

19 lines
858 B
HTML
Raw Normal View History

2017-06-09 15:27:09 +02:00
{{ if .Get "level" }}
<h{{ .Get "level" }}>
{{ end }}
<button aria-expanded="{{ with .Get "open" }}true{{ else }}false{{ end }}" data-expands="expandable-{{ .Inner | base64Encode | truncate 10 "" }}">
<svg aria-hidden="true" focusable="false" height="20mm" width="20mm" viewBox="0 0 70.866142 70.866141">
<g transform="translate(0 -981.5)">
<rect style="stroke-width:0;fill:currentColor" ry="5" height="60" width="9.8985" y="987.36" x="30.051" class="up-strut" />
<rect style="stroke-width:0;fill:currentColor" ry="5" height="10" width="60" y="1012.4" x="5"/>
</g>
</svg>
{{ .Get "label" | default "More info" }}
</button>
{{ if .Get "level" }}
</h{{ .Get "level"}}>
{{ end }}
<div id="expandable-{{ .Inner | base64Encode | truncate 10 "" }}" {{ with .Get "open" | not }}hidden{{ end }}>
{{ .Inner }}
</div>