Add pagination

This commit is contained in:
Joakim Hellsén 2024-05-23 04:25:04 +02:00
commit 6b52e455bc
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
6 changed files with 82 additions and 26 deletions

View file

@ -3,6 +3,7 @@
<h2>{{ feed.url }}</h2>
<p>{{ feed.description }}</p>
<h3>Entries</h3>
{% if entries|length == 0 %}<p>No entries found.</p>{% endif %}
<ul>
{% for entry in entries %}
<li>

View file

@ -9,4 +9,6 @@
</li>
{% endfor %}
</ul>
{% if next_url %}<a href='{{ url_for("feeds") }}?next_url={{ next_url }}'>Next</a>{% endif %}
{% if previous_url %}<a href='{{ url_for("feeds") }}?previous_url={{ previous_url }}'>Previous</a>{% endif %}
{% endblock content %}

View file

@ -12,4 +12,10 @@
{% else %}
<p>No entries found.</p>
{% endif %}
{% if next_feed and next_entry %}
<a href='{{ url_for("search") }}?query={{ query }}&next_feed={{ next_feed }}&next_entry={{ next_entry }}'>Next</a>
{% endif %}
{% if prev_feed and prev_entry %}
<a href='{{ url_for("search") }}?query={{ query }}&prev_feed={{ prev_feed }}&prev_entry={{ prev_entry }}'>Previous</a>
{% endif %}
{% endblock content %}