From aad15bc05e1ab8b891925a892601a2662181bf54 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 18 Apr 2025 16:00:15 +0800 Subject: feat: separate periodic posts and normal post series Former-commit-id: 6c3d492ac40b4ccf3d510f38b011f695207ee398 --- layouts/_default/taxonomy.html | 74 ++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 6aaf3d46..8f449506 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -18,30 +18,62 @@ {{ if eq .Type "categories" }} {{ partial "components/welcome.html" . }} -
+ {{ $featured := slice "稻草人周刊" "年终总结" "揽物日志" }} +

周期性刊物

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

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

-

{{ .Page.Params.description | markdownify }}

- - {{ if gt .Count 6 }} - 阅读所有 {{ .Count }} 篇文章 - {{ end }} -
- {{ end }} -
+ {{ if in $featured .Page.Title }} +
+

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

+

{{ .Page.Params.description | markdownify }}

+ + {{ if gt .Count 6 }} + 阅读所有 {{ .Count }} 篇文章 + {{ end }} +
+ {{ end }} + {{ end }} +
+ + +

文章系列

+
+ {{ range sort .Site.Taxonomies.categories ".Count" "desc" }} + {{ if not (in $featured .Page.Title) }} +
+

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

+

{{ .Page.Params.description | markdownify }}

+ + {{ if gt .Count 6 }} + 阅读所有 {{ .Count }} 篇文章 + {{ end }} +
+ {{ end }} + {{ end }} +
{{ end }} + {{ partial "footer.html" . }} {{ end }} -- cgit v1.2.3