implemented pagination

This commit is contained in:
2023-08-09 02:21:58 +03:00
parent 9e3931e5e2
commit afa446d39a
3 changed files with 21 additions and 3 deletions
+5 -1
View File
@@ -5,7 +5,11 @@
<header>
<h1>Posts</h1>
</header>
{% for page in section.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
{% for page in paginator.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
<nav>
{% if paginator.previous %}<a href="{{ paginator.previous }}" class="previous">Previous</a>{% endif %}
{% if paginator.next %}<a href="{{ paginator.next }}" class="next">Next</a>{% endif %}
</nav>
</main>
{% include "footer.html" %}
{% endblock content %}