Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate new header and footer style #881

Merged
merged 45 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b731336
footer done
roshaanbajwa Jul 24, 2023
c26ffcd
added new header examples
roshaanbajwa Jul 31, 2023
4bcfddc
updated readmes
roshaanbajwa Jul 31, 2023
ed98ccd
fixed naming inconsistencies
roshaanbajwa Jul 31, 2023
4dc2aed
added variations for new footer
roshaanbajwa Aug 2, 2023
6caf834
format read mes
roshaanbajwa Aug 2, 2023
f2c7fa4
added policy link logic to footer
roshaanbajwa Aug 2, 2023
ec96f0a
remove old header and footer and update links
roshaanbajwa Aug 8, 2023
3fc8de0
remove old header components
roshaanbajwa Aug 8, 2023
dc99cce
resolve linting errors
roshaanbajwa Aug 8, 2023
e716a7b
footer on about change fix and added some colours
roshaanbajwa Aug 14, 2023
d112ad3
remove beta code and incorprate into nhsuk styling
roshaanbajwa Aug 21, 2023
f4e8ae8
Merge branch 'main' into new-header-footer
roshaanbajwa Aug 24, 2023
9f8099e
added header class
roshaanbajwa Aug 30, 2023
e86401a
test file
roshaanbajwa Aug 30, 2023
2dfc981
footer variants, split header css
roshaanbajwa Sep 5, 2023
c96f0a9
check header exists
pflynny Sep 7, 2023
67f8f62
added a check to see required elements are present
pflynny Sep 13, 2023
ce3c5b8
removed mixins for unused buttons
pflynny Sep 13, 2023
2ff1e19
clean up styles and remove any cms custom code
pflynny Sep 13, 2023
9d38508
refactor css
roshaanbajwa Sep 15, 2023
cdb7935
removed float on elements and used fle
pflynny Sep 15, 2023
295b027
update header init and comments
pflynny Sep 18, 2023
3e995f6
updated container name to remove relationship to content
pflynny Sep 25, 2023
f8c04e9
removed NHS Digital reference
pflynny Sep 25, 2023
d22defe
update template for new naming convention
pflynny Sep 25, 2023
eb4aafe
removed generic js-show class for bem modifier
pflynny Sep 27, 2023
2345f86
fixing consistency in examples
pflynny Sep 27, 2023
30ae453
Merge branch 'main' into new-header-footer
pflynny Sep 27, 2023
eaf1c50
ran prettier
pflynny Sep 27, 2023
3c27126
updated backstop images
roshaanbajwa Sep 27, 2023
fd5590c
revert puppeeter version
roshaanbajwa Sep 27, 2023
db5e8b9
revert puppeteer version
roshaanbajwa Sep 27, 2023
53074ac
ignore lint errors in cache
roshaanbajwa Sep 27, 2023
a48644e
fix bem syntax
roshaanbajwa Sep 27, 2023
5dbe281
removed the bottom border from the footer and examples
pflynny Sep 28, 2023
79b5721
cleaned up footer
pflynny Sep 28, 2023
c2cfaa6
remove bottom border from example pages
roshaanbajwa Sep 28, 2023
3b00341
update backstop test
roshaanbajwa Sep 28, 2023
4ac3368
remove unused id
roshaanbajwa Sep 28, 2023
b84b1c5
lint
roshaanbajwa Sep 28, 2023
963ca9c
unused ids
roshaanbajwa Sep 28, 2023
5c41059
changelog and puppeteer
roshaanbajwa Sep 28, 2023
6cd9512
prettier
roshaanbajwa Sep 28, 2023
4a7a109
changelog
roshaanbajwa Sep 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/*
dist/*
.cache/*
tests/backstop/*
.github/*
coverage/*
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,71 @@
# NHS.UK frontend Changelog

## 8.0.0 - 28 September 2023

:boom: **Breaking changes**

- Updated header and footer to use the new styles and functionality to match the live nhs.uk site ([PR 881](https://github.com/nhsuk/nhsuk-frontend/pull/881))

As well as changes to the styles, this added an example of a footer with it's links in columns, and removed the redundant example of "Header transactional". This also fixes the issue ([Issue 805](https://github.com/nhsuk/nhsuk-frontend/issues/805)).

In the header variants, the menu toggle button has been replaced with a dropdown menu, that becomes visible when the screen width is below 768px (tablet width). The search toggle has been removed, and instead the search input automatically adjusts according to the screen width.

Instead of having this:

```
// menu toggle
<button class="nhsuk-header__menu-toggle" id="toggle-menu" aria-controls="header-navigation" aria-expanded="false">Menu</button
// close menu button
<button class="nhsuk-header__navigation-close" id="close-menu">
<svg class="nhsuk-icon nhsuk-icon__close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false" width="27" height="27">
</svg>
<span class="nhsuk-u-visually-hidden">Close menu</span>
</button>
```

You will now only need this:

```
<button class="nhsuk-header__navigation-link nhsuk-header__menu-toggle nhsuk-header__menu-toggle--visible" aria-expanded="false">
<span class="nhsuk-u-visually-hidden">Browse</span>
More
<svg class="nhsuk-icon nhsuk-icon__chevron-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M15.5 12a1 1 0 0 1-.29.71l-5 5a1 1 0 0 1-1.42-1.42l4.3-4.29-4.3-4.29a1 1 0 0 1 1.42-1.42l5 5a1 1 0 0 1 .29.71z"></path></svg>
</button>
<ul class="nhsuk-header__drop-down nhsuk-header__drop-down--hidden">
// navigation items in the drop down menu
</ul>
```

:wrench: **Fixes**

- Fix vertical alignment of primary card icon
- Change NHS Digital wording to NHS England
- Remove dead link in "Action link" example

:new: **New features**

- Added suffix and prefix examples to text input component ([PR 884](https://github.com/nhsuk/nhsuk-frontend/pull/884))

We added 4 new text input examples that allow users to add suffixes and prefixed to the input form. This was done by adding "suffix" and "prefix" as macro options.

```
input({
"label": {
"text": "What is the cost per item, in pounds?"
},
"prefix": "£",
"suffix": "per item",
"errorMessage": {
"text": "Enter a cost per item, in pounds"
}
})
```

## 7.1.0 - 21 August 2023

Expand Down
2 changes: 0 additions & 2 deletions app/_templates/page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
{% from 'components/card/macro.njk' import card %}
{% from 'components/contents-list/macro.njk' import contentsList %}
{% from 'components/details/macro.njk' import details %}
{% from 'components/header/macro.njk' import header %}
{% from 'components/hero/macro.njk' import hero %}
{% from 'components/footer/macro.njk' import footer %}
{% from 'components/do-dont-list/macro.njk' import list %}
{% from 'components/images/macro.njk' import image %}
{% from 'components/inset-text/macro.njk' import insetText %}
Expand Down
2 changes: 1 addition & 1 deletion app/components/all.njk
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@
"label": "Profile editor login"
}
],
"secondaryLinks": [
"metaLinks": [
{
"URL": "https://www.nhs.uk/about-us/sitemap/",
"label": "Sitemap"
Expand Down
103 changes: 103 additions & 0 deletions app/components/footer/footer-in-columns.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Footer (columns)' %}
{% from 'components/footer/macro.njk' import footer %}
{% extends 'layout.njk' %}

{% block body %}

{{ footer({
"links": [
{
"URL": "#",
"label": "Home"
},
{
"URL": "#",
"label": "Health A to Z"
},
{
"URL": "#",
"label": "Live Well"
},
{
"URL": "#",
"label": "Mental health"
},
{
"URL": "#",
"label": "Care and support"
},
{
"URL": "#",
"label": "Accessibility statement"
},
{
"URL": "#",
"label": "Pregnancy"
},
{
"URL": "#",
"label": "NHS services"
},
{
"URL": "#",
"label": "Coronavirus (COVID-19)"
}
],
"linksColumn2": [
{
"URL": "#",
"label": "NHS App"
},
{
"URL": "#",
"label": "Find my NHS number"
},
{
"URL": "#",
"label": "Your health records"
},
{
"URL": "#",
"label": "About the NHS"
},
{
"URL": "#",
"label": "Healthcare abroad"
}
],
"linksColumn3": [
{
"URL": "#",
"label": "Contact us"
},
{
"URL": "#",
"label": "Other NHS websites"
},
{
"URL": "#",
"label": "Profile editor login"
}
],
"metaLinks": [
{
"URL": "#",
"label": "About us"
},
{
"URL": "#",
"label": "Accessibility statement"
},
{
"URL": "#",
"label": "Our policies"
},
{
"URL": "#",
"label": "Cookies"
}
]
})}}

{% endblock %}
2 changes: 1 addition & 1 deletion app/components/footer/index.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Footer' %}
{% set title = 'Footer (default)' %}
{% from 'components/footer/macro.njk' import footer %}
{% extends 'layout.njk' %}

Expand Down
2 changes: 1 addition & 1 deletion app/components/header/header-logo.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Header' %}
{% set title = 'Header with logo only' %}
{% from 'components/header/macro.njk' import header %}
{% extends 'layout.njk' %}

Expand Down
8 changes: 6 additions & 2 deletions app/components/header/header-service-name-with-nav.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Header transactional with service name' %}
{% set title = 'Header with a service name, search and navigation' %}
{% from 'components/header/macro.njk' import header %}
{% extends 'layout.njk' %}

Expand All @@ -14,7 +14,7 @@
"primaryLinks": [
{
"url" : "#",
"label" : "NHS service standard"
"label" : "Standards and technology"
},
{
'url' : '#',
Expand All @@ -28,6 +28,10 @@
'url' : '#',
'label' : 'Accessibility'
},
{
'url' : '#',
'label' : 'Design principles'
},
{
'url' : '#',
'label' : 'Community and contribution'
Expand Down
2 changes: 1 addition & 1 deletion app/components/header/header-service-name.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Header transactional with service name' %}
{% set title = 'Header with service name' %}
{% from 'components/header/macro.njk' import header %}
{% extends 'layout.njk' %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{{ header({
"transactionalService": {
"name": "Register with a GP"
"name": "Find your NHS number"
},
"showNav": "false",
"showSearch": "false"
Expand Down
15 changes: 0 additions & 15 deletions app/components/header/header-transactional.njk

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/header/index.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Header' %}
{% set title = 'Header (default)' %}
{% from 'components/header/macro.njk' import header %}
{% extends 'layout.njk' %}

Expand Down
4 changes: 2 additions & 2 deletions app/pages/about.njk
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<p>Please see our <a href="https://github.com/nhsuk/nhsuk-frontend/blob/master/CONTRIBUTING.md">contributing guidelines</a> on how to set up the project locally and contribute changes to NHS.UK frontend.</p>

<h2>Get in touch</h2>
<p>NHS.UK frontend is actively maintained by a team at NHS England, you can <a href="mailto:[email protected]">email us</a> or get in touch on the <a href="https://join.slack.com/t/nhs-service-manual/shared_invite/enQtNTIyOTEyNjU3NDkyLTk4NDQ3YzkwYzk1Njk5YjAxYTI5YTVkZmUxMGQ0ZjA3NjMyM2ZkNjBlMWMxODVjZjYzNzg1ZmU4MWY1NmE2YzE">NHS digital service manual Slack workspace</a>.

<p>NHS.UK frontend is actively maintained by a team at NHS England, you can <a href="mailto:[email protected]">email us</a> or get in touch on the <a href="https://join.slack.com/t/nhs-service-manual/shared_invite/enQtNTIyOTEyNjU3NDkyLTk4NDQ3YzkwYzk1Njk5YjAxYTI5YTVkZmUxMGQ0ZjA3NjMyM2ZkNjBlMWMxODVjZjYzNzg1ZmU4MWY1NmE2YzE">NHS digital service manual Slack workspace</a>.</p>
</div>

{% endblock %}
35 changes: 32 additions & 3 deletions app/pages/examples.njk
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
<li><a href="../components/fieldset/index.html">Fieldset</a></li>
<li><a href="../components/fieldset/page-heading.html">Fieldset as page heading</a></li>
<li><a href="../components/fieldset/with-inputs.html">Fieldset with inputs</a></li>
<li><a href="../components/footer/index.html">Footer</a></li>
<li><a href="../components/header/index.html">Header</a></li>
<li><a href="../components/footer/index.html">Footer (default)</a></li>
<li><a href="../components/footer/footer-in-columns.html">Footer (columns)</a></li>
<li><a href="../components/header/index.html">Header (default)</a></li>
<li><a href="../components/header/header-navigation.html">Header with navigation</a></li>
<li><a href="../components/header/header-search.html">Header with search</a></li>
<li><a href="../components/header/header-logo.html">Header with logo only</a></li>
<li><a href="../components/header/header-service-name.html">Header with a service name</a></li>
<li><a href="../components/header/header-service-name-with-nav.html">Header with a service name, search and navigation</a></li>
<li><a href="../components/header/header-transactional.html">Header transactional</a></li>
<li><a href="../components/header/header-transactional-service-name.html">Header transactional with service name</a></li>
<li><a href="../components/header/header-org.html">Header organisational</a></li>
<li><a href="../components/header/header-org-white.html">Header organisational with white header</a></li>
Expand Down Expand Up @@ -128,3 +128,32 @@
<li><a href="../components/warning-callout/custom-heading.html">Warning callout with custom heading</a></li>
</ul>
{% endblock %}

{% block footer %}

{{ footer({
"links": [
{
"URL": baseUrl,
"label": "NHS.UK frontend"
},
{
"URL": baseUrl + "pages/install.html",
"label": "Install"
},
{
"URL": baseUrl + "pages/examples.html",
"label": "Examples"
},
{
"URL": baseUrl + "pages/about.html",
"label": "About"
},
{
"URL": "https://github.com/nhsuk/nhsuk-frontend",
"label": "GitHub"
}
]
})}}

{% endblock %}
Loading
Loading