mmote.ru/themes/mmotium/layouts/shortcodes/video.html

11 lines
268 B
HTML
Raw Permalink Normal View History

2023-11-19 18:22:24 +03:00
{{- $video := .Page.Resources.GetMatch (.Get "src") -}}
{{ if $video -}}
<video controls>
<source src="{{ $video.RelPermalink | safeURL }}" type="video/mp4">
</video>
{{- else -}}
<img src="/images/video-error.png" alt="video-error">
{{- end -}}