diff options
author | tdro <tdro@noreply.example.com> | 2022-05-03 04:25:49 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-05-03 04:25:49 -0400 |
commit | e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6 (patch) | |
tree | 3667043819ab91065019dfe3b4ff83ad625c2b49 /themes/default/layouts/shortcodes/audio.html | |
download | canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.gz canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.bz2 canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.zip |
config.yaml: Commission
Diffstat (limited to 'themes/default/layouts/shortcodes/audio.html')
-rw-r--r-- | themes/default/layouts/shortcodes/audio.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/audio.html b/themes/default/layouts/shortcodes/audio.html new file mode 100644 index 0000000..4df2f51 --- /dev/null +++ b/themes/default/layouts/shortcodes/audio.html @@ -0,0 +1,18 @@ +{{- $src := default + "https://ia600701.us.archive.org/12/items/firstchaptercollection001_1109_librivox/firstchapter001_02_taletwocities_dickens_law.mp3" + (.Get "src" | default (.Get 0)) +-}} +{{- $caption := default "A Tale of Two Cities by Charles Dickens" (.Get "caption" | default (.Get 1)) -}} +{{- $controls := default "" (.Get "controls" | default (.Get 2)) -}} + +<audio-player> + <figure> + <figcaption>{{ $caption }}</figcaption> + <audio controls {{ $controls | safeHTMLAttr }} src="{{ $src }}"> + <p> + Your browser doesn't support HTML5 <code>audio</code>. Here is a + <a href="{{ $src }}">link to the audio file</a> instead. + </p> + </audio> + </figure> +</audio-player> |