From 9a302b57987e69b275cd58a73ceb582eac42fb9b Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sun, 2 Feb 2025 21:38:33 +0800 Subject: feat(theme): shorter index page show only current year's posts on index page; show all posts in /posts with folded sections Former-commit-id: 633ed98ce80185fb7cb1f2fe751c1c359398b533 --- layouts/section/posts.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 layouts/section/posts.html (limited to 'layouts/section/posts.html') diff --git a/layouts/section/posts.html b/layouts/section/posts.html new file mode 100644 index 00000000..3c2c862c --- /dev/null +++ b/layouts/section/posts.html @@ -0,0 +1,57 @@ +{{ partial "snippets/document-start.html" . }} +
+ {{ partial "header.html" . }} +
+ + {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}} +
+

+ {{ .Key }} + {{ len .Pages }} TOTAL POSTS +

+ + {{ range .Pages.GroupByDate "January" }} +
+ +

+ {{ .Key }} + {{ len .Pages }} POSTS +

+
+
    + {{ range .Pages }} +
  • +
    +
    + +
    +
    +
    + +
    + {{ with .Params.categories }} +
    + {{ . }} +
    + {{ end }} +
    +
    +
    +
    +
  • + {{ end }} +
+
+ {{ end }} + +
+ {{ end }} +
+
+{{ partial "snippets/document-end.html" . }} -- cgit v1.2.3