Skip to content

Commit

Permalink
Improve display of pagination links
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshiharuyamashita committed Mar 27, 2016
1 parent f6437c6 commit 90b827a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 9 additions & 3 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
{{ $prev := "fa fa-chevron-left"}}
{{ $next := "fa fa-chevron-right"}}
<nav class="pagination" role="pagination">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}"><i class="fa fa-angle-double-left"></i></a>
<a href="{{ .Paginator.Prev.URL }}"><i class="{{ $prev }}"></i></a>
{{ else }}
<i class="{{ $prev }}"></i>
{{ end }}
<span>{{ .Paginator.PageNumber }} / {{ .Paginator.TotalPages }}</span>
<span>&nbsp;{{ .Paginator.PageNumber }} / {{ .Paginator.TotalPages }}&nbsp;</span>
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}"><i class="fa fa-angle-double-right"></i></a>
<a href="{{ .Paginator.Next.URL }}"><i class="{{ $next }}"></i></a>
{{ else }}
<i class="{{ $next }}"></i>
{{ end }}
</nav>
{{ end }}
5 changes: 5 additions & 0 deletions static/css/blackburn.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ i {

.pagination {
text-align: center;
margin-top: 3em;
}

.pagination a {
color: #265778;
}

0 comments on commit 90b827a

Please sign in to comment.