From: Kai Moritz Date: Thu, 18 Dec 2025 23:35:54 +0000 (+0100) Subject: WAR: thymeleaf-theme: Added template `archives.html` (based on PaperMod) X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=f5d87bd970b56ab61431ab0327fb786fbc873ac9;p=website WAR: thymeleaf-theme: Added template `archives.html` (based on PaperMod) --- diff --git a/layouts/archives.html b/layouts/archives.html deleted file mode 100644 index 229ebc29..00000000 --- a/layouts/archives.html +++ /dev/null @@ -1,77 +0,0 @@ -{{- define "main" }} - - - -{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} - -{{- if site.Params.ShowAllPagesInArchive }} -{{- $pages = site.RegularPages }} -{{- end }} - -{{- range $pages.GroupByPublishDate "2006" }} -{{- if ne .Key "0001" }} -
- {{- $year := replace .Key "0001" "" }} -

- - {{- $year -}} - -  {{ len .Pages }} -

- {{- range .Pages.GroupByDate "January" }} -
-
- {{- range .Pages }} - {{- if eq .Kind "page" }} -
-

- {{- .Title | markdownify }} - {{- if .Draft }} - - - - - - {{- end }} -

-
- {{- partial "post_meta.html" . -}} -
- -
- {{- end }} - {{- end }} -
-
- {{- end }} -
-{{- end }} -{{- end }} - -{{- end }}{{/* end main */}} diff --git a/layouts/blog/section.html b/layouts/blog/section.html new file mode 100644 index 00000000..229ebc29 --- /dev/null +++ b/layouts/blog/section.html @@ -0,0 +1,77 @@ +{{- define "main" }} + + + +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + +{{- if site.Params.ShowAllPagesInArchive }} +{{- $pages = site.RegularPages }} +{{- end }} + +{{- range $pages.GroupByPublishDate "2006" }} +{{- if ne .Key "0001" }} +
+ {{- $year := replace .Key "0001" "" }} +

+ + {{- $year -}} + +  {{ len .Pages }} +

+ {{- range .Pages.GroupByDate "January" }} +
+
+ {{- range .Pages }} + {{- if eq .Kind "page" }} +
+

+ {{- .Title | markdownify }} + {{- if .Draft }} + + + + + + {{- end }} +

+
+ {{- partial "post_meta.html" . -}} +
+ +
+ {{- end }} + {{- end }} +
+
+ {{- end }} +
+{{- end }} +{{- end }} + +{{- end }}{{/* end main */}}