Peertube shortcode (#134)

Che ne pensi?

Reviewed-on: #134
This commit is contained in:
omar 2024-07-22 16:59:25 +00:00
parent 1d827eae76
commit c9d28e123d
3 changed files with 18 additions and 3 deletions

View File

@ -18,7 +18,7 @@ image_alt: Logo Ansible
**Francesco Vigotti**, creatore e gestore di [histats.com](https://www.histats.com) e ...uno che la sa lunga 😉, ci parla delle più recenti tecnologie **opensource** per gestire server: DevOps e Ansible.
{{< youtube ld5UTbOnIc0 >}}
PS:
[Guarda le slide dell'intervento](Ansible-talk-linuxday.pdf)
[Guarda le slide dell'intervento](Ansible-talk-linuxday.pdf) o il video su [Peertube](https://video.linux.it/w/p/3SUuYCXJqC2M7V35fu7ifX)
{{< peertube host="video.linux.it" id="dgpsKn9vD98NnxNNWGXFzs" title="1" >}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,15 @@
{{ if .IsNamedParams -}}
<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>
{{- else -}}
<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>
</div>
{{- end }}
<!-- https://github.com/bugsysop/hugo-peertube-shortcode -->