Auto collapsing pagination on narrow devices.

When screen is too narrow, it'll hide most of the pagination pages but keeping everything usable.