Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <upagge@mail.ru>2021-01-11 01:02:24 +0300
committeruPagge <upagge@mail.ru>2021-01-11 01:02:24 +0300
commit63aed54237e3723c9c818b9bb9ee2e60e655a67b (patch)
tree0c167d5cfe5fa49f2bc3e89b2f8c19415d4c52d7 /layouts/_default
parenteec0826257ee48e23ba8d74b50a989cd4e259698 (diff)
new archive
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/section.html26
1 files changed, 15 insertions, 11 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index 5694317..882c1ae 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -11,23 +11,27 @@
{{- /* Paginate */ -}}
{{- if .Pages -}}
+
{{- $pages := .Pages.GroupByDate "2006" -}}
- {{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
+ {{- with .Site.Params.section.paginateArchive | default .Site.Params.paginate -}}
{{- $pages = $.Paginate $pages . -}}
{{- else -}}
{{- $pages = .Paginate $pages -}}
{{- end -}}
{{- range $pages.PageGroups -}}
- <h3 class="group-title">{{ .Key }}</h3>
- {{- range .Pages -}}
- <article class="archive-item">
- <a href="{{ .RelPermalink }}" class="archive-item-link">
- {{- .Title -}}
- </a>
- <span class="archive-item-date">
- {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
- </span>
- </article>
+ <div class="group-title-year">{{ .Key }}</div>
+ {{- range .Pages.GroupByDate "January" }}
+ <div class="group-title-month">{{- .Key }}</div>
+ {{- range .Pages -}}
+ <article class="archive-item">
+ <a href="{{ .RelPermalink }}" class="archive-item-link">
+ {{- .Title -}}
+ </a>
+ <span class="archive-item-date">
+ {{- $.Site.Params.section.dateFormat | default "02" | .Date.Format -}}
+ </span>
+ </article>
+ {{- end -}}
{{- end -}}
{{- end -}}
{{- partial "paginator.html" . -}}