Skip to content

Commit d3e9bbf

Browse files
committed
Pagination
1 parent a8596f4 commit d3e9bbf

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

spendover500.njk

+23-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,29 @@ eleventyComputed:
1515
{{spends.data | jsonify | safe }}
1616
</script>
1717

18-
<a href="/">Back to home</a>
18+
<nav aria-label="Page navigation example">
19+
<ul class="pagination">
20+
{% if pagination.href.previous != null %}
21+
<li class="page-item">
22+
<a class="page-link" href="{{pagination.href.previous}}">
23+
<span aria-hidden="true">&laquo;</span>
24+
<span class="sr-only">Previous month</span>
25+
</a>
26+
</li>
27+
{% endif %}
28+
<li class="page-item">
29+
<a class="page-link" href="/">Home</a>
30+
</li>
31+
{% if pagination.href.next != null %}
32+
<li class="page-item">
33+
<a class="page-link" href="{{pagination.href.next}}">
34+
<span class="sr-only">Next month</span>
35+
<span aria-hidden="true">&raquo;</span>
36+
</a>
37+
</li>
38+
{% endif %}
39+
</ul>
40+
</nav>
1941

2042
<h1>{{title}}</h1>
2143

0 commit comments

Comments
 (0)