ritual.sh/layouts/shortcodes/video.html
2026-02-19 09:49:00 +00:00

29 lines
797 B
HTML

{{ $src := .Get "src" }} {{ $caption := .Get "caption" }} {{ with
.Page.Resources.GetMatch $src }}
<div style="text-align: center; position: relative; z-index: 4">
<video
autoplay
loop
muted
playsinline
style="position: relative; z-index: 4; max-width: 100%; height: auto; border-radius: 12px; border: 3px solid transparent; background: linear-gradient(#000, #000) padding-box, linear-gradient(180deg, #0f0, #000) border-box;"
>
<source src="{{ .RelPermalink }}" type="{{ .MediaType }}" />
</video>
{{ with $caption }}
<div
style="
font-style: italic;
margin-top: 0.5rem;
padding-bottom: 1rem;
font-size: 0.9rem;
opacity: 0.9;
max-width: 60%;
margin: auto;
"
>
{{ . }}
</div>
{{ end }}
</div>
{{ end }}