1
Fork 0
This commit is contained in:
MMaker 2025-12-02 23:49:51 -05:00
commit cf7a27bfa1
Signed by: mmaker
GPG key ID: CCE79B8FEDA40FB2
225 changed files with 3580 additions and 0 deletions

View 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>