forked from mirrors/hugo-tufte
fix bugs from https://github.com/loikein/hugo-tufte/issues/6
This commit is contained in:
parent
8049030489
commit
2ba3e7fb75
2 changed files with 15 additions and 9 deletions
layouts/shortcodes
|
@ -2,6 +2,8 @@
|
|||
{{ $4x3 := .Get "4x3" | default "false" }}
|
||||
{{ $title := .Get "title" | default "YouTube Video" }}
|
||||
|
||||
<div class="video-container">
|
||||
<iframe
|
||||
class="video {{ with $4x3 }}{{ if eq . "true" }}video--4x3{{ else }}video--16x9{{ end }}{{ end }}"
|
||||
src="https://www.youtube-nocookie.com/embed/{{ $id }}?cc_load_policy=1&cc=1{{ with .Get "start" }}&start={{ . }}{{ end }}{{ with .Get "end" }}&end={{ . }}{{ end }}" allowfullscreen title="{{ $title }}" frameborder="0" sandbox="allow-same-origin allow-scripts" loading="lazy"></iframe>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue