- commit
- 4d0d13b269dba60621122778f800fdfebfdf9849
- Author:
- Dan Ott <danott@users.noreply.github.com>
- Date:
- Thu Jan 18 08:22:22 2024 -0500
- Reply:
- GitHub
- Home:
- allow-empty
- Next:
- 7b43b4bfcab94cbb2576783ba7be592b45dc148d
- Prev:
- 66a88ef927379c3a98c8b697a753480d23f60f71
Add naive pagination to post pages
I woke up thinking about blog idioms. Some folks like to scroll through a collection. Other folks like to click through that same collection.
Scrolling was already solved. This commit solves for clickable collection perusal.
“Sorting” is an interesting problem space. What does “previous” mean? “Next?” It always depends on how the problem is being approached.
Previous could mean two things:
- The commit that precedes this one in the git log. What git would refer to as the parent.
- The commit that precedes this one when reading top to bottom, left to right, like words on a page.
I went with the former as my interpretation. This also brings up other musings about sort order.
There is not a guarantee that a commit’s parent has a commit time (or
author time) that represents an earlier point in chronological history.
I haven’t had to Commit.all.sort_by(&:anything)
yet. But I can imagine
a world where I’d have to if I really push this idea to it’s outer
limits with multiple collaborators committing on different schedules
from different time zones.
Neat!