From 8b013dc75831a629a980e9ecc8f1fd5e1d43b1c0 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 8 Apr 2023 00:10:08 -0700 Subject: [PATCH] Remove hero param stretch --- README.md | 2 -- exampleSite/content/_index.md | 7 +++---- layouts/shortcodes/paige/hero.html | 13 +------------ 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0c0d8790..d8b601eb 100644 --- a/README.md +++ b/README.md @@ -437,8 +437,6 @@ Parameters:
Optional. String. CSS value. Image maximum width.
process
Optional. String or boolean. If a string, it is the Hugo image processing methods and options, mixed together. If no method is specified, resize is used. If no image dimensions are given, the originals are used. If a boolean that is true, the Hugo image processing method resize is used, and the default Hugo image processing options are used.
-
stretch
-
Optional. Boolean. Whether to stretch the image fully horizontally.
title
Optional. String. Plain text. Image title.
width
diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 3826d2a5..0f95bc87 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -16,10 +16,9 @@ title: "Paige" {{< paige/hero alt="Landscape" header="An advanced Hugo theme" - image="https://images.unsplash.com/photo-1490604001847-b712b0c2f967?w=1296" - imageclass="rounded-4 shadow" - process="webp" - stretch=true >}} + image="https://images.unsplash.com/photo-1490604001847-b712b0c2f967" + imageclass="object-fit-cover rounded-4 shadow w-100" + process="1296x webp" >}} Paige is designed to put your content front and center, avoiding the typical clutter. The look is seamless and smooth, scalable and readable, portable and efficient. The layout is minimal and responsive, using verticality and white space to focus and delineate parts of the page. The implementation is flexible and extensible. It's a versatile canvas that serves most web needs. {{< /paige/hero >}} diff --git a/layouts/shortcodes/paige/hero.html b/layouts/shortcodes/paige/hero.html index 0838d442..bc08660a 100644 --- a/layouts/shortcodes/paige/hero.html +++ b/layouts/shortcodes/paige/hero.html @@ -8,23 +8,12 @@ {{ $maxwidth := .Get "maxwidth" }} {{ $page := .Page }} {{ $process := .Get "process" }} -{{ $stretch := .Get "stretch" }} {{ $title := .Get "title" }} {{ $width := .Get "width" }}
{{ with $image }} - {{ $classes := split $imageclass " "}} - - {{ if $stretch }} - {{ $classes = $classes | append "object-fit-cover w-100" }} - {{ else }} - {{ $classes = $classes | append "mw-100" }} - {{ end }} - - {{ $imageclass = delimit $classes " " }} - -

+

{{ partial "paige/img.html" (dict "alt" $alt "class" $imageclass