diff options
Diffstat (limited to 'views/tag.html')
-rw-r--r-- | views/tag.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/views/tag.html b/views/tag.html index 3e89a7b..bc21fc3 100644 --- a/views/tag.html +++ b/views/tag.html | |||
@@ -1,4 +1,5 @@ | |||
1 | {{ define "tag" }} | 1 | {{ define "tag" }} |
2 | {{ $tagBaseURI := printf "/tag/%s/" .tag }} | ||
2 | <html> | 3 | <html> |
3 | <head> | 4 | <head> |
4 | {{ template "materialize" }} | 5 | {{ template "materialize" }} |
@@ -17,9 +18,15 @@ | |||
17 | {{ end }} | 18 | {{ end }} |
18 | </div> | 19 | </div> |
19 | <ul class="pagination center-align"> | 20 | <ul class="pagination center-align"> |
20 | <li class="{{ if eq .currentPage 1 }}disabled{{ else }}waves-effect{{ end }}"><a href="/tag/{{ .tag }}/{{ sub .currentPage 1 }}"><i class="material-icons">chevron_left</i></a></li> | 21 | <li class="{{ if eq .pagination.Current 1 }}disabled{{ else }}waves-effect{{ end }}"><a href="{{ $tagBaseURI }}{{ sub .pagination.Current 1 }}"><i class="material-icons">chevron_left</i></a></li> |
21 | <li class="active"><a href="#!">{{ .currentPage }}</a></li> | 22 | {{ range .pagination.Before }} |
22 | <li class="{{ if eq .currentPage .pageCount }}disabled{{ else }}waves-effect{{ end }}"><a href="/tag/{{ .tag }}/{{ add .currentPage 1 }}"><i class="material-icons">chevron_right</i></a></li> | 23 | <li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li> |
24 | {{ end }} | ||
25 | <li class="active"><a href="#!">{{ .pagination.Current }}</a></li> | ||
26 | {{ range .pagination.After }} | ||
27 | <li class="wave-effect"><a href="{{ $tagBaseURI }}{{ . }}">{{ . }}</a></li> | ||
28 | {{ end }} | ||
29 | <li class="{{ if eq .pagination.Current .pagination.MaxPage }}disabled{{ else }}waves-effect{{ end }}"><a href="{{ $tagBaseURI }}{{ add .pagination.Current 1 }}"><i class="material-icons">chevron_right</i></a></li> | ||
23 | </ul> | 30 | </ul> |
24 | </div> | 31 | </div> |
25 | </div> | 32 | </div> |