completed pagination

This commit is contained in:
2023-08-13 01:42:45 +03:00
parent 3a8682e8ee
commit dfecd6c7eb
9 changed files with 87 additions and 40 deletions
+7 -4
View File
@@ -1,15 +1,18 @@
{% extends "section.html" %}
{% import "post_macros.html" as post_macros %}
{% import "paginate.html" as paginate_macro %}
{% block content %}
<main id="content">
<header>
<h1>Posts</h1>
</header>
{% 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>
<!--<div class="pagination">
{% if paginator.previous %}<a href="{{ paginator.previous }}" class="page-item previous">Previous</a>{% endif %}
{% if paginator.next %}<a href="{{ paginator.next }}" class="page-item next">Next</a>{% endif %}
</div>
-->
{% if paginator %}{{ paginate_macro::paginate() }}{% endif %}
</main>
{% include "footer.html" %}
{% endblock content %}