{# Pagination Macro — Usage: {% include "partials/pagination.html" %} #} {# Expects: page (int), total (int), page_size (int), base_url (str), hx_target (str) #} {% set total_pages = ((total - 1) // page_size) + 1 if total > 0 else 1 %} {% if total > page_size %} {% endif %}