Commit basic working example
This commit is contained in:
16
layouts/partials/pagination.html
Normal file
16
layouts/partials/pagination.html
Normal file
@ -0,0 +1,16 @@
|
||||
<nav class="blog-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>
|
||||
{{ 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-primary disabled" href="#" role="button" aria-disabled="true">Newer</a>
|
||||
{{ end }}
|
||||
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<a class="btn btn-outline-primary disabled" href="#" role="button" aria-disabled="true">Older</a>
|
||||
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" rel="next" role="button">Newer</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
{{- /* vim: set ts=2 sw=2 et: */}}
|
Reference in New Issue
Block a user