From d68c25c8fa6130ce648349e324081a6ab141eb8d Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 6 Nov 2023 10:20:32 +0000 Subject: [PATCH 1/6] use node-version-file in github actions --- .github/workflows/lighthouse-ci.yml | 5 +- .github/workflows/macro-and-script-tests.yml | 5 +- .github/workflows/npm-bundle.yml | 5 +- .github/workflows/release.yml | 5 +- .github/workflows/visual-regression-tests.yml | 5 +- src/layout/_template.njk | 58 +++++++++---------- 6 files changed, 34 insertions(+), 49 deletions(-) diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index c2a4481ba5..9fd17a1ba8 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -12,13 +12,10 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Build pages diff --git a/.github/workflows/macro-and-script-tests.yml b/.github/workflows/macro-and-script-tests.yml index 5f20c4c1fb..0220d89974 100644 --- a/.github/workflows/macro-and-script-tests.yml +++ b/.github/workflows/macro-and-script-tests.yml @@ -12,13 +12,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Run macro and script tests diff --git a/.github/workflows/npm-bundle.yml b/.github/workflows/npm-bundle.yml index 2dc0b4faa7..12631cbc70 100644 --- a/.github/workflows/npm-bundle.yml +++ b/.github/workflows/npm-bundle.yml @@ -10,9 +10,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Use Node.js uses: actions/checkout@v3 with: @@ -20,7 +17,7 @@ jobs: - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" registry-url: https://registry.npmjs.org/ - run: yarn install - run: git config --global user.name "${{ github.actor }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a50c3eb18..c8db6937f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,13 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Build templates diff --git a/.github/workflows/visual-regression-tests.yml b/.github/workflows/visual-regression-tests.yml index be5864b1e7..3d2cf558cb 100644 --- a/.github/workflows/visual-regression-tests.yml +++ b/.github/workflows/visual-regression-tests.yml @@ -15,13 +15,10 @@ jobs: with: lfs: true url: https://github.com/ONSdigital/design-system.git - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Install Docker diff --git a/src/layout/_template.njk b/src/layout/_template.njk index b5ca6fda6b..7e429f7292 100644 --- a/src/layout/_template.njk +++ b/src/layout/_template.njk @@ -138,29 +138,29 @@ {% endblock %} {% block header %} {{ - onsHeader({ - "wide": pageConfig.wide, - "fullWidth": pageConfig.fullWidth, - "language": pageConfig.header.language, - "button": pageConfig.header.signoutButton, - "toggleNavigationButton": pageConfig.header.toggleNavigationButton, - "navigation": pageConfig.header.navigation, - "siteSearchAutosuggest": pageConfig.header.siteSearchAutosuggest, - "browserBanner": pageConfig.header.browserBanner, - "phase": pageConfig.header.phase, - "assetsURL": assetsURL, - "serviceLinks": pageConfig.header.serviceLinks, - "variants": pageConfig.header.variants, - "classes": pageConfig.header.classes, - "mastheadLogo": pageConfig.header.mastheadLogo, - "mastheadLogoUrl": pageConfig.header.mastheadLogoUrl, - "titleUrl": pageConfig.header.titleUrl, - "title": pageConfig.header.title | default(pageConfig.title), - "description": pageConfig.header.description, - "titleAsH1": pageConfig.header.titleAsH1, - "titleLogo": pageConfig.header.titleLogo - }) - }} + onsHeader({ + "wide": pageConfig.wide, + "fullWidth": pageConfig.fullWidth, + "language": pageConfig.header.language, + "button": pageConfig.header.signoutButton, + "toggleNavigationButton": pageConfig.header.toggleNavigationButton, + "navigation": pageConfig.header.navigation, + "siteSearchAutosuggest": pageConfig.header.siteSearchAutosuggest, + "browserBanner": pageConfig.header.browserBanner, + "phase": pageConfig.header.phase, + "assetsURL": assetsURL, + "serviceLinks": pageConfig.header.serviceLinks, + "variants": pageConfig.header.variants, + "classes": pageConfig.header.classes, + "mastheadLogo": pageConfig.header.mastheadLogo, + "mastheadLogoUrl": pageConfig.header.mastheadLogoUrl, + "titleUrl": pageConfig.header.titleUrl, + "title": pageConfig.header.title | default(pageConfig.title), + "description": pageConfig.header.description, + "titleAsH1": pageConfig.header.titleAsH1, + "titleLogo": pageConfig.header.titleLogo + }) + }} {% endblock %} {% block pageContent %}
@@ -168,12 +168,12 @@ {% if pageConfig.breadcrumbs %} {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %} {{ - onsBreadcrumbs({ - "id": pageConfig.breadcrumbs.id, - "ariaLabel": pageConfig.breadcrumbs.ariaLabel, - "itemsList": pageConfig.breadcrumbs.itemsList - }) - }} + onsBreadcrumbs({ + "id": pageConfig.breadcrumbs.id, + "ariaLabel": pageConfig.breadcrumbs.ariaLabel, + "itemsList": pageConfig.breadcrumbs.itemsList + }) + }} {% endif %} {% endblock %}
From 5b3b069f8a8be8d2c5b394b169bf476454f17e4b Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 6 Nov 2023 11:54:18 +0000 Subject: [PATCH 2/6] update code formatting --- .../accordion/example-accordion-open.njk | 4 +- src/components/checkboxes/_macro.njk | 2 +- ...oxes-with-revealed-checkboxes-expanded.njk | 2 +- ...le-checkboxes-with-revealed-checkboxes.njk | 2 +- src/components/footer/_macro.njk | 2 +- src/components/label/_macro.njk | 4 +- src/components/related-content/_macro.njk | 58 +++++----- src/components/section-navigation/_macro.njk | 104 +++++++++--------- src/components/video/_macro.njk | 22 ++-- src/patterns/guide/example-guide.njk | 30 ++--- 10 files changed, 114 insertions(+), 116 deletions(-) diff --git a/src/components/accordion/example-accordion-open.njk b/src/components/accordion/example-accordion-open.njk index e2cf45ec88..a276c18769 100644 --- a/src/components/accordion/example-accordion-open.njk +++ b/src/components/accordion/example-accordion-open.njk @@ -62,7 +62,7 @@ "text": "Areas (0)" }, "value": "areas" - } + } ] }) }} @@ -98,7 +98,7 @@ "text": "Disability (67)" }, "value": "disability" - } + } ] }) }} diff --git a/src/components/checkboxes/_macro.njk b/src/components/checkboxes/_macro.njk index 933838c4b4..8fbef54388 100644 --- a/src/components/checkboxes/_macro.njk +++ b/src/components/checkboxes/_macro.njk @@ -7,7 +7,7 @@ {% set fields %} {% if params.checkboxesLabel is defined %}

