From 6f02b083f90e02e4551f5861c51f78112ce3e953 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 29 Jan 2023 20:48:25 -0800 Subject: [PATCH] Combine single page categories, tags --- layouts/partials/paige/about.html | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/layouts/partials/paige/about.html b/layouts/partials/paige/about.html index c7006e52..f4988d3e 100644 --- a/layouts/partials/paige/about.html +++ b/layouts/partials/paige/about.html @@ -2,38 +2,38 @@ {{ $authors := cond ($page.Param "paige.page.authors.hide" | not) (partial "paige/func-authors.html" $page) "" }} {{ $authorsclass := $page.Param "paige.page.authors.class" | default "text-center text-secondary" }} -{{ $categories := cond ($page.Param "paige.page.categories.show" | not) slice ($page.Params.categories | default slice) | sort | uniq }} -{{ $categoriesclass := $page.Param "paige.page.categories.class" | default "badge text-bg-secondary text-decoration-none" }} +{{ $categories := cond ($page.Param "paige.page.terms.show" | not) slice ($page.Params.categories | default slice) | sort | uniq }} {{ $date := cond ($page.Param "paige.page.date.hide" | not) $page.PublishDate "" }} {{ $dateclass := $page.Param "paige.page.date.class" | default "text-center text-secondary" }} {{ $gap := "mb-0" }} {{ $readingtime := $page.Param "paige.page.reading_time.show" }} {{ $readingtimeclass := $page.Param "paige.page.reading_time.class" | default "text-center text-secondary" }} -{{ $tags := cond ($page.Param "paige.page.tags.show" | not) slice ($page.Params.tags | default slice) | sort | uniq }} -{{ $tagsclass := $page.Param "paige.page.tags.class" | default "badge text-bg-secondary text-decoration-none" }} +{{ $tags := cond ($page.Param "paige.page.terms.show" | not) slice ($page.Params.tags | default slice) | sort | uniq }} +{{ $termsinnerclass := $page.Param "paige.page.terms.inner_class" | default "badge text-bg-secondary text-decoration-none" }} +{{ $termsouterclass := $page.Param "paige.page.terms.outer_class" | default "text-center" }} +{{ if or $categories $tags }} +

+ {{ $terms := slice }} + {{ range $categories }} + {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }} + {{ end }} + {{ range $tags }} + {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }} + {{ end }} + {{ range sort $terms "name" }} + {{ .name }} + {{ end }} +

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

{{ . }}

+

{{ . }}

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

+

{{ end }} {{ if $readingtime }} -

{{ $page.ReadingTime }} {{ i18n "paige_minutes" $page.ReadingTime }}

-{{ end }} -{{ with $categories }} -

- {{ range . }} - {{ . }} - {{ end }} -

-{{ end }} -{{ with $tags }} -

- {{ range . }} - {{ . }} - {{ end }} -

+

{{ $page.ReadingTime }} {{ i18n "paige_minutes" $page.ReadingTime }}

{{ end }}