diff --git a/layouts/partials/blocks/templates/video.html b/layouts/partials/blocks/templates/video.html index 0201e604ff021eace8971d4fb3f4528ccf0514b0..d2b7a939ae2c2036fabd04f548b004f4f7ee5886 100644 --- a/layouts/partials/blocks/templates/video.html +++ b/layouts/partials/blocks/templates/video.html @@ -20,10 +20,7 @@ <div class="video"> {{ $partial := printf "blocks/templates/video/%s" .video.platform }} - {{ partial $partial ( dict - "context" . - "title" $title - )}} + {{ partial $partial . }} </div> {{ end }} diff --git a/layouts/partials/blocks/templates/video/dailymotion.html b/layouts/partials/blocks/templates/video/dailymotion.html index fd72332d0719fa5170ac4d8bf8275218f036e2cf..bc36c9b12c4a119221c57497aab11a42f1ca2bc8 100644 --- a/layouts/partials/blocks/templates/video/dailymotion.html +++ b/layouts/partials/blocks/templates/video/dailymotion.html @@ -1,11 +1,9 @@ -{{ $title := .title }} - -{{ if .context.video.poster }} - <div class="lazy-video-player"> - <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> - <img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy"> - </div> -{{ end }} +<div class="lazy-video-player"> + <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> + {{ if .video.poster }} + <img src="{{ .video.poster }}" alt="{{ .video.title }}" loading="lazy"> + {{ end }} +</div> <div class="video-container"> - <iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" autoplay="true" allow="autoplay; fullscreen"></iframe> + <iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ .video.title }}" autoplay="true" allow="autoplay; fullscreen"></iframe> </div> \ No newline at end of file diff --git a/layouts/partials/blocks/templates/video/peertube.html b/layouts/partials/blocks/templates/video/peertube.html index 7f04a10885bc0661969bd66f58b3a1401d64b710..1b879da0315d37105defb056c8cfda93a42650e6 100644 --- a/layouts/partials/blocks/templates/video/peertube.html +++ b/layouts/partials/blocks/templates/video/peertube.html @@ -1,8 +1,6 @@ -{{ $title := .title }} - <div class="lazy-video-player"> <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> </div> <div class="video-container"> - <iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" allow="autoplay; fullscreen"></iframe> + <iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ .video.title }}" allow="autoplay; fullscreen"></iframe> </div> \ No newline at end of file diff --git a/layouts/partials/blocks/templates/video/vimeo.html b/layouts/partials/blocks/templates/video/vimeo.html index 879f428b3816b560e73b667380de9088b1067de3..8127b3b323bb9a530512ea48bdbb805f9eab9505 100644 --- a/layouts/partials/blocks/templates/video/vimeo.html +++ b/layouts/partials/blocks/templates/video/vimeo.html @@ -1,11 +1,9 @@ -{{ $title := .title }} - -{{ if .context.video.poster }} - <div class="lazy-video-player"> - <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> - <img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy"> - </div> -{{ end }} +<div class="lazy-video-player"> + <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> + {{ if .video.poster }} + <img src="{{ .video.poster }}" alt="{{ .video.title }}" loading="lazy"> + {{ end }} +</div> <div class="video-container"> - <iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" allow="autoplay; fullscreen"></iframe> + <iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ .video.title }}" allow="autoplay; fullscreen"></iframe> </div> \ No newline at end of file diff --git a/layouts/partials/blocks/templates/video/youtube.html b/layouts/partials/blocks/templates/video/youtube.html index 3790acf35ad82eda9455f741f764dc3632a719bb..9cd02195cf1c43fdb2860959413680a06ccf1014 100644 --- a/layouts/partials/blocks/templates/video/youtube.html +++ b/layouts/partials/blocks/templates/video/youtube.html @@ -1,11 +1,9 @@ -{{ $title := .title }} - -{{ if .context.video.poster }} - <div class="lazy-video-player"> - <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> - <img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy"> - </div> -{{ end }} +<div class="lazy-video-player"> + <button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> + {{ if .video.poster }} + <img src="{{ .video.poster }}" alt="{{ .video.title }}" loading="lazy"> + {{ end }} +</div> <div class="video-container"> - <iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ $title }}" allowfullscreen allow="autoplay"></iframe> + <iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ video.title }}" allowfullscreen allow="autoplay"></iframe> </div> \ No newline at end of file