From bd2a14f400a2ebbb0de0bb1e152f8c3ff9ff20ed Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 16 Apr 2025 23:24:53 +0800 Subject: feat: better category page --- layouts/_default/taxonomy.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'layouts/_default') diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index adcb29c2..24606ff8 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -5,7 +5,7 @@ {{ if eq .Type "tags" }} -
+
{{ range sort .Site.Taxonomies.tags "Count" "desc" }} #{{ .Page.LinkTitle }} @@ -18,21 +18,24 @@ {{ if eq .Type "categories" }} {{ partial "components/welcome.html" . }} -
- {{ range .Site.Taxonomies.categories.Alphabetical }} -
-

+
+ {{ range sort .Site.Taxonomies.categories ".Count" "desc" }} +
+

{{ with .Page.Params.icon }}{{ . }}{{ end }} {{ .Page.LinkTitle }}

+

{{ .Page.Params.description }}

    - {{ range first 3 .Pages }} + {{ range first 6 .Pages }}
  • {{ .Title }}
  • {{ end }}
- {{ if gt .Count 3 }} - 阅读所有 {{ .Count }} 篇文章 + {{ if gt .Count 6 }} + 阅读所有 {{ .Count }} 篇文章 {{ end }}
{{ end }} -- cgit v1.2.3