Allow auto-pagination on profile page (#445)

pull/458/head
TAKAHASHI Shuuji 2023-01-20 15:09:01 +09:00 zatwierdzone przez GitHub
rodzic ee3b51c28f
commit 10c7da96c7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -103,11 +103,15 @@
</span>
{% endfor %}
{% if page_obj.has_next %}
<div class="pagination">
<a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a>
</div>
{% endif %}
<div class="pagination">
{% if page_obj.has_previous and not request.htmx %}
<a class="button" href=".?page={{ page_obj.previous_page_number }}">Previous Page</a>
{% endif %}
{% if page_obj.has_next %}
<a class="button" href=".?page={{ page_obj.next_page_number }}" hx-get=".?page={{ page_obj.next_page_number }}" hx-select=".left-column > *:not(.view-options)" hx-target=".pagination" hx-swap="outerHTML" {% if config_identity.infinite_scroll %}hx-trigger="revealed"{% endif %}>Next Page</a>
{% endif %}
</div>
{% endblock %}
{% endif %}