From 3f50451e2857abde4d0777f90816697304071bbb Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 27 Nov 2025 21:44:09 +0800 Subject: =?UTF-8?q?feat=EF=BC=9A=20new=20sections=20"pour"=20and=20"struct?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/_default/params.yaml | 2 ++ config/_default/params.zh.yaml | 7 +++++-- content/pour/_index.md | 5 +++++ content/struct/_index.md | 5 +++++ layouts/pour/section.html | 37 +++++++++++++++++++++++++++++++++++++ layouts/struct/section.html | 37 +++++++++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 content/pour/_index.md create mode 100644 content/struct/_index.md create mode 100644 layouts/pour/section.html create mode 100644 layouts/struct/section.html diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 0067f26b..37990990 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -2,6 +2,8 @@ author: Eltrac email: hi@guhub.cn mainSections: - posts + - pour + - struct - fictions - library favicon: /favicon.png diff --git a/config/_default/params.zh.yaml b/config/_default/params.zh.yaml index 2b34931a..47fd65ea 100644 --- a/config/_default/params.zh.yaml +++ b/config/_default/params.zh.yaml @@ -1,7 +1,10 @@ description: 欢迎来访,这里只有真情流露和赤裸的思考。 nav: - - name: 议叙 - link: /posts/ + - name: 结构 + link: /struct/ + target: _self + - name: 倾泻 + link: /pour/ target: _self - name: 书目 link: /library/ diff --git a/content/pour/_index.md b/content/pour/_index.md new file mode 100644 index 00000000..0f7df890 --- /dev/null +++ b/content/pour/_index.md @@ -0,0 +1,5 @@ +--- +title: 散文集 +--- + +赤裸的情感和思考在这里**倾泻**而下。 diff --git a/content/struct/_index.md b/content/struct/_index.md new file mode 100644 index 00000000..1b496dd1 --- /dev/null +++ b/content/struct/_index.md @@ -0,0 +1,5 @@ +--- +title: 好奇心 +--- + +在无边信息海洋里,我的武装。 diff --git a/layouts/pour/section.html b/layouts/pour/section.html new file mode 100644 index 00000000..a95571a8 --- /dev/null +++ b/layouts/pour/section.html @@ -0,0 +1,37 @@ +{{ define "main" }} +
+ {{ partial "header.html" . }} +
+
{{ .Content }}
+ + {{ $remainingMonthsToOpen := 3 }} + {{ range (where site.RegularPages "Type" "eq" "pour").GroupByDate "2006" -}} +
+ {{ partial "components/section-title" (dict + "Left" .Key + "Right" (T "archivePage.postCountAnnual" (len .Pages)) + )}} + + {{ range .Pages.GroupByDate "January" }} +
+ +

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

+
+
    + {{ range .Pages }} + {{ partial "items/post-small" . }} + {{ end }} +
+
+ {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} + {{ end }} +
+ {{ end }} +
+
+ {{ partial "footer.html" . }} +{{ end }} diff --git a/layouts/struct/section.html b/layouts/struct/section.html new file mode 100644 index 00000000..183dec14 --- /dev/null +++ b/layouts/struct/section.html @@ -0,0 +1,37 @@ +{{ define "main" }} +
+ {{ partial "header.html" . }} +
+
{{ .Content }}
+ + {{ $remainingMonthsToOpen := 3 }} + {{ range (where site.RegularPages "Type" "eq" "struct").GroupByDate "2006" -}} +
+ {{ partial "components/section-title" (dict + "Left" .Key + "Right" (T "archivePage.postCountAnnual" (len .Pages)) + )}} + + {{ range .Pages.GroupByDate "January" }} +
+ +

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

+
+
    + {{ range .Pages }} + {{ partial "items/post-small" . }} + {{ end }} +
+
+ {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} + {{ end }} +
+ {{ end }} +
+
+ {{ partial "footer.html" . }} +{{ end }} -- cgit v1.2.3