Files
codegirl.games-hugo/themes/codegirl/layouts/shortcodes/clip.html
T
2026-07-04 01:22:01 -07:00

13 lines
406 B
HTML

{{- $src := .Get "src" -}}
{{- if not (or (hasPrefix $src "/") (hasPrefix $src "http")) -}}
{{- $src = .Page.RelPermalink | path.Join $src -}}
{{- end -}}
<figure class="clip">
<video controls playsinline preload="metadata">
<source src="{{ $src }}" type="{{ .Get "type" | default "video/mp4" }}">
</video>
{{- with .Get "caption" -}}
<figcaption>{{ . }}</figcaption>
{{- end -}}
</figure>