Skip to content

Commit 8f11d8c

Browse files
Add main nav (#153)
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
1 parent a963d46 commit 8f11d8c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

app/assets/sass/main.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@
77
///////////////////////////////////////////
88
// Add your custom CSS/Sass styles below...
99
///////////////////////////////////////////
10+
11+
// This is a temporary fix to remove the 'Home' link in
12+
// the primary navigation which is added Header primary nav.
13+
// Should be able to remove this after the next NHS Frontend update.
14+
.nhsuk-header__navigation-item--home {
15+
display: none;
16+
}

app/views/layout.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,22 @@
1313
ariaLabel: "NHS Prototype Kit homepage",
1414
service: {
1515
name: serviceName
16-
}
16+
},
17+
showNav: "true",
18+
primaryLinks: [
19+
{
20+
label: "Get started",
21+
url: "/install"
22+
},
23+
{
24+
label: "Guides",
25+
url: "/how-tos"
26+
},
27+
{
28+
label: "Support",
29+
url: "/support"
30+
}
31+
]
1732
}) }}
1833
{% endblock %}
1934

0 commit comments

Comments
 (0)