From dd0d5ef6ed6f9ac7c3c3981a9cb9052c93597b47 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 22 Mar 2023 17:36:44 -0700 Subject: [PATCH] Remove paige/home layout --- README.md | 25 -------- layouts/_default/paige/home.html | 99 -------------------------------- 2 files changed, 124 deletions(-) delete mode 100644 layouts/_default/paige/home.html diff --git a/README.md b/README.md index 230679eb..04291660 100644 --- a/README.md +++ b/README.md @@ -356,31 +356,6 @@ Example `content/tags/_index.md`: layout: "paige/cloud" ``` -### Home - -The `paige/home` layout provides a home page. - -Example `content/_index.md`: - -```yaml -layout: "paige/home" -paige: - home: - blurb: "" # Displayed below the greeting - greeting: "" # Displayed below the image - image: - alt: "" # Image alt - height: "" # CSS unit; image height - stretch: false # Stretch the image fully horizontally if true; center the image otherwise - url: "" # Local or remote resource glob - width: "" # CSS unit; image width - social: - examplesite: - class: "" # Examples are "bi bi-emoji-smile" and "fa-regular fa-face-smile" - name: "" # Example is "Example" - url: "" # Example is "https://example.com/username" -``` - The assigned values shown are the default values. ### Search diff --git a/layouts/_default/paige/home.html b/layouts/_default/paige/home.html deleted file mode 100644 index 4428e4dd..00000000 --- a/layouts/_default/paige/home.html +++ /dev/null @@ -1,99 +0,0 @@ -{{ define "main" }} -{{ $page := . }} - -{{ $class := slice }} -{{ $draft := $page.Draft }} -{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} -{{ $future := and $page.PublishDate (gt $page.PublishDate now) }} -{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }} - -{{ if $draft }} - {{ $class = $class | append "paige-draft" "paige-unpublished" }} -{{ end }} - -{{ if $expired }} - {{ $class = $class | append "paige-expired" "paige-unpublished" }} -{{ end }} - -{{ if $future }} - {{ $class = $class | append "paige-future" "paige-unpublished" }} -{{ end }} - -{{ if $modified }} - {{ $class = $class | append "paige-modified" }} -{{ end }} - -{{ if not (or $draft $expired $future) }} - {{ $class = $class | append "paige-published" }} -{{ end }} - -{{ with $page.Kind }} - {{ if eq . "home" }} - {{ $class = $class | append "paige-home" }} - {{ else if eq . "section" }} - {{ $class = $class | append "paige-list" }} - {{ else if eq . "page" }} - {{ $class = $class | append "paige-single" }} - {{ else if eq . "taxonomy" }} - {{ $class = $class | append "paige-taxonomy" }} - {{ else if eq . "term" }} - {{ $class = $class | append "paige-term" }} - {{ end }} -{{ end }} - -{{ $class = delimit ($class | uniq) " " }} - -{{ $height := $page.Params.paige.home.image.height | default "20rem" }} -{{ $stretch := $page.Params.paige.home.image.stretch }} -{{ $width := $page.Params.paige.home.image.width }} - -
-
- {{ partial "paige/metadata.html" $page }} - {{ partial "paige/alert.html" $page }} - {{ partial "paige/toc.html" $page }} - - {{ if or $page.Params.paige.home.image.url $page.Params.paige.home.greeting $page.Params.paige.home.blurb }} -
- {{ if $page.Params.paige.home.image.url }} - {{ $class := cond ($stretch | not) "mw-100 rounded-4 shadow" "rounded-4 shadow" }} - {{ $style := cond ($stretch | not) (printf "height: %s; width: %s" $height ($width | default "auto")) (printf "height: %s; object-fit: cover; width: %s" $height ($width | default "100%")) }} - -

- {{ partial "paige/img.html" (dict - "alt" $page.Params.paige.home.image.alt - "class" $class - "fetchpriority" "high" - "loading" "eager" - "page" $page - "src" $page.Params.paige.home.image.url - "style" $style - ) }} -

- {{ end }} - - {{ with $page.Params.paige.home.greeting }} -

{{ . | markdownify }}

- {{ end }} - - {{ with $page.Params.paige.home.blurb }} -
-
-
-

{{ . | markdownify }}

-
-
-
- {{ end }} -
- {{ end }} - - {{ if $page.Param "paige.social" }} -

{{ partial "paige/social.html" $page }}

- {{ end }} - - {{ partial "paige/content.html" $page }} -
-
-{{ partial "paige/pages.html" $page }} -{{ end }}