Skip to content

Commit ecae47d

Browse files
authored
Merge pull request #244 from h-enk/video-shortcode
✨ Adds video shortcode
2 parents 7d16507 + 3569125 commit ecae47d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

layouts/shortcodes/video.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div class="ratio ratio-{{ with .Get "ratio" }}{{.}}{{ end }}">
2+
<video{{ with .Get "attributes" }} {{ . | safeHTMLAttr }}{{ end }}>
3+
{{ with .Get "webm-src" -}}
4+
<source src="{{ . | relURL }}" type="video/webm">
5+
{{ end -}}
6+
{{ with .Get "mp4-src" -}}
7+
<source src="{{ . | relURL }}" type="video/mp4">
8+
{{ end -}}
9+
Sorry, your browser doesn't support embedded videos.
10+
</video>
11+
</div>

static/videos/flower.mp4

1.08 MB
Binary file not shown.

static/videos/flower.webm

541 KB
Binary file not shown.

0 commit comments

Comments
 (0)