aboutsummaryrefslogtreecommitdiff
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
parent7a4bd7a9a703052df5b5717e62f126a219015509 (diff)
downloadcanory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.tar.gz
canory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.tar.bz2
canory-fc175fbf07469ccef2260436ddde717e1e9fc1ba.zip
themes/default/layouts/_default/home.records: Paginate
-rw-r--r--assets/css/default.css16
-rw-r--r--themes/default/layouts/_default/home.history.html4
-rw-r--r--themes/default/layouts/_default/home.records.html64
3 files changed, 40 insertions, 44 deletions
diff --git a/assets/css/default.css b/assets/css/default.css
index 067aa0e..319a2da 100644
--- a/assets/css/default.css
+++ b/assets/css/default.css
@@ -821,7 +821,8 @@ input[type="checkbox"]:checked + micro-card[limit] micro-overlay {
display: none;
}
-message-archive h1 {
+history-archive h1,
+records-archive h1 {
text-align: center;
font-weight: 400;
font-size: 150%;
@@ -1628,7 +1629,8 @@ item-list li:hover span:last-child {
text-decoration: underline;
}
-item-list li a {
+item-list li > a,
+records-archive li {
display: flex;
text-decoration: none;
align-items: baseline;
@@ -1636,23 +1638,23 @@ item-list li a {
padding: 0.5rem;
}
-item-list a span:first-child {
+item-list span:first-child {
flex: 1;
text-transform: uppercase;
}
-item-list a span:nth-child(2) {
+item-list span:nth-child(2) {
flex: 3;
margin: 0 0.5rem;
}
-item-list a span:last-child {
+item-list span:last-child {
flex: 1;
text-align: right;
}
-item-list a span:first-child,
-item-list a span:last-child {
+item-list span:first-child,
+item-list span:last-child {
color: #444;
color: var(--fade);
}
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" }}