Add height, max{height,width}, width video params
This commit is contained in:
@@ -20,7 +20,7 @@ function paigeResize() {
|
||||
var es = document.querySelectorAll(".paige-video");
|
||||
for (var i = 0; i < es.length; i++) {
|
||||
var e = es[i];
|
||||
if (e.style.width !== w) {
|
||||
if (!e.style.height && !e.style.width) {
|
||||
e.style.width = w + "px";
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -10,6 +10,7 @@
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $keyboard := .Get "keyboard" | default true }}
|
||||
{{ $loop := .Get "loop" }}
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $muted := .Get "muted" }}
|
||||
{{ $pip := .Get "pip" }}
|
||||
@@ -115,6 +116,8 @@
|
||||
{{ partial "paige/video.html" (dict
|
||||
"fullscreen" $fullscreen
|
||||
"height" $height
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"referrerpolicy" $referrerpolicy
|
||||
"src" $src
|
||||
"title" $description
|
||||
|
@@ -6,6 +6,7 @@
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $list := .Get "list" }}
|
||||
{{ $loop := .Get "loop" }}
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $mute := .Get "mute" }}
|
||||
{{ $referrerpolicy := .Get "referrerpolicy" | default "no-referrer-when-downgrade" }}
|
||||
@@ -69,6 +70,8 @@
|
||||
{{ partial "paige/video.html" (dict
|
||||
"fullscreen" $fullscreen
|
||||
"height" $height
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"referrerpolicy" $referrerpolicy
|
||||
"src" $src
|
||||
"title" $description
|
||||
|
Reference in New Issue
Block a user