forked from retoor/devplacepy
Extract shared PAGE_SIZE constant and paginate() function into database.py, replacing inline cursor logic in feed, gists, news, and projects routers. Introduce `_load_more.html` partial template to unify "Load More" button rendering. Update all affected route handlers to accept `before` query parameter and return `next_cursor` for seamless infinite scroll. Adjust projects count display to use filtered length instead of total. Add test helper `_seed_posts` for pagination coverage.
6 lines
253 B
HTML
6 lines
253 B
HTML
{% if next_cursor %}
|
|
<div class="load-more-wrap">
|
|
<a href="{{ request.url.path }}?{{ request.url.include_query_params(before=next_cursor).query }}" class="btn btn-secondary btn-sm"><span class="icon">📄</span>Load More</a>
|
|
</div>
|
|
{% endif %}
|