From 6b25fad5c5ad79822113556b0f8218856b3cbd26 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 12 Jul 2024 16:13:08 -0700 Subject: [PATCH] Remove page-metadata.html --- layouts/partials/paige/page-header.html | 72 +++++++++++++++++++++- layouts/partials/paige/page-metadata.html | 73 ----------------------- 2 files changed, 71 insertions(+), 74 deletions(-) delete mode 100644 layouts/partials/paige/page-metadata.html diff --git a/layouts/partials/paige/page-header.html b/layouts/partials/paige/page-header.html index 157ceb19..3ec1f66a 100644 --- a/layouts/partials/paige/page-header.html +++ b/layouts/partials/paige/page-header.html @@ -1,6 +1,76 @@ {{ $page := . }} -{{ partial "paige/page-metadata.html" $page }} +{{ $authors := partial "paige/authors.html" $page }} +{{ $categories := $page.GetTerms "categories" }} +{{ $date := and $page.IsPage $page.PublishDate }} +{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }} +{{ $description := $page.Description | markdownify }} +{{ $link := $page.Params.link }} +{{ $readingtime := $page.ReadingTime }} +{{ $series := $page.GetTerms "series" }} +{{ $tags := $page.GetTerms "tags" }} +{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} +{{ $title := $page.Title | markdownify }} + +
+ {{ with $title }} +

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

+ {{ end }} + + {{ with $description }} +

{{ . }}

+ {{ end }} + + {{ if or $authors $categories $date $readingtime $series $tags }} +
+ {{ if or $categories $tags }} +

+ {{ range $i, $term := sort (append $categories $tags) "Title" -}} + {{- if $textkeywords -}} + {{- if gt $i 0 }} · {{ end -}} + + {{ .Title }} + {{- else -}} + {{- if gt $i 0 }} {{ end -}} + + {{ .Title }} + {{- end -}} + {{- end }} +

+ {{ end }} + + {{ with $series }} +

+ {{ range $i, $series := . -}} + {{- if gt $i 0 }} · {{ end -}} + + {{ .Title }} + {{- end }} +

+ {{ end }} + + {{ with $authors }} +

+ {{ range $i, $author := . -}} + {{- if gt $i 0 }} · {{ end -}} + + {{ .Title }} + {{- end }} +

+ {{ end }} + + {{ with $date }} +

+ +

+ {{ end }} + + {{ with $readingtime }} +

{{ . }} {{ i18n "paige_minutes" . }}

+ {{ end }} +
+ {{ end }} +
{{ with $page.Param "paige.alert" }} diff --git a/layouts/partials/paige/page-metadata.html b/layouts/partials/paige/page-metadata.html deleted file mode 100644 index c266b887..00000000 --- a/layouts/partials/paige/page-metadata.html +++ /dev/null @@ -1,73 +0,0 @@ -{{ $page := . }} - -{{ $authors := partial "paige/authors.html" $page }} -{{ $categories := $page.GetTerms "categories" }} -{{ $date := and $page.IsPage $page.PublishDate }} -{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }} -{{ $description := $page.Description | markdownify }} -{{ $link := $page.Params.link }} -{{ $readingtime := $page.ReadingTime }} -{{ $series := $page.GetTerms "series" }} -{{ $tags := $page.GetTerms "tags" }} -{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} -{{ $title := $page.Title | markdownify }} - -
- {{ with $title }} -

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

- {{ end }} - - {{ with $description }} -

{{ . }}

- {{ end }} - - {{ if or $authors $categories $date $readingtime $series $tags }} -
- {{ if or $categories $tags }} -

- {{ range $i, $term := sort (append $categories $tags) "Title" -}} - {{- if $textkeywords -}} - {{- if gt $i 0 }} · {{ end -}} - - {{ .Title }} - {{- else -}} - {{- if gt $i 0 }} {{ end -}} - - {{ .Title }} - {{- end -}} - {{- end }} -

- {{ end }} - - {{ with $series }} -

- {{ range $i, $series := . -}} - {{- if gt $i 0 }} · {{ end -}} - - {{ .Title }} - {{- end }} -

- {{ end }} - - {{ with $authors }} -

- {{ range $i, $author := . -}} - {{- if gt $i 0 }} · {{ end -}} - - {{ .Title }} - {{- end }} -

- {{ end }} - - {{ with $date }} -

- -

- {{ end }} - - {{ with $readingtime }} -

{{ . }} {{ i18n "paige_minutes" . }}

- {{ end }} -
- {{ end }} -