www/layouts/shortcodes/video.html
Michael Hanke 4c38a6e4c4
Have video shortcut place Youtube links
and also make the video top-level content again.

We have the videos posted. There is little point in not linking them.
It may help people for whom the hub is too slow.
2025-02-19 21:21:25 +01:00

10 lines
457 B
HTML

<div class="video">
<video controls>
{{- if .IsNamedParams }}
<source src="{{ .Get `src` }}" type="{{ with .Get `type` -}} {{ . }} {{- else -}} video/webm {{- end }}">
{{- else }}
<source src="{{ .Get 0 }}" type="{{ with .Get 1 -}} {{ . }} {{- else -}} video/webm {{- end }}">
{{- end }}
</video>
{{- with .Get `youtube` -}}<p>Watch this video on <a href="https://www.youtube.com/watch?v={{ . }}">YouTube</a>.</p>{{- end }}
</div>