anemone/layouts/shortcodes/audio.html
2022-11-21 22:15:50 +01:00

6 lines
No EOL
305 B
HTML

<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<audio loop controls preload="{{ .Get "preload" | default "metadata" }}">
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="audio/mpeg">{{ end }}
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}
</audio>
</figure>