From 40331b4c1cf9a1d453e998d0dc67ecec1c9848d5 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 15 Oct 2021 18:13:14 -0500 Subject: [PATCH] Move taxonomy related list page to a different file --- layouts/_default/list.html | 27 +------------------------ layouts/taxonomy/list.html | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 layouts/taxonomy/list.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d7b10e3..59dfd39 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,17 +1,5 @@ {{ define "main" }} -{{ if or (eq .Kind "term") (eq .Kind "taxonomy") }} -

- {{ partial "icon.html" "filter" }} - {{ i18n "filtering_for" .Title }} - {{ if eq .Kind "term" }} - - {{ with .OutputFormats.Get "rss" }} - {{ partial "icon.html" "rss" }} - {{ end }} - - {{ end }} -

-{{ else }} +

{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ .Title | markdownify }} @@ -21,18 +9,7 @@ {{ end }}

-{{ end }} -{{ if eq .Kind "taxonomy" }} - - -{{ else }} {{ range .Paginator.Pages }} {{ .Render "summary" }} {{ else }} @@ -48,5 +25,3 @@ {{ end }} {{ end }} - -{{ end }} diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html new file mode 100644 index 0000000..0045abe --- /dev/null +++ b/layouts/taxonomy/list.html @@ -0,0 +1,41 @@ +{{ define "main" }} + +

+ {{ partial "icon.html" "filter" }} + {{ i18n "filtering_for" .Title }} + {{ if eq .Kind "term" }} + + {{ with .OutputFormats.Get "rss" }} + {{ partial "icon.html" "rss" }} + {{ end }} + + {{ end }} +

+ +{{ if eq .Kind "taxonomy" }} + + +{{ else }} +{{ range .Paginator.Pages }} + {{ .Render "summary" }} +{{ else }} +
+ {{ i18n "no_posts" }} +
+{{ end }} + +{{ if gt .Paginator.TotalPages 1 }} + +{{ end }} + +{{ end }} + +{{ end }}