Move the youtube shortcode to the termlite theme

Rename it figures/youtube → youtube and update the posts that use it.
This commit is contained in:
Eryn Wells 2024-10-08 09:09:02 -07:00
parent d496238184
commit 3369b52735
4 changed files with 3 additions and 15 deletions

View file

@ -1,12 +0,0 @@
{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
{{- if not $pc.Disable -}}
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
{{- $id := .Get "id" | default (.Get 0) -}}
{{- $class := .Get "class" | default (.Get 1) -}}
{{- $title := .Get "title" | default "YouTube Video" }}
<figure {{ with $class }}class="{{ . }}"{{ end }}>
<div class="youtube">
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" allowfullscreen frameborder=0 title="{{ $title }}"></iframe>
</div>
</figure>
{{ end -}}