aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-06-18 18:32:33 -0400
committertdro <tdro@noreply.example.com>2023-06-18 18:32:33 -0400
commiteaa731e5eddf263e12d46481a036cce9882bf72e (patch)
treea11c076ddf22b9c92d060dd0d6f620d9b06e5fc2 /themes/default/layouts/partials
parent61e5db6e54d264ca8950cd50e84032db4f167660 (diff)
downloadcanory-eaa731e5eddf263e12d46481a036cce9882bf72e.tar.gz
canory-eaa731e5eddf263e12d46481a036cce9882bf72e.tar.bz2
canory-eaa731e5eddf263e12d46481a036cce9882bf72e.zip
themes/default/layouts/partials/pagination: Simplify and prepare
Diffstat (limited to 'themes/default/layouts/partials')
-rw-r--r--themes/default/layouts/partials/author-card.html2
-rw-r--r--themes/default/layouts/partials/pagination.html85
2 files changed, 36 insertions, 51 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index fab591e..df0af84 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -75,7 +75,7 @@
<p>{{ .Data.description | markdownify | plainify | htmlUnescape | truncate 60 "..." }}</p>
<a title="Follow with RSS Reader" href="{{ "" | absURL }}/{{ .Data.user }}/rss.xml">
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/rss.svg")) }}
- <span>Follow</span>
+ <header>Follow</header>
</a>
</micro-summary>
</micro-card>
diff --git a/themes/default/layouts/partials/pagination.html b/themes/default/layouts/partials/pagination.html
index fa3c85e..d633b92 100644
--- a/themes/default/layouts/partials/pagination.html
+++ b/themes/default/layouts/partials/pagination.html
@@ -1,67 +1,52 @@
{{- with .Paginator -}}
-
- {{- $first := "Newest" -}}
- {{- $prev := "Newer" -}}
- {{- $next := "Older" -}}
- {{- $last := "Oldest" -}}
- {{- $invisible := "data-invisible" -}}
-
- {{- $firstData := $invisible -}}
- {{- $firstHref := "" -}}
- {{- $firstTitle := $first -}}
+ {{- $firstTitle := "hidden" -}}
+ {{- $prevTitle := "hidden" -}}
+ {{- $nextTitle := "hidden" -}}
+ {{- $lastTitle := "hidden" -}}
+ {{- $prevRel := "prev" -}}
+ {{- $nextRel := "next" -}}
+ {{- $firstHref := "/" -}}
+ {{- $prevHref := "/" -}}
+ {{- $nextHref := "/" -}}
+ {{- $lastHref := "/" -}}
{{- if and .HasPrev .First -}}
- {{- $firstData = "" -}}
- {{- $firstHref = .First.URL -}}
+ {{- $firstHref = .First.URL | absURL -}}
+ {{- $firstTitle = "Newest" -}}
{{- end -}}
- {{- $prevData := $invisible -}}
- {{- $prevHref := "" -}}
- {{- $prevRel := "prev" -}}
- {{- $prevTitle := $prev -}}
-
{{- with .Prev -}}
- {{- $prevData = "" -}}
- {{- $prevHref = .URL -}}
+ {{- $prevHref = .URL | absURL -}}
+ {{- $prevTitle = "Newer" -}}
{{- end -}}
- {{- $nextData := $invisible -}}
- {{- $nextHref := "" -}}
- {{- $nextRel := "next" -}}
- {{- $nextTitle := $next -}}
-
{{- if .Next -}}
- {{- $nextData = "" -}}
- {{- $nextHref = .Next.URL -}}
+ {{- $nextHref = .Next.URL | absURL -}}
+ {{- $nextTitle = "Older" -}}
{{- end -}}
- {{- $lastData := $invisible -}}
- {{- $lastHref := "" -}}
- {{- $lastTitle := $last -}}
-
{{- if and .HasNext .Last -}}
- {{- $lastData = "" -}}
- {{- $lastHref = .Last.URL -}}
+ {{- $lastHref = .Last.URL | absURL -}}
+ {{- $lastTitle = "Oldest" -}}
{{- end -}}
<paginator-navigation{{ if eq .TotalPages 1 }} hidden {{ end }}>
-
- <a {{ $firstData | safeHTMLAttr }} href="{{ $firstHref }}" title="{{ $firstTitle }}" >
- {{ $firstTitle }}
- </a>
-
- <a rel="{{ $prevRel }}" {{ $prevData | safeHTMLAttr }} href="{{ $prevHref }}" title="{{ $prevTitle }}">
- {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
- {{ $prevTitle }}
- </a>
-
- <a rel="{{ $nextRel }}" {{ $nextData | safeHTMLAttr }} href="{{ $nextHref }}" title="{{ $nextTitle }}">
- {{ $nextTitle }}
- {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
- </a>
-
- <a {{ $lastData | safeHTMLAttr }} href="{{ $lastHref }}" title="{{ $lastTitle }}" >
- {{ $lastTitle }}
- </a>
+ <a href="{{ $firstHref }}" title="{{ $firstTitle }}" >
+ <header>{{ $firstTitle }}</header>
+ </a>
+
+ <a rel="{{ $prevRel }}" href="{{ $prevHref }}" title="{{ $prevTitle }}">
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
+ <header>{{ $prevTitle }}</header>
+ </a>
+
+ <a rel="{{ $nextRel }}" href="{{ $nextHref }}" title="{{ $nextTitle }}">
+ <header>{{ $nextTitle }}</header>
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
+ </a>
+
+ <a href="{{ $lastHref }}" title="{{ $lastTitle }}">
+ <header>{{ $lastTitle }}</header>
+ </a>
</paginator-navigation>
{{- end -}}