{{ params.checkboxesLabel }}

- {% endif %} + {% endif %} {% set hasOther = false %} {% for checkbox in params.checkboxes %} {% if checkbox.other %} diff --git a/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk b/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk index 7bc0cfa595..d34ea82bfd 100644 --- a/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +++ b/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk @@ -82,7 +82,7 @@ "text": "Areas (0)" }, "value": "areas" - } + } ] }) }} diff --git a/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk b/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk index f31021a79e..fe2c463062 100644 --- a/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +++ b/src/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk @@ -80,7 +80,7 @@ "text": "Areas (0)" }, "value": "areas" - } + } ] }) }} diff --git a/src/components/footer/_macro.njk b/src/components/footer/_macro.njk index ed7412ff87..38cd41d0e0 100644 --- a/src/components/footer/_macro.njk +++ b/src/components/footer/_macro.njk @@ -179,7 +179,7 @@ {% endif %} {% if params.copyrightDeclaration %} -
+
diff --git a/src/components/label/_macro.njk b/src/components/label/_macro.njk index c1b4e818f4..678fe2c8bb 100644 --- a/src/components/label/_macro.njk +++ b/src/components/label/_macro.njk @@ -1,8 +1,8 @@ {% macro onsLabel(params) %} {% if params.id %} - {% set descriptionID = params.id ~ "-description-hint" %} + {% set descriptionID = params.id ~ "-description-hint" %} {% else %} - {% set descriptionID = "description-hint" %} + {% set descriptionID = "description-hint" %} {% endif %} {% if params.inputType == "checkbox" or params.inputType == "radio" %} diff --git a/src/components/related-content/_macro.njk b/src/components/related-content/_macro.njk index 714e4fcb85..51fd775e27 100644 --- a/src/components/related-content/_macro.njk +++ b/src/components/related-content/_macro.njk @@ -1,36 +1,34 @@ {% macro onsRelatedContent(params) %} - {% if params.classes %} - {% set classes = ' ' + params.classes %} - {% endif %} + {% if params.classes %} + {% set classes = ' ' + params.classes %} + {% endif %} - + {% for row in params.rows %} + {% call onsRelatedContentSection({ + "title": row.title, + "id": row.id + }) %} + + {% endcall %} + {% endfor %} + {% else %} + {{ caller() if caller }} + {% endif %} + {% endmacro %} diff --git a/src/components/section-navigation/_macro.njk b/src/components/section-navigation/_macro.njk index 65f2e040a3..6798d0828a 100644 --- a/src/components/section-navigation/_macro.njk +++ b/src/components/section-navigation/_macro.njk @@ -1,59 +1,59 @@ {% macro onsSectionNavigation(params) %} - + {% endmacro %} diff --git a/src/components/video/_macro.njk b/src/components/video/_macro.njk index da22fc20c0..1266e058a7 100644 --- a/src/components/video/_macro.njk +++ b/src/components/video/_macro.njk @@ -2,20 +2,20 @@ {%- macro onsVideo(params) -%} {% set linkContents %} - {% if params.image.smallSrc %} - {{ params.image.alt }} - {% endif %} - {{ params.linkText }} + {% if params.image.smallSrc %} + {{ params.image.alt }} + {% endif %} + {{ params.linkText }} {% endset %}
- {{ - onsExternalLink({ - "url": params.videoLinkURL, - "classes": "ons-video__link ons-js-video-placeholder ons-u-db", - "linkText": linkContents - }) - }} + {{ + onsExternalLink({ + "url": params.videoLinkURL, + "classes": "ons-video__link ons-js-video-placeholder ons-u-db", + "linkText": linkContents + }) + }}
{%- endmacro -%} diff --git a/src/patterns/guide/example-guide.njk b/src/patterns/guide/example-guide.njk index 890b5645b9..dc04db7940 100644 --- a/src/patterns/guide/example-guide.njk +++ b/src/patterns/guide/example-guide.njk @@ -92,22 +92,22 @@ layout: ~ }) }}
-

