Skip to content

Paginate galleries by year

Sivert Olstad requested to merge paginate-galleries-by-year into main

Galleries are now paginated by year. This significantly improves the UX for finding galleries.

Should each page be sorted starting in January, or starting in December? If you look at galleries from long ago, it makes sense to start in January. However, if you want to see the most recent galleries, it makes the most sense to start in December. To accommodate both I've chosen to sort the current year's galleries starting in December, and all other pages sorted starting in January.

This PR also makes the list display only one picture from each gallery, and display two galleries side-by-side, if there's space. Showing 5 pictures is an unnecessary relic from the old website.

I initially started using HTMX to implement this, but wanted to reload more and more of the page until I ended up switching to a simple onchange="location.href=`?year=${this.value} on the select. It feels slightly wrong to do that... but it works really well and is crazy simple.

Edited by Sivert Olstad

Merge request reports