From 190312f35c50ee0726e213ea0297ead16bd52d3e Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 25 Apr 2025 22:50:05 +0800 Subject: feat: open first month's post section --- layouts/_default/section.html | 69 ++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'layouts/_default/section.html') diff --git a/layouts/_default/section.html b/layouts/_default/section.html index d6553f28..1a0471ca 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -4,6 +4,7 @@
{{ partial "components/heatmap.html" . }} + {{ $first := true }} {{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}}

@@ -11,40 +12,40 @@ {{ T "archivePage.postCountAnnual" (len .Pages) }}

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

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

-
-
-
    - {{ range .Pages }} -
  • -
    - - - {{ .Title }} - -
    -
    - {{ with .Params.categories }} - - {{ . }} - - {{ end }} -
    -
  • - {{ end }} -
-
-
- {{ end }} - + {{ range .Pages.GroupByDate "January" }} +
+ +

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

+
+
+
    + {{ range .Pages }} +
  • +
    + + + {{ .Title }} + +
    +
    + {{ with .Params.categories }} + + {{ . }} + + {{ end }} +
    +
  • + {{ end }} +
+
+
+ {{ $first = false }} + {{ end }}
{{ end }}
-- cgit v1.2.3