Skip to content

Commit 1d6707b

Browse files
authored
video layout (#9)
1 parent 8eccbab commit 1d6707b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

layouts/shortcodes/video.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{ $source := .Get "src" }}
2+
{{ $classes := .Get "classes" }}
3+
{{ $width := .Get "width" }}
4+
{{ $loop := .Get "loop"}}
5+
{{ $autoplay := .Get "autoplay"}}
6+
{{ $controls := .Get "controls"}}
7+
{{ $preload := .Get "preload"}}
8+
<video class="{{ $classes }}" width="{{ $width }}"
9+
{{ if $autoplay}}
10+
autoplay="{{ $autoplay }}"
11+
{{ end }}
12+
{{ if $loop }}
13+
loop="{{ $loop }}"
14+
{{ end }}
15+
{{ if $controls }}
16+
controls="{{ $controls }}"
17+
{{ end }}
18+
{{ if $preload }}
19+
preload="{{ $preload }}"
20+
{{ end }}
21+
>
22+
<source src="{{ $source }}" type="video/mp4" />
23+
</video>

0 commit comments

Comments
 (0)