Import theme
This commit is contained in:
parent
51769fa6be
commit
c59ffbfeee
127 changed files with 13611 additions and 1 deletions
45
layouts/partials/pagination.html
Normal file
45
layouts/partials/pagination.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<ul class="pagination__list">
|
||||
{{ $.Scratch.Set "hasPrevDots" false }}
|
||||
{{ $.Scratch.Set "hasNextDots" false }}
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="pagination__list-item">
|
||||
<a class="page-link" href="{{ .Paginator.Prev.URL }}">
|
||||
<i class="fa fa-angle-left" aria-label="Previous"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range .Paginator.Pagers }}
|
||||
{{ if eq . $.Paginator }}
|
||||
<li class="pagination__list-item">
|
||||
<span class="page-link current">
|
||||
{{- .PageNumber -}}
|
||||
</span>
|
||||
</li>
|
||||
{{ else if or (or (eq . $.Paginator.First) (eq . $.Paginator.Prev)) (or (eq . $.Paginator.Next) (eq . $.Paginator.Last )) }}
|
||||
<li class="pagination__list-item">
|
||||
<a class="page-link" href="{{ .URL }}">
|
||||
{{- .PageNumber -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
{{ if and (not ($.Scratch.Get "hasPrevDots")) (lt .PageNumber $.Paginator.PageNumber) }}
|
||||
{{ $.Scratch.Set "hasPrevDots" true }}
|
||||
<span class="page-link dots">…</span>
|
||||
{{ else if and (not ($.Scratch.Get "hasNextDots")) (gt .PageNumber $.Paginator.PageNumber) }}
|
||||
{{ $.Scratch.Set "hasNextDots" true }}
|
||||
<span class="page-link dots">…</span>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="pagination__list-item">
|
||||
<a class="page-link" href="{{ .Paginator.Next.URL }}">
|
||||
<i class="fa fa-angle-right" aria-label="Next"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue