Skip to content

Commit

Permalink
add audio shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
HidegonSan committed Nov 26, 2023
1 parent a4bf7c9 commit f6639fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions layouts/shortcodes/audio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p style="text-align: center;">
<audio controls src="{{ .Get 0 | safeHTMLAttr }}" style="width: 85%;"></audio>
</p>
2 changes: 1 addition & 1 deletion layouts/shortcodes/video.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p style="text-align: center;">
<video controls preload="auto">
<source src="{{ .Get 0 }}" type="video/{{ delimit (last 1 (split (.Get 0) ".")) "" }}" />
<source src="{{ .Get 0 | safeHTMLAttr }}" type="video/{{ delimit (last 1 (split (.Get 0) ".")) "" }}" />
</video>
</p>

0 comments on commit f6639fc

Please sign in to comment.