expandable.html 858 B

123456789101112131415161718
  1. {{ if .Get "level" }}
  2. <h{{ .Get "level" }}>
  3. {{ end }}
  4. <button aria-expanded="{{ with .Get "open" }}true{{ else }}false{{ end }}" data-expands="expandable-{{ .Inner | base64Encode | truncate 10 "" }}">
  5. <svg aria-hidden="true" focusable="false" height="20mm" width="20mm" viewBox="0 0 70.866142 70.866141">
  6. <g transform="translate(0 -981.5)">
  7. <rect style="stroke-width:0;fill:currentColor" ry="5" height="60" width="9.8985" y="987.36" x="30.051" class="up-strut" />
  8. <rect style="stroke-width:0;fill:currentColor" ry="5" height="10" width="60" y="1012.4" x="5"/>
  9. </g>
  10. </svg>
  11. {{ .Get "label" | default "More info" }}
  12. </button>
  13. {{ if .Get "level" }}
  14. </h{{ .Get "level"}}>
  15. {{ end }}
  16. <div id="expandable-{{ .Inner | base64Encode | truncate 10 "" }}" {{ with .Get "open" | not }}hidden{{ end }}>
  17. {{ .Inner }}
  18. </div>