feat: v2.21.0 paging for homepage, likes and admin dashboard
The homepage showed only the 20 newest notes and /likes the 50 newest, with no way back. The admin dashboard paged list_notes()'s default 50 newest, so it always said 'Page 1 of 2'. All three now count with count_notes() and fetch one page with limit/offset. Public pages get '<- Newer / Page N of M / Older ->' with rel=prev/next (h-feed paging), ?page=1 redirects to the bare URL, bad pages 404; the dashboard falls back to the nearest valid page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9074c9a08c
commit
615354d17e
11 files changed
+373
-60
No files matched your search
@@ -1,7 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "partials/note_preview.html" import note_preview %}
|
||||
{% from "partials/pager.html" import pager %}
|
||||
|
||||
{% block title %}Likes · {{ config.SITE_NAME }}{% endblock %}
|
||||
{% block title %}Likes · {% if page and page > 1 %}Page {{ page }} · {% endif %}{{ config.SITE_NAME }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="h-feed">
|
||||
@@ -21,6 +22,8 @@
|
||||
<p class="empty-state">Nothing liked yet.</p>
|
||||
{% endif %}
|
||||
|
||||
{{ pager('public.likes', page, total_pages) }}
|
||||
|
||||
<nav class="note-nav">
|
||||
<a href="/">← All notes</a>
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user