Skip to content
Snippets Groups Projects
Commit 20b09805 authored by Olivia206's avatar Olivia206
Browse files

fixed embed titles

parent dcd2128b
No related branches found
No related tags found
No related merge requests found
......@@ -12,15 +12,22 @@
{{ end -}}
{{ if .url }}
<div class="video">
{{ $partial := printf "blocks/templates/video/%s" .video.platform }}
{{ partial $partial . }}
</div>
{{ end }}
{{ $title := "video" }}
{{ with .video_title }}
{{ $title = .}}
{{ end }}
{{ if .video_title }}
<p>{{- partial "PrepareHTML" .video_title -}}</p>
{{ end }}
<div class="video">
{{ $partial := printf "blocks/templates/video/%s" .video.platform }}
{{ partial $partial ( dict
"context" .
"title" $title
)}}
</div>
{{ end }}
{{ if .video_title }}
<p>{{- partial "PrepareHTML" .video_title -}}</p>
{{ end }}
{{ partial "commons/transcription" ( dict
"transcription" .transcription
......
{{ if .video.poster }}
{{ $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="{{ .video.poster }}" alt="{{ .video_title }}" loading="lazy">
<img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy">
</div>
{{ end }}
<div class="video-container">
<iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ .video_title }}" autoplay="true" allow="autoplay; fullscreen"></iframe>
<iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" autoplay="true" allow="autoplay; fullscreen"></iframe>
</div>
\ No newline at end of file
{{ $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="{{ .video.embed_with_defaults }}" title="{{ .video_title }}" allow="autoplay; fullscreen"></iframe>
<iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" allow="autoplay; fullscreen"></iframe>
</div>
\ No newline at end of file
{{ if .video.poster }}
{{ $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="{{ .video.poster }}" alt="{{ .video_title }}" loading="lazy">
<img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy">
</div>
{{ end }}
<div class="video-container">
<iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ .video_title }}" allow="autoplay; fullscreen"></iframe>
<iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ .context.video_title }}" allow="autoplay; fullscreen"></iframe>
</div>
\ No newline at end of file
{{ $title := "video" }}
{{ with .video_title }}
{{ $title = .}}
{{ end }}
{{ $title := .title }}
{{ if .video.poster }}
{{ 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="{{ .video.poster }}" alt="{{ .video_title }}" loading="lazy">
<img src="{{ .context.video.poster }}" alt="{{ .context.video_title }}" loading="lazy">
</div>
{{ end }}
<div class="video-container">
<iframe data-unloaded-src="{{ .video.embed_with_defaults }}" title="{{ $title }}" allowfullscreen allow="autoplay"></iframe>
<iframe data-unloaded-src="{{ .context.video.embed_with_defaults }}" title="{{ $title }}" allowfullscreen allow="autoplay"></iframe>
</div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment