aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/audio.html
diff options
context:
space:
mode:
authorMatt Kohls <mattkohls13@gmail.com>2020-06-06 18:16:00 -0400
committerMatt Kohls <mattkohls13@gmail.com>2020-06-06 18:16:00 -0400
commit0da6ee8846f597ac897646a2f33521a1efe0655c (patch)
treefb927345bbe9306a9f0efe5eeb4b080442974a16 /layouts/shortcodes/audio.html
downloadpagedown-0da6ee8846f597ac897646a2f33521a1efe0655c.tar.gz
pagedown-0da6ee8846f597ac897646a2f33521a1efe0655c.tar.bz2
pagedown-0da6ee8846f597ac897646a2f33521a1efe0655c.zip
Initial work on theme
Diffstat (limited to 'layouts/shortcodes/audio.html')
-rw-r--r--layouts/shortcodes/audio.html16
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>