From b9f319f4c593790a3d6b7c65c6e9f889756812a7 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 29 Jan 2023 11:52:30 -0800 Subject: [PATCH] Format --- layouts/_default/home.html | 16 ++++-- layouts/_default/rss.xml | 109 ++++++++++++++++++++----------------- 2 files changed, 68 insertions(+), 57 deletions(-) diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 58c91889..cae86808 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -6,13 +6,17 @@
{{ if $page.Params.image_url }} {{ $class := "mw-100 rounded-4 shadow" }} + {{ if $page.Params.image_stretch }} {{ $class = "rounded-4 shadow w-100" }} {{ end }} + {{ $style := "height: 20rem" }} + {{ if $page.Params.image_stretch }} {{ $style = "height: 20rem; object-fit: cover" }} {{ end }} +

{{ partial "paige/img.html" (dict "class" $class @@ -25,16 +29,16 @@

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

{{ . | markdownify }}

+

{{ . | markdownify }}

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

{{ . | markdownify }}

+
+
+
+

{{ . | markdownify }}

+
-
{{ end }}
{{ partial "paige/toc.html" $page }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 62801efb..23c8ea39 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,68 +1,75 @@ {{ $page := . }} {{ $item := $page }} + {{ if $page.IsHome }} -{{ $item = $page.Site }} + {{ $item = $page.Site }} {{ end }} + {{ $pages := slice }} + {{ if or $page.IsHome $page.IsSection }} -{{ $pages = $item.RegularPages }} + {{ $pages = $item.RegularPages }} {{ else }} -{{ $pages = $item.Pages }} + {{ $pages = $item.Pages }} {{ end }} + {{ $limit := $page.Site.Config.Services.RSS.Limit }} + {{ if ge $limit 1 }} -{{ $pages = $pages | first $limit }} + {{ $pages = $pages | first $limit }} {{ end }} + {{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} {{ $title := partial "paige/func-title.html" $page }} + {{ printf "" | safeHTML }} - - {{ with $page.OutputFormats.Get "RSS" }} - {{ printf `` .Permalink .MediaType | safeHTML }} - {{ end }} - {{ with $page.Site.Copyright }} - {{ . }} - {{ end }} - {{ with $title }}{{ . }}{{ else }}Recent content{{ end }} - {{ with $page.Site.LanguageCode | default .Site.Language.Lang }} - {{ . }} - {{ end }} - {{ if and $page.Date (not $page.Date.IsZero) }} - {{ $page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ end }} - {{ $page.Permalink }} - {{ with $page.Site.Params.paige.rss.managing_editor }} - {{ . }} - {{ end }} - {{ with $title }} - {{ . }} - {{ end }} - {{ with $page.Site.Params.paige.rss.web_master }} - {{ . }} - {{ end }} - {{ range $pages }} - - {{ with partial "paige/func-authors.html" . }} - {{ . }} - {{ end }} - {{ if .Content }} - {{ printf "" .Content | safeHTML }} - {{ else if .Description }} - {{ .Description | markdownify | html }} - {{ end }} - {{ with .Permalink }} - {{ . }} - {{ . }} - {{ end }} - {{ with .Date }} - {{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ end }} - {{ with .Title }} - {{ . | markdownify | plainify | htmlUnescape }} - {{ end }} - - {{ end }} - + + {{ with $page.OutputFormats.Get "RSS" }} + {{ printf `` .Permalink .MediaType | safeHTML }} + {{ end }} + {{ with $page.Site.Copyright }} + {{ . }} + {{ end }} + {{ with $title }}{{ . }}{{ else }}Recent content{{ end }} + {{ with $page.Site.LanguageCode | default .Site.Language.Lang }} + {{ . }} + {{ end }} + {{ if and $page.Date (not $page.Date.IsZero) }} + {{ $page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ end }} + {{ $page.Permalink }} + {{ with $page.Site.Params.paige.rss.managing_editor }} + {{ . }} + {{ end }} + {{ with $title }} + {{ . }} + {{ end }} + {{ with $page.Site.Params.paige.rss.web_master }} + {{ . }} + {{ end }} + {{ range $pages }} + + {{ with partial "paige/func-authors.html" . }} + {{ . }} + {{ end }} + {{ if .Content }} + {{ printf "" .Content | safeHTML }} + {{ else if .Description }} + {{ .Description | markdownify | html }} + {{ end }} + {{ with .Permalink }} + {{ . }} + {{ . }} + {{ end }} + {{ with .Date }} + {{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ end }} + {{ with .Title }} + {{ . | markdownify | plainify | htmlUnescape }} + {{ end }} + + {{ end }} +