|
|
@ -7,6 +7,7 @@
|
|
|
|
{{ $fingerprint := $params.fingerprint | default true }}
|
|
|
|
{{ $fingerprint := $params.fingerprint | default true }}
|
|
|
|
{{ $height := $params.height }}
|
|
|
|
{{ $height := $params.height }}
|
|
|
|
{{ $loading := $params.loading | default "lazy" }}
|
|
|
|
{{ $loading := $params.loading | default "lazy" }}
|
|
|
|
|
|
|
|
{{ $maxheight := $params.maxheight }}
|
|
|
|
{{ $maxwidth := $params.maxwidth }}
|
|
|
|
{{ $maxwidth := $params.maxwidth }}
|
|
|
|
{{ $method := $params.method }}
|
|
|
|
{{ $method := $params.method }}
|
|
|
|
{{ $options := $params.options }}
|
|
|
|
{{ $options := $params.options }}
|
|
|
@ -56,11 +57,11 @@
|
|
|
|
{{ $src = $resource.RelPermalink }}
|
|
|
|
{{ $src = $resource.RelPermalink }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ if and $height (not (or $maxwidth $width)) }}
|
|
|
|
{{ if and (or $height $maxheight) (not (or $maxwidth $width)) }}
|
|
|
|
{{ $width = "auto" }}
|
|
|
|
{{ $width = "auto" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ if and (or $maxwidth $width) (not $height) }}
|
|
|
|
{{ if and (or $maxwidth $width) (not (or $height $maxheight)) }}
|
|
|
|
{{ $height = "auto" }}
|
|
|
|
{{ $height = "auto" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
@ -74,6 +75,16 @@
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ if $maxheight }}
|
|
|
|
|
|
|
|
{{ with printf "max-height: %v" $maxheight }}
|
|
|
|
|
|
|
|
{{ if $style }}
|
|
|
|
|
|
|
|
{{ $style = printf "%v; %v" $style . }}
|
|
|
|
|
|
|
|
{{ else }}
|
|
|
|
|
|
|
|
{{ $style = . }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ if $maxwidth }}
|
|
|
|
{{ if $maxwidth }}
|
|
|
|
{{ with printf "max-width: %v" $maxwidth }}
|
|
|
|
{{ with printf "max-width: %v" $maxwidth }}
|
|
|
|
{{ if $style }}
|
|
|
|
{{ if $style }}
|
|
|
|