From c6fd4ff22367136fb5c7823c9415f96fa0c92529 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 8 Apr 2023 16:06:01 -0700 Subject: [PATCH] Remove hero shortcode --- README.md | 47 ------------------------------ exampleSite/content/_index.md | 22 ++++++++------ layouts/shortcodes/paige/hero.html | 47 ------------------------------ 3 files changed, 13 insertions(+), 103 deletions(-) delete mode 100644 layouts/shortcodes/paige/hero.html diff --git a/README.md b/README.md index b2cb4564..d2be8ec2 100644 --- a/README.md +++ b/README.md @@ -471,53 +471,6 @@ Parameters:
Optional. String. CSS value. Image width.
-### 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: - -
-
alt
-
Optional. String. Plain text. Image alt.
-
header
-
Optional. String. Markdown. The header.
-
height
-
Optional. String. CSS value. Image height.
-
image
-
Optional. String. URL. Image source.
-
imageclass
-
Optional. String. Image class.
-
maxheight
-
Optional. String. CSS value. Image maximum height.
-
maxwidth
-
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.
-
title
-
Optional. String. Plain text. Image title.
-
width
-
Optional. String. CSS value. Image width.
-
- ### Icon The `paige/icon` shortcode provides a web font icon. diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 81a4b0d0..09f990e0 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -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 >}} + +

An advanced Hugo theme

+ +
+
+
+

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.

+
+
+

Install it now. diff --git a/layouts/shortcodes/paige/hero.html b/layouts/shortcodes/paige/hero.html deleted file mode 100644 index 1d881011..00000000 --- a/layouts/shortcodes/paige/hero.html +++ /dev/null @@ -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" }} - -

- {{ with $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 - ) }} -

- {{ end }} - - {{ with $header }} -

{{ . }}

- {{ end }} - - {{ with $content }} -
-
-
-

{{ . }}

-
-
-
- {{ end }} -