Remove hero shortcode

master
Will Faught 2 years ago
parent e2732d1daa
commit c6fd4ff223

@ -471,53 +471,6 @@ Parameters:
<dd>Optional. String. CSS value. Image width.</dd>
</dl>
### Hero
The `paige/hero` shortcode provides a hero section.
```
{{< paige/hero
alt=""
header=""
height=""
image=""
imageclass=""
maxheight=""
maxwidth=""
process=""
title=""
width="" >}}
{{< /paige/hero >}}
```
Inner content: Optional. String. Markdown. The body.
Parameters:
<dl>
<dt><code>alt</code></dt>
<dd>Optional. String. Plain text. Image alt.</dd>
<dt><code>header</code></dt>
<dd>Optional. String. Markdown. The header.</dd>
<dt><code>height</code></dt>
<dd>Optional. String. CSS value. Image height.</dd>
<dt><code>image</code></dt>
<dd>Optional. String. URL. Image source.</dd>
<dt><code>imageclass</code></dt>
<dd>Optional. String. Image class.</dd>
<dt><code>maxheight</code></dt>
<dd>Optional. String. CSS value. Image maximum height.</dd>
<dt><code>maxwidth</code></dt>
<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>title</code></dt>
<dd>Optional. String. Plain text. Image title.</dd>
<dt><code>width</code></dt>
<dd>Optional. String. CSS value. Image width.</dd>
</dl>
### Icon
The `paige/icon` shortcode provides a web font icon.

@ -13,15 +13,19 @@ paige:
title: "Paige"
---
{{< paige/hero
alt="Landscape"
header="An advanced Hugo theme"
image="https://images.unsplash.com/photo-1490604001847-b712b0c2f967"
imageclass="object-fit-cover rounded-4 shadow w-100"
maxheight="20rem"
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 >}}
{{< paige/figure >}}
{{< paige/image alt="Landscape" class="object-fit-cover rounded-4 shadow w-100" fetchpriority="high" loading="eager" maxheight="20rem" process="webp" src="https://images.unsplash.com/photo-1490604001847-b712b0c2f967?w=1296" >}}
{{< /paige/figure >}}
<p class="display-5 fw-bold h2 text-center">An advanced Hugo theme</p>
<div class="container-fluid">
<div class="justify-content-center row">
<div class="col col-auto col-lg-7 px-0">
<p class="lead text-center">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. Its a versatile canvas that serves most web needs.</p>
</div>
</div>
</div>
<p class="text-center">
<a class="lead" href="https://github.com/willfaught/paige">Install it now.</a>

@ -1,47 +0,0 @@
{{ $alt := .Get "alt" }}
{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }}
{{ $header := .Get "header" | markdownify }}
{{ $height := .Get "height" }}
{{ $image := .Get "image" }}
{{ $imageclass := .Get "imageclass" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
{{ $page := .Page }}
{{ $process := .Get "process" }}
{{ $title := .Get "title" }}
{{ $width := .Get "width" }}
<div class="paige-hero">
{{ with $image }}
<p class="text-center paige-hero-image">
{{ partial "paige/img.html" (dict
"alt" $alt
"class" $imageclass
"fetchpriority" "high"
"height" $height
"loading" "eager"
"maxheight" $maxheight
"maxwidth" $maxwidth
"page" $page
"process" $process
"src" .
"title" $title
"width" $width
) }}
</p>
{{ end }}
{{ with $header }}
<p class="display-5 fw-bold h2 paige-hero-header text-center">{{ . }}</p>
{{ end }}
{{ with $content }}
<div class="container-fluid paige-hero-content">
<div class="justify-content-center row">
<div class="col col-auto col-lg-7 px-0">
<p class="lead text-center">{{ . }}</p>
</div>
</div>
</div>
{{ end }}
</div>
Loading…
Cancel
Save