diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2020-04-19 16:36:03 -0400 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2020-04-19 16:44:23 -0400 |
commit | aac56c9b5cd6d5cb8efd67156d7dd0f2d149c771 (patch) | |
tree | 2b7a97cd7b41b991a52ec8b2404a7d913869317d /layouts/shortcodes/audio.html | |
parent | d143f6fbc3207a0f4bbcfc57d030777ff5d55db1 (diff) | |
download | simplesource-aac56c9b5cd6d5cb8efd67156d7dd0f2d149c771.tar.gz simplesource-aac56c9b5cd6d5cb8efd67156d7dd0f2d149c771.tar.bz2 simplesource-aac56c9b5cd6d5cb8efd67156d7dd0f2d149c771.zip |
Diffstat (limited to 'layouts/shortcodes/audio.html')
-rw-r--r-- | layouts/shortcodes/audio.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html new file mode 100644 index 0000000..d64d850 --- /dev/null +++ b/layouts/shortcodes/audio.html @@ -0,0 +1,16 @@ +<audio controls> + {{ if .IsNamedParams }} + {{ if isset .Params "src" }} + {{ if isset .Params "type" }} + <source src="{{ .Get "src" }}" type="audio/{{ .Get "type" }}"> + {{ else }} + {{ errorf "Missing type parameter: %s" .Position }} + {{ end }} + {{ else }} + {{ errorf "Missing src parameter: %s" .Position }} + {{ end }} + {{ else }} + {{ errorf "Missing parameter names: %s" .Position }} + {{ end }} +Browser does not support embedded audio. +</audio> |