From a62a3e7755579d93ce3a87243dd277575930fffe Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Mon, 5 Nov 2018 21:49:16 -0500 Subject: init --- themes/even/layouts/_default/section.html | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 themes/even/layouts/_default/section.html (limited to 'themes/even/layouts/_default/section.html') diff --git a/themes/even/layouts/_default/section.html b/themes/even/layouts/_default/section.html new file mode 100644 index 0000000..fbe80f1 --- /dev/null +++ b/themes/even/layouts/_default/section.html @@ -0,0 +1,50 @@ +{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} + +{{ define "content"}} +{{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }} +
+ {{- if and (not $paginator.HasPrev) .Site.Params.showArchiveCount }} +
+ + {{ T "archiveCounter" (len .Data.Pages) }} + +
+ {{- end -}} + + {{- range $index, $element := $paginator.Pages -}} + {{- $thisYear := $element.Date.Format "2006" }} + {{- $lastElement := $index | add -1 | index $paginator.Pages }} + {{ if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }} +
+

{{ $thisYear }}

+
+ {{- end }} + +
+ + {{ $element.Date.Format "01-02" }} + + + + {{ .Title }} + + +
+ {{- end -}} +
+ + +{{ end }} -- cgit v1.2.3