Skip to content

Commit

Permalink
Add "Contribute" page to nav (#177)
Browse files Browse the repository at this point in the history
Adds the new 'Contribute' page from #148 to the main nav.

Also adds a temporary CSS modifier to stop the nav from being justified
now that there's 4 items (which looks odd).

## Screenshots

### Before 

<img width="988" alt="Before - with no Contribute item"
src="https://github.com/user-attachments/assets/f5fbb3fc-3882-4736-a7e6-0c068b85745c">

### After

<img width="987" alt="Before - with Contribute item"
src="https://github.com/user-attachments/assets/c85cfc0c-7f9f-42e6-8a2e-e490797590eb">
  • Loading branch information
frankieroberto authored Dec 10, 2024
1 parent 6262aae commit 9e79c52
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/sass/components/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This modifier overrides the default behaviour which is to
// justify the items in the nav when there are 4 or more.
.app-header--left-aligned .nhsuk-header__navigation-list {
justify-content: initial;
}
1 change: 1 addition & 0 deletions app/assets/sass/docs.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// NHS.UK frontend library
@import 'node_modules/nhsuk-frontend/packages/nhsuk';
@import 'components/header';

// ==========================================================================
// PROTOTYPE SPECIFIC STYLES
Expand Down
5 changes: 5 additions & 0 deletions app/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

{% block header %}
{{ header({
classes: "app-header--left-aligned",
homeHref: "/",
ariaLabel: "NHS Prototype Kit homepage",
service: {
Expand All @@ -24,6 +25,10 @@
label: "Guides",
url: "/how-tos"
},
{
label: "Contribute",
url: "/contribute"
},
{
label: "Support",
url: "/support"
Expand Down

0 comments on commit 9e79c52

Please sign in to comment.