bglug.it/layouts/shortcodes/peertube.html

15 lines
1.0 KiB
HTML
Raw Normal View History

2024-07-22 13:38:55 +02:00
{{ if .IsNamedParams -}}
2024-07-22 13:38:55 +02:00
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
src="https://{{ .Get "host" }}/videos/embed/{{ .Get "id" }}?{{ with .Get "title" }}title={{ . }}{{ else }}title=0{{ end }}&{{ with .Get "warning" }}warningTitle={{ . }}{{ else }}warningTitle=0{{ end }}{{ with .Get "subtitle" }}&subtitle={{ . }}{{ end }}&peertubeLink=0" allowfullscreen>
</iframe>
</div>
2024-07-22 13:38:55 +02:00
{{- else -}}
2024-07-22 13:38:55 +02:00
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
src="https://{{ .Get 0 }}/videos/embed/{{ .Get 1 }}?title=0&warningTitle=0&peertubeLink=0" title="Peertube Video" allowfullscreen>
</iframe>
2024-07-22 13:38:55 +02:00
</div>
2024-07-22 13:38:55 +02:00
{{- end }}
2024-07-22 13:38:55 +02:00
2024-07-22 13:38:55 +02:00
<!-- https://github.com/bugsysop/hugo-peertube-shortcode -->