From c58bde01262b2443dffadaa25a511b00214c1c45 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:31:05 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20Catch=20when=20no=20articles=20e?= =?UTF-8?q?xist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/_default/term.html | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 5dff108c..7d3c0d8e 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -14,17 +14,30 @@ {{ end }}
{{ if .Data.Pages }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} +
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} -

- {{ .Key }} -

-
+ {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} +

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range .Paginator.Pages }} + {{ partial "article-link.html" . }} + {{ end }} {{ end }} - {{ range .Pages }} - {{ partial "article-link.html" . }} - {{ end }} - {{ end }} +
+ {{ partial "pagination.html" . }} + {{ else }} +
+

+ {{ i18n "list.no_articles" | emojify }} +

+
{{ end }}
{{ partial "pagination.html" . }}