anemone/layouts/shortcodes/audio.html

6 lines
305 B
HTML
Raw Normal View History

2022-11-21 21:15:50 +00:00
<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>