From 1ea029ffa59c02207fe0d8112adf963f689a94b9 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 22 Mar 2023 21:06:52 -0700 Subject: [PATCH] Use object-fit-cover --- layouts/shortcodes/paige/hero.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layouts/shortcodes/paige/hero.html b/layouts/shortcodes/paige/hero.html index 4762fc08..853ad880 100644 --- a/layouts/shortcodes/paige/hero.html +++ b/layouts/shortcodes/paige/hero.html @@ -16,13 +16,12 @@ {{ $classes := split $imageclass " "}} {{ if $stretch }} - {{ $classes = $classes | append "w-100" }} + {{ $classes = $classes | append "object-fit-cover w-100" }} {{ else }} {{ $classes = $classes | append "mw-100" }} {{ end }} {{ $imageclass = delimit $classes " " }} - {{ $style := cond ($stretch | not) "" "object-fit: cover" }}

{{ partial "paige/img.html" (dict @@ -35,7 +34,6 @@ "maxwidth" $maxwidth "page" $page "src" . - "style" $style "title" $title "width" $width ) }}