Remove hero param stretch

master
Will Faught 2 years ago
parent 5ee01538f5
commit 8b013dc758

@ -437,8 +437,6 @@ Parameters:
<dd>Optional. String. CSS value. Image maximum width.</dd>
<dt><code>process</code></dt>
<dd>Optional. String or boolean. If a string, it is the Hugo image processing <a href="https://gohugo.io/content-management/image-processing/#image-processing-methods">methods</a> and <a href="https://gohugo.io/content-management/image-processing/#image-processing-options">options</a>, 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.</dd>
<dt><code>stretch</code></dt>
<dd>Optional. Boolean. Whether to stretch the image fully horizontally.</dd>
<dt><code>title</code></dt>
<dd>Optional. String. Plain text. Image title.</dd>
<dt><code>width</code></dt>

@ -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 >}}

@ -8,23 +8,12 @@
{{ $maxwidth := .Get "maxwidth" }}
{{ $page := .Page }}
{{ $process := .Get "process" }}
{{ $stretch := .Get "stretch" }}
{{ $title := .Get "title" }}
{{ $width := .Get "width" }}
<div class="paige-hero">
{{ 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 " " }}
<p {{ if or (not $stretch) $width }} class="text-center paige-hero-image" {{ end }}>
<p class="text-center paige-hero-image">
{{ partial "paige/img.html" (dict
"alt" $alt
"class" $imageclass

Loading…
Cancel
Save