Fix navbar bugs when navbar is collapsed

Navbar now behaves better at medium and small screen sizes - it no longer wraps to multiple lines. As soon as the screen width is too narrow to fit everything, the navbar switches to the collapsed/mobile view.

Also changed the Next and Previous chapter links to use icons instead of text links to preserve some horizontal space.