From 6b738f3d08e87f91388468a38cd0153397247fb2 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 17 Jul 2024 14:04:16 +0100 Subject: [PATCH 01/14] Remove hardcoded Home link from navigation Removes the link to `"/"` labelled `"Home"`, which is currently hardcoded, and only shows up within the navigation menu on mobile screen widths. This link may not be appropriate for all services, which might not have a homepage, or might use a different path for it. It is also unclear whether having a homepage link is always needed in the navigation if the NHS logo also goes to the homepage. --- packages/components/header/template.njk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/components/header/template.njk b/packages/components/header/template.njk index 9839bccbf..880de7cc6 100644 --- a/packages/components/header/template.njk +++ b/packages/components/header/template.njk @@ -82,11 +82,6 @@ {%- endfor %} -
  • - - Home - -
  • - - + + -{% endif -%} - {# close nhsuk-header__container #} +{%- endif %} + -{% if showNav == "true" and params.primaryLinks %} +{%- if params.primaryLinks and params.primaryLinks.length > 0 %}
    -{% endif -%} +{%- endif %} From 56e96e082ce154a7bda95b8ed46d6acab1adc323 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Tue, 20 Aug 2024 19:15:07 +0100 Subject: [PATCH 08/14] Allow transactional service name in header alongside navigation and search --- packages/components/header/template.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/header/template.njk b/packages/components/header/template.njk index 52b0c4106..60e3c3ba1 100644 --- a/packages/components/header/template.njk +++ b/packages/components/header/template.njk @@ -41,7 +41,7 @@ {%- endif %} -{%- if params.transactionalService and not params.primaryLinks and not params.search %} +{%- if params.transactionalService %} From 46b5cd3f941b66e0c1e533037d91fd57b3800d25 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Thu, 22 Aug 2024 22:06:59 +0100 Subject: [PATCH 09/14] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a501cabc3..5274f29a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ :wrench: **Fixes** +- Remove the boolean `showNav`, `showSearch` and `transactional` options from the header component. Respective parts of the header are now shown if values for `primaryLinks`, `search` or `transactionalService` options are provided. Additionally, the `searchAction` option is renamed `search.action` and the `searchInputName` option is renamed `search.name`. Finally, the label, button and placeholder text for the search input can be updated using the new `search.visuallyHiddenLabel`, `search.visuallyHiddenButton` and `search.placeholder` options. ([PR 996](https://github.com/nhsuk/nhsuk-frontend/pull/996)) - Fix navigation items not flowing into the overflow drop-down menu on desktop ([PR 1062](https://github.com/nhsuk/nhsuk-frontend/pull/1062)) - Update header styles so that `.nhsuk-header__search-no-nav` class is no longer needed when header contains a search field but no navigation ([PR 1046](https://github.com/nhsuk/nhsuk-frontend/pull/1046)) - Update navigation list item padding to vertically align navigation items with width container ([PR 1033](https://github.com/nhsuk/nhsuk-frontend/pull/1033)) From fa05a4758174dcf4c2ba9a792083370d1c84cb39 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Thu, 24 Oct 2024 11:39:03 +0100 Subject: [PATCH 10/14] Ensure logo in header appears for print media --- packages/components/header/_header.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/components/header/_header.scss b/packages/components/header/_header.scss index 05eaead57..cb3289b0b 100644 --- a/packages/components/header/_header.scss +++ b/packages/components/header/_header.scss @@ -74,6 +74,8 @@ } @include mq($media-type: print) { + color: $color_nhsuk-black; + &:after { content: ""; } From 8bd0017addfe28713969569a0b493946d57ecaca Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Thu, 24 Oct 2024 11:32:40 +0100 Subject: [PATCH 11/14] Refactor header styles --- packages/components/header/README.md | 4 +- .../header/_header-organisation.scss | 96 +--- .../components/header/_header-service.scss | 51 -- .../header/_header-transactional.scss | 58 --- packages/components/header/_header-white.scss | 124 ++--- packages/components/header/_header.scss | 478 +++++------------- packages/components/header/template.njk | 4 +- packages/core/styles/_icons.scss | 20 +- packages/core/tools/_links.scss | 28 + packages/core/tools/_mixins.scss | 15 - packages/nhsuk.scss | 2 - 11 files changed, 226 insertions(+), 654 deletions(-) delete mode 100644 packages/components/header/_header-service.scss delete mode 100644 packages/components/header/_header-transactional.scss diff --git a/packages/components/header/README.md b/packages/components/header/README.md index bfbf11670..f3aff839f 100644 --- a/packages/components/header/README.md +++ b/packages/components/header/README.md @@ -301,7 +301,7 @@ compiled JavaScript for all components `nhsuk.min.js` or the individual componen ```HTML
  • -
  • - - Home - -
  • -
  • - - Home - -
  • -
  • - - Home - -
  • -
  • - - Home - -