Add height, max{height,width}, width video params

This commit is contained in:
Will Faught
2023-03-03 20:19:33 -08:00
parent d54682b8d3
commit b8259e8e96
7 changed files with 152 additions and 2 deletions

View File

@@ -2,11 +2,35 @@
{{ $class := $params.class | default "paige-video ratio ratio-16x9" }}
{{ $fullscreen := $params.fullscreen }}
{{ $height := $params.height }}
{{ $maxheight := $params.maxheight }}
{{ $maxwidth := $params.maxwidth }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }}
{{ $title := $params.title }}
{{ $width := $params.width }}
<div class="{{ $class }}">
{{ $styles := slice }}
{{ if $height }}
{{ $styles = $styles | append (print "height: " $height) }}
{{ end }}
{{ if $maxheight }}
{{ $styles = $styles | append (print "max-height: " $maxheight) }}
{{ end }}
{{ if $maxwidth }}
{{ $styles = $styles | append (print "max-width: " $maxwidth) }}
{{ end }}
{{ if $width }}
{{ $styles = $styles | append (print "width: " $width) }}
{{ end }}
{{ $styles = delimit $styles "; " }}
<div class="{{ $class }}" {{ with $styles }} style="{{ . | safeCSS }}" {{ end }}>
{{ partial "paige/iframe.html" (dict
"fullscreen" $fullscreen
"referrerpolicy" $referrerpolicy