theme-blog-ewen/layouts/shortcodes/audio.html

8 lines
298 B
HTML
Raw Permalink Normal View History

2023-12-15 16:26:57 +00:00
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<audio controls preload="{{ .Get "preload" | default "metadata" }}">
{{ with .Get "src" }}<source src="{{ . }}" type="audio/mpeg">{{ end }}
</audio>
{{ with .Get "caption" }}<figcaption><h4>{{ . }}</h4></figcaption>{{ end }}
</figure>