Fix pagination layout when viewing on thin screens

Fixes #3