Pagination

Page links for long lists.

Helper
pagination(
  page:,
  pages:,
  url:,              # ->(page) { url }
  label: "Paginação"
)

url is a lambda from a page number to its URL, so it works with any pagination source (pagy, limit/offset, your own). It shows the first and last pages and two pages around the current one; with a single page it renders nothing.