portfoligor/layouts/shortcodes/audio-cover.html

21 lines
881 B
HTML

<figure class="audio audio-with-image">
<img src="/images/{{ .Get "img" }}" class="cover" \>
<div>
<audio controls preload="metadata">
<source src="/medias/{{ .Get "src" }}.opus" type="audio/opus" codecs="opus">
<source src="/medias/{{ .Get "src" }}.ogg" type="audio/ogg" codecs="vorbis">
<source src="/medias/{{ .Get "src" }}.mp3" type="audio/mpeg">
Your browser does not support the audio tag, you can download the audio
with <a href="/medias/{{ .Get "src" }}.mp3">this link</a>
</audio>
<figcaption>
<p>{{ .Get "legend" }}</p>
<p>
<a href="/medias/{{ .Get "src" }}.opus" class="smallcaps">opus</a> /
<a href="/medias/{{ .Get "src" }}.ogg" class="smallcaps">ogg</a> /
<a href="/medias/{{ .Get "src" }}.mp3" class="smallcaps">mp3</a>
</p>
</figcaption>
</div>
</figure>