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

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stratton <matt.stratton@gmail.com>2019-11-23 21:21:06 +0300
committerGitHub <noreply@github.com>2019-11-23 21:21:06 +0300
commit4647fd7ea6afe4df731cc003f68917fa50351069 (patch)
tree1aa7150f4f13952304d55f7f705e41e22287abb2 /layouts
parentd1c003610fa23f47badd9d77958b6db5fd99ae8a (diff)
Fix pagination code on grid layout (#235)
Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/grid.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/grid.html b/layouts/partials/grid.html
index 3e7c0b8..4292429 100644
--- a/layouts/partials/grid.html
+++ b/layouts/partials/grid.html
@@ -64,7 +64,7 @@
{{if $paginator.HasPrev }}
{{ if gt $paginator.PageNumber 2 }}
{{- with $paginator.First -}}
- {{- $url := trim (string .Permalink) "/" | absURL -}}
+ {{- $url := trim (string .URL) "/" | absURL -}}
<li class="page-item">
<a href="{{ $url }}" aria-label="First" class="page-link"><span aria-hidden="true">&laquo;&laquo;</span></a>
</li>
@@ -83,7 +83,7 @@
<!-- page # buttons -->
{{ range $pag.Pagers }}
{{ $cur := .PageNumber }}
- {{- $url := trim (string $.Permalink) "/" | absURL -}}
+ {{- $url := trim (string $.URL) "/" | absURL -}}
{{ if in ($.Scratch.Get "show") $cur }}
<li class = "{{ if eq . $pag }}active{{ end }} page-item"><a href="{{ $.Permalink }}" class="page-link hidden-md-down">{{ .PageNumber }}</a></li>
{{ else if in (slice 2 (sub $total 1)) $cur }}
@@ -101,7 +101,7 @@
<!-- last page button -->
{{ if lt $paginator.PageNumber (sub $paginator.TotalPages 1) }}
{{- with $paginator.Last -}}
- {{- $url := trim (string .Permalink) "/" | absURL -}}
+ {{- $url := trim (string .URL) "/" | absURL -}}
<li class="page-item">
<a href="{{ $url }}" aria-label="Last" class="page-link"><span aria-hidden="true">&raquo;&raquo;</span></a>
</li>