mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 12:03:49 +01:00
d5268a41e0
* refactor(article): add default padding closes https://github.com/CaiJimmy/hugo-theme-stack/issues/165 * fix(article): video iframe margin * fix: remove youtube iframe border
13 lines
No EOL
498 B
HTML
13 lines
No EOL
498 B
HTML
{{- $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) -}}
|
|
<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>
|
|
</div>
|
|
{{ end -}} |