first!
This commit is contained in:
commit
cf7a27bfa1
225 changed files with 3580 additions and 0 deletions
16
layouts/shortcodes/video.html
Normal file
16
layouts/shortcodes/video.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="video-container">
|
||||
{{ $src := .Get "src" }}
|
||||
{{ $poster := .Get "poster" }}
|
||||
{{ if and $src (not (hasPrefix $src "http")) (not (hasPrefix $src "/")) }}
|
||||
{{ $vid := .Page.Resources.GetMatch $src }}
|
||||
{{ if $vid }}{{ $src = $vid.RelPermalink }}{{ end }}
|
||||
{{ end }}
|
||||
{{ if and $poster (not (hasPrefix $poster "http")) (not (hasPrefix $poster "/")) }}
|
||||
{{ $p := .Page.Resources.GetMatch $poster }}
|
||||
{{ if $p }}{{ $poster = $p.RelPermalink }}{{ end }}
|
||||
{{ end }}
|
||||
<video controls muted preload="auto" title='{{ .Get "caption" }}' poster='{{ $poster }}'>
|
||||
<source src='{{ $src }}' type="video/webm">
|
||||
</video>
|
||||
<p>{{ .Get "caption" }}</p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue