shortcodes: add audio shortcode for external src

Co-Authored-by: Igor Milhit <igor@milhit.ch>
pull/31/head
iGor milhit 2020-04-26 11:28:30 +02:00
parent 9f142a22b4
commit 21d0ca2e20
Signed by: igor
GPG Key ID: 692D97C3D0228A99
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<figure class="audio">
<figcaption><p>{{ .Get "legend" }}</p></figcaption>
<audio controls preload="metadata">
<source src="{{ .Get "src" }}.opus" type="audio/opus" codecs="opus">
<source src="{{ .Get "src" }}.ogg" type="audio/ogg" codecs="vorbis">
<source src="{{ .Get "src" }}.mp3" type="audio/mpeg">
</audio>
<p>
<a href="{{ .Get "src" }}.opus">opus</a> /
<a href="{{ .Get "src" }}.ogg">ogg</a> /
<a href="{{ .Get "src" }}.mp3">mp3</a>
</p>
</figure>