Some services might have only one service link in the service navigation. In this scenario it does not make sense to collapse navigation into a dropdown in the mobile variant. It was raised as an issue by a service and we agreed to implement it.
Before ("Menu" toggle always appears)
After ("Menu" toggle no longer appears when there is only one service link)
The design for wider screens and the design for the 2+ nav link scenario should remain unchanged.
How to review
Ignore dist because it's all build files.
You can preview the current version of the header by cloning the repo and opening /dist/preview.html in a browser. To change the number of items in the nav, you can modify the navigationItems in src/preview.njk and run npm run build-all before your change is reflected in /dist/preview.html
What
This tweaks the way the nav script works so that dropdown behaviour does not initialise unless at least 2 navigational links are present. Ticket: https://govukverify.atlassian.net/browse/OLH-1043
Why
Some services might have only one service link in the service navigation. In this scenario it does not make sense to collapse navigation into a dropdown in the mobile variant. It was raised as an issue by a service and we agreed to implement it.
Before ("Menu" toggle always appears)
After ("Menu" toggle no longer appears when there is only one service link)
The design for wider screens and the design for the 2+ nav link scenario should remain unchanged.
How to review
Ignore
dist
because it's all build files.You can preview the current version of the header by cloning the repo and opening
/dist/preview.html
in a browser. To change the number of items in the nav, you can modify thenavigationItems
insrc/preview.njk
and runnpm run build-all
before your change is reflected in/dist/preview.html