It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

The census is vital to all of us

The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

Its success could help you

Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

You must complete the census by law

You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

+

It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

The census is vital to all of us

The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

Its success could help you

Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

You must complete the census by law

You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

{{- - onsContentPagination({ - "contentPaginationItems": [ - { - "rel": 'prev', - "text": 'Previous', - "url": '#', - "label": 'About the census' - }, - { - "rel": 'next', - "text": 'Next', - "url": '#', - "label": 'How your information is used' - } + onsContentPagination({ + "contentPaginationItems": [ + { + "rel": 'prev', + "text": 'Previous', + "url": '#', + "label": 'About the census' + }, + { + "rel": 'next', + "text": 'Next', + "url": '#', + "label": 'How your information is used' + } ] }) }} From 8e371555bb7ae226c06348c0c30a152c33ed2e3b Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 6 Nov 2023 12:35:09 +0000 Subject: [PATCH 3/6] more formatting --- src/components/section-navigation/_macro.njk | 65 ++++++++++---------- src/patterns/guide/example-guide.njk | 3 +- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/components/section-navigation/_macro.njk b/src/components/section-navigation/_macro.njk index 6798d0828a..eeeff86d89 100644 --- a/src/components/section-navigation/_macro.njk +++ b/src/components/section-navigation/_macro.njk @@ -2,46 +2,47 @@
+ {% endfor %} {% else %} {% if params.title %} -

{{ params.title }}

+

{{ params.title }}

{% endif %} -
    +
      {% for item in params.itemsList %} {% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title|lower) %} - {% set isCurrent = true %} + {% set isCurrent = true %} {% else %} - {% set isCurrent = false %} + {% set isCurrent = false %} {% endif %}
    • - {{ item.title }} + {{ item.title }} {% if item.anchors %}
        {% for anchor in item.anchors %} @@ -53,7 +54,7 @@ {% endif %} {% endfor %} -
      +
    {% endif %} {% endmacro %} diff --git a/src/patterns/guide/example-guide.njk b/src/patterns/guide/example-guide.njk index dc04db7940..3a48c176da 100644 --- a/src/patterns/guide/example-guide.njk +++ b/src/patterns/guide/example-guide.njk @@ -92,7 +92,8 @@ layout: ~ }) }}
    -

    It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

    The census is vital to all of us

    The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

    Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

    Its success could help you

    Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

    A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

    You must complete the census by law

    You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

    +

    It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

    The census is vital to all of us

    The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

    Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

    Its success could help you

    Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

    A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

    You must complete the census by law

    You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

    +
    {{- onsContentPagination({ "contentPaginationItems": [ From 574ae92abe2a0699ba5a2c824b5cc7cf2d592ade Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 6 Nov 2023 12:46:02 +0000 Subject: [PATCH 4/6] more formatting --- src/patterns/guide/example-guide-overview.njk | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/patterns/guide/example-guide-overview.njk b/src/patterns/guide/example-guide-overview.njk index 97879446b6..1c9444a202 100644 --- a/src/patterns/guide/example-guide-overview.njk +++ b/src/patterns/guide/example-guide-overview.njk @@ -90,7 +90,19 @@ layout: ~ ] }) }} -

    What the census is

    The census is a survey that happens every 10 years and gives us a picture of all the people and households in England and Wales. The census is unique. There’s simply nothing else that gives so much detail about us and the society we live in.

    All kinds of organisations, from local authorities to charities, use the information to help provide the services we all need, including transport, education and healthcare. Without the census, it would be much more difficult to do this.

    By taking part, you’ll be helping make sure you and your community get the services needed now and in the future.

    Past, present and future

    The first census was in 1801 and the most recent in 2011. The Office for National Statistics (ONS) runs the census in England Wales and the next one will happen on Sunday 21 March 2021. To prepare for it, we held a census rehearsal in 2019 to check our processes, systems and services were running smoothly ahead of the real thing.

    Between censuses

    We also need your help between each census. At the ONS, we rely on ongoing surveys to provide detailed, up-to-date information about changes to society. To make sure that we represent everyone, we ask people to take part in these surveys. We carry out interviews in person, by phone or online.

    These surveys do not stop while the census takes place. To find out more about the types of surveys we run throughout the year, visit the ONS website.

    The census in Scotland and Northern Ireland

    At the ONS, we’re responsible for planning and running the census for England and Wales.

    Find out more about the censuses in Scotland and Northern Ireland from National Records of Scotland and Northern Ireland Statistics and Research Agency.

    +
    +

    What the census is

    +

    The census is a survey that happens every 10 years and gives us a picture of all the people and households in England and Wales. The census is unique. There’s simply nothing else that gives so much detail about us and the society we live in.

    +

    All kinds of organisations, from local authorities to charities, use the information to help provide the services we all need, including transport, education and healthcare. Without the census, it would be much more difficult to do this.

    +

    By taking part, you’ll be helping make sure you and your community get the services needed now and in the future.

    +

    Past, present and future

    +

    The first census was in 1801 and the most recent in 2011. The Office for National Statistics (ONS) runs the census in England Wales and the next one will happen on Sunday 21 March 2021. To prepare for it, we held a census rehearsal in 2019 to check our processes, systems and services were running smoothly ahead of the real thing.

    +

    Between censuses

    +

    We also need your help between each census. At the ONS, we rely on ongoing surveys to provide detailed, up-to-date information about changes to society. To make sure that we represent everyone, we ask people to take part in these surveys. We carry out interviews in person, by phone or online.

    +

    These surveys do not stop while the census takes place. To find out more about the types of surveys we run throughout the year, visit the ONS website.

    +

    The census in Scotland and Northern Ireland

    +

    At the ONS, we’re responsible for planning and running the census for England and Wales.

    +

    Find out more about the censuses in Scotland and Northern Ireland from National Records of Scotland and Northern Ireland Statistics and Research Agency.

    {{- onsContentPagination({ From cc332cb205b65d560934737426d3e32b726fa740 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 6 Nov 2023 13:02:16 +0000 Subject: [PATCH 5/6] fix formatting --- src/components/section-navigation/_macro.njk | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/section-navigation/_macro.njk b/src/components/section-navigation/_macro.njk index eeeff86d89..9245295ce1 100644 --- a/src/components/section-navigation/_macro.njk +++ b/src/components/section-navigation/_macro.njk @@ -5,29 +5,29 @@ {% for section in params.sections %}
    {% if section.title %} -

    {{ section.title }}

    {% endif %} -
      - {% for item in section.itemsList %} - {% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title|lower) %} - {% set isCurrent = true %} - {% else %} - {% set isCurrent = false %} - {% endif %} -
    • - {{ item.title }} - {% if item.anchors and isCurrent == true %} - - {% endif %} -
    • - {% endfor %} -
    +

    {{ section.title }}

    {% endif %} +
      + {% for item in section.itemsList %} + {% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title|lower) %} + {% set isCurrent = true %} + {% else %} + {% set isCurrent = false %} + {% endif %} +
    • + {{ item.title }} + {% if item.anchors and isCurrent == true %} + + {% endif %} +
    • + {% endfor %} +
    {% endfor %} {% else %} From e03496985216cdae1b12edadb685cad930973beb Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Tue, 7 Nov 2023 09:48:29 +0000 Subject: [PATCH 6/6] fix formatting --- src/patterns/guide/example-guide-overview.njk | 21 ++++++++++++------- src/patterns/guide/example-guide.njk | 14 ++++++++++++- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/patterns/guide/example-guide-overview.njk b/src/patterns/guide/example-guide-overview.njk index 1c9444a202..1b0eebc2ed 100644 --- a/src/patterns/guide/example-guide-overview.njk +++ b/src/patterns/guide/example-guide-overview.njk @@ -95,24 +95,29 @@ layout: ~

    The census is a survey that happens every 10 years and gives us a picture of all the people and households in England and Wales. The census is unique. There’s simply nothing else that gives so much detail about us and the society we live in.

    All kinds of organisations, from local authorities to charities, use the information to help provide the services we all need, including transport, education and healthcare. Without the census, it would be much more difficult to do this.

    By taking part, you’ll be helping make sure you and your community get the services needed now and in the future.

    +

    Past, present and future

    The first census was in 1801 and the most recent in 2011. The Office for National Statistics (ONS) runs the census in England Wales and the next one will happen on Sunday 21 March 2021. To prepare for it, we held a census rehearsal in 2019 to check our processes, systems and services were running smoothly ahead of the real thing.

    +

    Between censuses

    We also need your help between each census. At the ONS, we rely on ongoing surveys to provide detailed, up-to-date information about changes to society. To make sure that we represent everyone, we ask people to take part in these surveys. We carry out interviews in person, by phone or online.

    These surveys do not stop while the census takes place. To find out more about the types of surveys we run throughout the year, visit the ONS website.

    +

    The census in Scotland and Northern Ireland

    At the ONS, we’re responsible for planning and running the census for England and Wales.

    +

    Find out more about the censuses in Scotland and Northern Ireland from National Records of Scotland and Northern Ireland Statistics and Research Agency.

    +
    {{- - onsContentPagination({ - "contentPaginationItems": [ - { - "rel": 'next', - "text": 'Next', - "url": '#', - "label": 'Who should take part and why' - } + onsContentPagination({ + "contentPaginationItems": [ + { + "rel": 'next', + "text": 'Next', + "url": '#', + "label": 'Who should take part and why' + } ] }) }} diff --git a/src/patterns/guide/example-guide.njk b/src/patterns/guide/example-guide.njk index 3a48c176da..4e2a8531f7 100644 --- a/src/patterns/guide/example-guide.njk +++ b/src/patterns/guide/example-guide.njk @@ -92,7 +92,19 @@ layout: ~ }) }}
    -

    It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

    The census is vital to all of us

    The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

    Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

    Its success could help you

    Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

    A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

    You must complete the census by law

    You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

    +

    It’s important you take part in the census. The information it gives has the power to make a real impact on our everyday lives.

    + +

    The census is vital to all of us

    +

    The census helps us understand what our society needs now and what it’s likely to need in the future. The information it collects helps plan and fund services in your area. This could include transport, education and healthcare.

    +

    Charities also use census information to help get the funding they need. Businesses use it to decide where to set up, which creates job opportunities.

    + +

    Its success could help you

    +

    Census 2021 will help give the best picture of the needs of everyone living in England and Wales.

    +

    A total of 94% of people took part in the last census, helping each area receive its share of public funding. Without the census, it would be much more difficult to provide the services you and your community need.

    + +

    You must complete the census by law

    +

    You must complete the census by law. If you do not, or if you supply false information, you could be fined up to £1,000. Some questions are clearly labelled as voluntary. It is not an offence if you do not answer these.

    +
    {{- onsContentPagination({