Fix problems with navigation menu toggling and small screen menu

This fixes the following issues:
- menu vanishing when returning to large screen after toggling menu on small screen
- submenus not being visible on small screen menu
- small screen menu not being visible if JavaScript is disabled