2020-08-22 07:20:08 -04:00
|
|
|
{{- $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) -}}
|
2021-03-07 06:51:47 -05:00
|
|
|
<div class="video-wrapper">
|
|
|
|
<iframe loading="lazy"
|
|
|
|
src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}"
|
|
|
|
allowfullscreen
|
|
|
|
title="YouTube Video"
|
|
|
|
>
|
|
|
|
</iframe>
|
2020-08-22 07:20:08 -04:00
|
|
|
</div>
|
|
|
|
{{ end -}}
|