Files
StarPunk/templates/likes.html
T
PhilandClaude Opus 5.5 615354d17e 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>
2026-11-27 20:51:30 -07:00

32 lines
1010 B
HTML

{% extends "base.html" %}
{% from "partials/note_preview.html" import note_preview %}
{% from "partials/pager.html" import pager %}
{% block title %}Likes · {% if page and page > 1 %}Page {{ page }} · {% endif %}{{ config.SITE_NAME }}{% endblock %}
{% block content %}
<div class="h-feed">
<h1 class="p-name page-title">Likes</h1>
{# Feed URL and author, as on the home page (v2.8.0) #}
<a class="u-url" href="{{ absolute_url_for(request.endpoint, **request.view_args) }}" hidden>Feed URL</a>
{% if author %}
<span class="p-author h-card" hidden><a class="p-name u-url" href="{{ author.url or author.me }}">{{ author.name or author.url or author.me }}</a></span>
{% endif %}
{% if notes %}
{% for note in notes %}
{{ note_preview(note, author) }}
{% endfor %}
{% else %}
<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>
</div>
{% endblock %}