Add single page for videos

This commit is contained in:
Thomas A. Christensen II 2022-03-18 22:01:09 -05:00
parent 44b1466840
commit 1181ee39ef
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -0,0 +1,25 @@
{{ define "main" }}
{{ if eq .Params.storage "yt" }}
{{ .Scratch.Set "embedLink" (print "https://www.youtube-nocookie.com/embed/" .Params.storageId) }}
{{ end }}
{{ if eq .Params.storage "vimeo" }}
{{ .Scratch.Set "embedLink" (print "https://player.vimeo.com/video/" .Params.storageId "?color=ffffff") }}
{{ end }}
{{ if eq .Params.storage "lbry" }}
{{ .Scratch.Set "embedLink" (print "https://odysee.com/$/embed/" .Params.storageId) }}
{{ end }}
<div class="row">
<div class="col-12">
<div class="ratio ratio-16x9">
<iframe
src="{{ .Scratch.Get "embedLink" }}"
title="{{ .Title }}"
allowfullscreen>
</iframe>
</div>
</div>
</div>
{{ .Content }}
{{ end }}