Skip to content

Commit

Permalink
Merge branch 'main' into print-hide-header-nav
Browse files Browse the repository at this point in the history
  • Loading branch information
anandamaryon1 authored Sep 17, 2024
2 parents b571c2f + 4d942bb commit e781014
Show file tree
Hide file tree
Showing 191 changed files with 499 additions and 393 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
- Fix Sass deprecation on `mix` function (passing a number without unit) ([PR 995](https://github.com/nhsuk/nhsuk-frontend/pull/995))
- Add nhsukAttributes macro, copied from GOV.UK ([PR 998](https://github.com/nhsuk/nhsuk-frontend/pull/998))
- Hide header's navigation links on print ([PR 1001](https://github.com/nhsuk/nhsuk-frontend/pull/1001))
- Fix missing classes option for summary list rows ([PR 1007](https://github.com/nhsuk/nhsuk-frontend/pull/1007))
- Add support for inline conditions on summary list rows ([PR 1008](https://github.com/nhsuk/nhsuk-frontend/pull/1008))
- Change "Contact us" in the footer link examples to "Give us feedback" ([PR 972](https://github.com/nhsuk/nhsuk-frontend/pull/972))
- Adjusted default spacing of back link component ([PR 964](https://github.com/nhsuk/nhsuk-frontend/pull/964))
- Reduce main wrapper padding on mobile ([PR 1003](https://github.com/nhsuk/nhsuk-frontend/pull/1003))
- Fix image encoding issue introduced in Gulp v5.0 ([PR 1013](https://github.com/nhsuk/nhsuk-frontend/pull/1013))

## 8.3.0 - 24 July 2024

Expand Down
3 changes: 1 addition & 2 deletions app/_templates/page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@

{% block body %}

{% block breadcrumb %}{% endblock %}

<div class="nhsuk-width-container">
{% block beforeContent %}{% endblock %}
<main class="nhsuk-main-wrapper" id="maincontent">

<div class="nhsuk-grid-row">
Expand Down
2 changes: 1 addition & 1 deletion app/components/all.njk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}}
{% endblock %}

{% block breadcrumb %}
{% block beforeContent %}
{{ breadcrumb({
items: [
{
Expand Down
2 changes: 1 addition & 1 deletion app/components/back-link/button.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
</main>
</div>

{% endblock %}
{% endblock %}
8 changes: 6 additions & 2 deletions app/components/back-link/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">
{{ backLink({
"href": "#",
"text": "Go back"
href: "#",
text: "Go back"
}) }}
</div>
</div>

</main>
</div>

{% endblock %}

{% block heading %}
<h1 class="govuk-heading-l">Page title</h1>
{% endblock %}
58 changes: 36 additions & 22 deletions app/components/breadcrumb/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,41 @@

{% block body %}

{{ breadcrumb({
items: [
{
href: "#",
text: "Level one",
attributes: {lang: "en"}
},
{
href: "#",
text: "Level two"
},
{
href: "#",
text: "Level three",
attributes: {lang: "en"}
}
],
href: "#",
text: "Level four",
classes: "example-class-one example-class-two",
attributes: {lang: "en"}
}) }}
<div class="nhsuk-width-container">
<main class="nhsuk-main-wrapper" id="maincontent">

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">
{{ breadcrumb({
items: [
{
href: "#",
text: "Level one",
attributes: {lang: "en"}
},
{
href: "#",
text: "Level two"
},
{
href: "#",
text: "Level three",
attributes: {lang: "en"}
}
],
href: "#",
text: "Level four",
classes: "example-class-one example-class-two",
attributes: {lang: "en"}
}) }}
</div>
</div>

</main>
</div>

{% endblock %}

{% block heading %}
<h1 class="govuk-heading-l">Page title</h1>
{% endblock %}
16 changes: 1 addition & 15 deletions app/components/date-input/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,7 @@
},
"hint": {
"text": "For example, 31 3 1980"
},
"items": [
{
"name": "day",
"classes": "nhsuk-input--width-2"
},
{
"name": "month",
"classes": "nhsuk-input--width-2"
},
{
"name": "year",
"classes": "nhsuk-input--width-4"
}
]
}
}) }}
</div>
</div>
Expand Down
45 changes: 45 additions & 0 deletions app/components/date-input/month-and-year-with-values.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Date input' %}
{% from 'components/date-input/macro.njk' import dateInput %}
{% extends 'layout.njk' %}

{% block body %}

<div class="nhsuk-width-container">
<main class="nhsuk-main-wrapper" id="maincontent">

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">
{{ dateInput({
"id": "dob",
"namePrefix": "dob",
"fieldset": {
"legend": {
"text": "When did you start your job?"
}
},
"hint": {
"text": "For example, 11 2023"
},
values: {
month: "8",
year: "2024"
},
"items": [
{
"name": "month",
"classes": "nhsuk-input--width-2"
},
{
"name": "year",
"classes": "nhsuk-input--width-4"
}
]
}) }}
</div>
</div>

</main>
</div>

{% endblock %}
36 changes: 36 additions & 0 deletions app/components/date-input/with-values.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% set html_style = 'background-color: #f0f4f5;' %}
{% set title = 'Date input' %}
{% from 'components/date-input/macro.njk' import dateInput %}
{% extends 'layout.njk' %}

{% block body %}

<div class="nhsuk-width-container">
<main class="nhsuk-main-wrapper" id="maincontent">

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">
{{ dateInput({
"id": "dob",
"namePrefix": "dob",
"fieldset": {
"legend": {
"text": "What is your date of birth?"
}
},
"hint": {
"text": "For example, 31 3 1980"
},
values: {
day: "5",
month: "8",
year: "2024"
}
}) }}
</div>
</div>

</main>
</div>

{% endblock %}
2 changes: 1 addition & 1 deletion app/pages/about.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ super() }}
{% endblock %}

{% block breadcrumb %}
{% block beforeContent %}
{{ breadcrumb({
items: [
{
Expand Down
4 changes: 3 additions & 1 deletion app/pages/examples.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ super() }}
{% endblock %}

{% block breadcrumb %}
{% block beforeContent %}
{{ breadcrumb({
items: [
{
Expand Down Expand Up @@ -60,6 +60,8 @@
<li><a href="../components/date-input/autocomplete.html">Date input with autocomplete attribute</a></li>
<li><a href="../components/date-input/error.html">Date input with error</a></li>
<li><a href="../components/date-input/multiple-errors.html">Date input with multiple errors</a></li>
<li><a href="../components/date-input/with-values.html">Date input with values</a></li>
<li><a href="../components/date-input/month-and-year-with-values.html">Date (month and year) input with values</a></li>
<li><a href="../components/details/index.html">Details</a></li>
<li><a href="../components/do-dont-list/index.html">Do and Don't list</a></li>
<li><a href="../components/error-message/index.html">Error message</a></li>
Expand Down
2 changes: 1 addition & 1 deletion app/pages/install.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ super() }}
{% endblock %}

{% block breadcrumb %}
{% block beforeContent %}
{{ breadcrumb({
items: [
{
Expand Down
2 changes: 1 addition & 1 deletion app/styles/lists.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{ super() }}
{% endblock %}

{% block breadcrumb %}
{% block beforeContent %}
{{ breadcrumb({
items: [
{
Expand Down
7 changes: 5 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function versionJS() {
* Copy assets such as icons and images into the distribution
*/
function assets() {
return gulp.src('packages/assets/**').pipe(gulp.dest('dist/assets/'))
return gulp.src('packages/assets/**', { encoding: false }).pipe(gulp.dest('dist/assets/'))
}

/**
Expand All @@ -145,7 +145,10 @@ function cssFolder() {

function createZip() {
return gulp
.src(['dist/css/*.min.css', 'dist/js/*.min.js', 'dist/assets/**', '!dist/js/nhsuk.min.js'], { base: 'dist' })
.src(['dist/css/*.min.css', 'dist/js/*.min.js', 'dist/assets/**', '!dist/js/nhsuk.min.js'], {
base: 'dist',
encoding: false
})
.pipe(zip(`nhsuk-frontend-${version}.zip`))
.pipe(gulp.dest('dist'))
}
Expand Down
Loading

0 comments on commit e781014

Please sign in to comment.