expandable.html 899 B

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