From b23be75978c87d48bbc7b2029f1d7bc9e50b3b4c Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 29 Apr 2025 11:38:24 +0800 Subject: feat: better card section page - show 2 cards on one row - show card statistics - use wider container for the page Former-commit-id: 5f25a26c7e77335e90c2b954784fa98aed3ec864 --- layouts/_default/term.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/_default') diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 7cab2827..4d6fe390 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -24,7 +24,7 @@ {{ end }} -
+
{{ range where .Pages "Section" "eq" "cards" }}

-- cgit v1.2.3 From 98f5f3ef86822db4f2932e1545405c50e70b084e Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 29 Apr 2025 11:47:17 +0800 Subject: refactor: adopt latest template lookup rules Former-commit-id: 48e180c515da5d0372526cefe68ede78ba379a4e --- layouts/_default/taxonomy.html | 81 ------------------------------------------ layouts/_default/term.html | 42 ---------------------- 2 files changed, 123 deletions(-) delete mode 100644 layouts/_default/taxonomy.html delete mode 100644 layouts/_default/term.html (limited to 'layouts/_default') diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html deleted file mode 100644 index e4ad0753..00000000 --- a/layouts/_default/taxonomy.html +++ /dev/null @@ -1,81 +0,0 @@ -{{ define "main" }} -
- {{ partial "header.html" . }} - {{ partial "components/postnav.html" . }} - - - {{ if eq .Type "tags" }} -
- {{ range sort .Site.Taxonomies.tags "Count" "desc" }} - - #{{ .Page.LinkTitle }} - {{ .Count }} - - {{ end }} -
- {{ end }} - - - {{ if eq .Type "categories" }} - {{ partial "components/welcome.html" . }} - {{ $featured := slice "稻草人周刊" "年终总结" "揽物日志" "极客死亡计划书" }} -

周期性刊物

-
- {{ range sort .Site.Taxonomies.categories ".Count" "desc" }} - {{ 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 }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html deleted file mode 100644 index 4d6fe390..00000000 --- a/layouts/_default/term.html +++ /dev/null @@ -1,42 +0,0 @@ -{{ define "main" }} -
- {{ partial "components/post-page-header.html" . }} - {{ partial "components/breadcrumbs.html" . }} - - {{ with .Params.description }} -
- {{ . | markdownify }} -
-
- {{ end }} - -
- -
- {{ range where .Pages "Section" "eq" "cards" }} -
-

- - {{ .Title }} - -

-

{{ .Summary }}

-
- {{ end }} -
-
-
- {{ partial "footer.html" . }} -{{ end }} -- cgit v1.2.3 From 250de42174f787b0fb3cc2dc0a8562623726812b Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 29 Apr 2025 11:58:13 +0800 Subject: fix: problematic terms template lookup order Former-commit-id: 38bd0d014a36758e4b0dda64cd8fe8e05505a2c9 --- layouts/_default/taxonomy.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 layouts/_default/taxonomy.html (limited to 'layouts/_default') diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 00000000..025a63d7 --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,17 @@ +{{ define "main" }} + +{{ partial "footer.html" . }} +{{ end }} -- cgit v1.2.3