You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB
HTML

{{ $params := . }}
{{ $class := $params.class | default "paige-video ratio ratio-16x9" }}
{{ $fullscreen := $params.fullscreen }}
{{ $height := $params.height }}
{{ $maxHeight := $params.maxheight }}
{{ $maxWidth := $params.maxwidth }}
{{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }}
{{ $title := $params.title }}
{{ $width := $params.width }}
{{ $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/tag-iframe.html" (dict
"fullscreen" $fullscreen
"referrerpolicy" $policy
"src" $src
"title" $title
) }}
</div>