aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-10-03 01:08:40 -0400
committertdro <tdro@noreply.example.com>2022-10-03 01:08:40 -0400
commitfc175fbf07469ccef2260436ddde717e1e9fc1ba (patch)
tree434c8d65cb582e4cefda44e2570e96330b383c4e /themes/default/layouts/_default
parent7a4bd7a9a703052df5b5717e62f126a219015509 (diff)
downloadcanory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.tar.gz
canory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.tar.bz2
canory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.zip
themes/default/layouts/_default/home.records: Paginate
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r--themes/default/layouts/_default/home.history.html4
-rw-r--r--themes/default/layouts/_default/home.records.html64
2 files changed, 31 insertions, 37 deletions
diff --git a/themes/default/layouts/_default/home.history.html b/themes/default/layouts/_default/home.history.html
index b0f0b80..8986608 100644
--- a/themes/default/layouts/_default/home.history.html
+++ b/themes/default/layouts/_default/home.history.html
@@ -20,7 +20,7 @@
)
}}
- <message-archive>
+ <history-archive>
<item-list>
{{ range (.Paginator.Pages.GroupByDate "2006") }}
{{ range (first 1 .Pages) }}
@@ -44,7 +44,7 @@
</ul>
{{ end }}
</item-list>
- </message-archive>
+ </history-archive>
{{ partial "pagination.html" . }}
diff --git a/themes/default/layouts/_default/home.records.html b/themes/default/layouts/_default/home.records.html
index 4161392..2c7eea9 100644
--- a/themes/default/layouts/_default/home.records.html
+++ b/themes/default/layouts/_default/home.records.html
@@ -8,47 +8,41 @@
{{ define "middle" }}
-{{ partial "navigator-middle.html"
- (dict
- "Title" "Records"
- "Subtitle" (partial "count-tags.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
-}}
+ {{ partial "navigator-middle.html"
+ (dict
+ "Title" "Records"
+ "Subtitle" (partial "count-tags.html" .)
+ "Icon" "arrow-left"
+ "IconLabel" "Back"
+ "Href" "/"
+ "Id" "back"
+ "Context" .
+ )
+ }}
-{{- $page := 1 -}}
-{{- $count := 0 -}}
-
-<item-list>
- {{ range $taxonomy := .Site.Taxonomies }}
- {{ range $tag, $article := $taxonomy }}
- <h1><a href="{{ $.Site.BaseURL }}/tags/{{ $tag }}/">#{{ $tag }}</a></h1>
+ <records-archive>
+ <item-list>
+ {{ range (.Paginator.Pages.GroupByDate "2006") }}
+ {{ range (first 1 .Pages) }}
+ <h1>{{ .Date.Format "2006" }}</h1>
+ {{ end }}
<ul>
- {{ range $article.Pages -}}
- {{- $count = add $count 1 -}}
+ {{ range .Pages }}
<li>
- <a
- title="{{ partial "meta-title.html" . }}"
- href="{{ .Site.BaseURL }}/tags/{{ $tag }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}">
- <span><code>{{ .Date.Format "02 Jan 2006" }}</code></span>
- <span>{{ partial "meta-title.html" . }}</span>
- <span>@{{ partial "author-user.html" . }}</span>
- </a>
+ <span>
+ <code>{{ .Date.Format "02 Jan" }}</code>
+ </span>
+ <span>{{ partial "meta-tags.html" . }} &mdash; {{ partial "meta-title.html" . }}</span>
+ <span>@{{ partial "author-user.html" . }}</span>
</li>
- {{ if eq (mod $count $.Paginator.PageSize) 0 }}
- {{ $page = add $page 1 }}
- {{- end -}}
- {{- end -}}
- {{- $page = 1 -}}
- {{- $count = 0 -}}
+ {{ end }}
</ul>
{{ end }}
- {{ end }}
-</item-list>
+ </item-list>
+ </records-archive>
+
+ {{ partial "pagination.html" . }}
+
{{ end }}
{{ define "right" }}