From 9a478cf5ee77a32b83dbe8f03d7ed8e83247937f Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 27 Nov 2025 23:35:37 +0800 Subject: feat: adapt to new content system - remove more posts link in homepage - more latest content (posts, essays, library, fictions...) in homepage - use the same template for posts and essays - new post section list style - show section-specific categories in section page --- layouts/section.html | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'layouts/section.html') diff --git a/layouts/section.html b/layouts/section.html index d3fe3ac4..3ddc6bb7 100644 --- a/layouts/section.html +++ b/layouts/section.html @@ -1,11 +1,19 @@ {{ define "main" }} + + {{ $pages := .Pages }} + {{ $categories := slice }} +
{{ partial "header.html" . }}
{{ .Content }}
+ + {{ partial "section-categories" $pages }} +

*稻草人周刊也属于散文集,但为了方便查阅,周刊没有列在下面,请到分类页面查看周刊。

+ {{ $remainingMonthsToOpen := 3 }} - {{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}} + {{ range $pages.GroupByDate "2006" -}}
{{ partial "components/section-title" (dict "Left" .Key @@ -13,20 +21,30 @@ )}} {{ range .Pages.GroupByDate "January" }} -
- -

- {{ .Key }} - {{ T "archivePage.postCountMonthly" (len .Pages) }} -

-
+
+

+ {{ .Key }} +

-
+
{{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} {{ end }} -- cgit v1.2.3