Permalink
Browse files

Improve display of pagination links

  • Loading branch information...
1 parent f6437c6 commit 90b827af5547f32bd5ff77217370d25483ccb45d @yoshiharuyamashita committed Mar 27, 2016
Showing with 14 additions and 3 deletions.
  1. +9 −3 layouts/partials/pagination.html
  2. +5 −0 static/css/blackburn.css
@@ -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 }}
@@ -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.