Use object-fit-cover
This commit is contained in:
@@ -16,13 +16,12 @@
|
|||||||
{{ $classes := split $imageclass " "}}
|
{{ $classes := split $imageclass " "}}
|
||||||
|
|
||||||
{{ if $stretch }}
|
{{ if $stretch }}
|
||||||
{{ $classes = $classes | append "w-100" }}
|
{{ $classes = $classes | append "object-fit-cover w-100" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $classes = $classes | append "mw-100" }}
|
{{ $classes = $classes | append "mw-100" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $imageclass = delimit $classes " " }}
|
{{ $imageclass = delimit $classes " " }}
|
||||||
{{ $style := cond ($stretch | not) "" "object-fit: cover" }}
|
|
||||||
|
|
||||||
<p {{ if or (not $stretch) $width }} class="text-center paige-hero-image" {{ end }}>
|
<p {{ if or (not $stretch) $width }} class="text-center paige-hero-image" {{ end }}>
|
||||||
{{ partial "paige/img.html" (dict
|
{{ partial "paige/img.html" (dict
|
||||||
@@ -35,7 +34,6 @@
|
|||||||
"maxwidth" $maxwidth
|
"maxwidth" $maxwidth
|
||||||
"page" $page
|
"page" $page
|
||||||
"src" .
|
"src" .
|
||||||
"style" $style
|
|
||||||
"title" $title
|
"title" $title
|
||||||
"width" $width
|
"width" $width
|
||||||
) }}
|
) }}
|
||||||
|
Reference in New Issue
Block a user