From 8d0dacf29e34d27c78e3a6da9f9ac100a662792f Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 12:18:35 +0800 Subject: refactor: remove generic section template --- layouts/article/section.html | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 layouts/article/section.html (limited to 'layouts/article') diff --git a/layouts/article/section.html b/layouts/article/section.html new file mode 100644 index 00000000..5b5cb33a --- /dev/null +++ b/layouts/article/section.html @@ -0,0 +1,52 @@ +{{ define "main" }} + + {{ $pages := .Pages }} + {{ $categories := slice }} + +
+ {{ partial "header.html" . }} + {{ partial "home/home-nav" . }} +
+
{{ .Content }}
+ + {{ partial "section-categories" $pages }} + + + {{ $remainingMonthsToOpen := 3 }} + {{ range $pages.GroupByDate "2006" -}} +
+ {{ partial "components/section-title" (dict + "Left" .Key + "Right" (T "archivePage.postCountAnnual" (len .Pages)) + )}} + + {{ range .Pages.GroupByDate "January" }} +
+

+ {{ .Key }} +

+ +
+ {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} + {{ end }} +
+ {{ end }} +
+
+ {{ partial "footer.html" . }} +{{ end }} -- cgit v1.2.3 From f8bceee60220ee6e74c56328255c491372158147 Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 12:18:55 +0800 Subject: feat: add article page template --- layouts/article/page.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 layouts/article/page.html (limited to 'layouts/article') diff --git a/layouts/article/page.html b/layouts/article/page.html new file mode 100644 index 00000000..e093e810 --- /dev/null +++ b/layouts/article/page.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ partial "template/post-page" . }} +{{ end }} -- cgit v1.2.3 From 3d689d9dcd7aa9e727e37c899e9bd41a30bb710a Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 12:19:52 +0800 Subject: remove(partial): no longer show unique section categories --- layouts/article/section.html | 2 -- 1 file changed, 2 deletions(-) (limited to 'layouts/article') diff --git a/layouts/article/section.html b/layouts/article/section.html index 5b5cb33a..b4ccd023 100644 --- a/layouts/article/section.html +++ b/layouts/article/section.html @@ -9,8 +9,6 @@
{{ .Content }}
- {{ partial "section-categories" $pages }} - {{ $remainingMonthsToOpen := 3 }} {{ range $pages.GroupByDate "2006" -}} -- cgit v1.2.3 From cab20cb4ca9ae6e5fe979ad71017081f3c91320a Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 12:22:42 +0800 Subject: feat: change article section page style --- layouts/article/section.html | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'layouts/article') diff --git a/layouts/article/section.html b/layouts/article/section.html index b4ccd023..b56b30eb 100644 --- a/layouts/article/section.html +++ b/layouts/article/section.html @@ -9,7 +9,6 @@
{{ .Content }}
- {{ $remainingMonthsToOpen := 3 }} {{ range $pages.GroupByDate "2006" -}}
@@ -19,27 +18,20 @@ )}} {{ range .Pages.GroupByDate "January" }} -
-

- {{ .Key }} -

+
+ +

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

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