Skip to content

Commit

Permalink
Add main nav (#153)
Browse files Browse the repository at this point in the history
This adds a "primary nav" with 3 items:

* Get started
* Guides
* Support

"Contribute" could be added when #148 is merged.

I’ve not included "Page templates" as that page feels less valuable
longer-term (eg if the NHS website templates get moved to a plugin or
something).

Adding the primary nav possibly means that some of the breadcrumbs could
be removed or shortened (eg the "Home" breadcrumb link on Support feels
a bit odd now?), but the Service Manual website has both, so maybe it’s
fine?

There’s no "current section" indicator for now, but we can adopt that
when it gets added to the header in the next major release of NHS
frontend (hopefully).

Part of #93
  • Loading branch information
frankieroberto authored Nov 27, 2024
1 parent a963d46 commit 8f11d8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@
///////////////////////////////////////////
// Add your custom CSS/Sass styles below...
///////////////////////////////////////////

// This is a temporary fix to remove the 'Home' link in
// the primary navigation which is added Header primary nav.
// Should be able to remove this after the next NHS Frontend update.
.nhsuk-header__navigation-item--home {
display: none;
}
17 changes: 16 additions & 1 deletion app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,22 @@
ariaLabel: "NHS Prototype Kit homepage",
service: {
name: serviceName
}
},
showNav: "true",
primaryLinks: [
{
label: "Get started",
url: "/install"
},
{
label: "Guides",
url: "/how-tos"
},
{
label: "Support",
url: "/support"
}
]
}) }}
{% endblock %}

Expand Down

0 comments on commit 8f11d8c

Please sign in to comment.