layouts/partials/pagination.html: Rework buttons
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
I just noticed that the Bootstrap blog example has the order of the buttons reversed from how I expected. They word them as "older" and "newer" and they are opposite to how I expected. For now I will keep these the same as the example, but eventually I might change them to "previous" and "next" as is more commonly used. See: https://getbootstrap.com/docs/5.0/examples/blog/
This commit is contained in:
parent
f813659623
commit
17f8037b1c
@ -1,15 +1,15 @@
|
||||
<nav class="blog-pagination" aria-label="Pagination">
|
||||
{{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Older</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Newer</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Older</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Newer</a>
|
||||
{{ end }}
|
||||
{{ if and (.Paginator.HasPrev) (not .Paginator.HasNext) }}
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Older</a>
|
||||
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a>
|
||||
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Older</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" rel="prev" role="button">Newer</a>
|
||||
{{ end }}
|
||||
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Older</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Newer</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Older</a>
|
||||
<a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user