@ons/design-system 70.0.8 → 70.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/access-code/_macro.njk +31 -25
- package/components/access-code/example-access-code-error.njk +49 -37
- package/components/access-code/example-access-code.njk +40 -30
- package/components/accordion/_macro.njk +7 -6
- package/components/accordion/example-accordion-open.njk +0 -1
- package/components/address-input/_macro.njk +23 -11
- package/components/address-input/autosuggest.address.js +0 -5
- package/components/address-input/example-address-input-editable.njk +52 -50
- package/components/address-input/example-address-input-manual.njk +23 -21
- package/components/address-input/example-address-input.njk +40 -38
- package/components/address-output/_macro.njk +6 -6
- package/components/autosuggest/_macro.njk +57 -37
- package/components/autosuggest/example-autosuggest-country-multiple.njk +26 -26
- package/components/autosuggest/example-autosuggest-country.njk +24 -24
- package/components/back-to-top/example-back-to-top.njk +183 -6
- package/components/back-to-top/example-full-page-back-to-top.njk +135 -123
- package/components/breadcrumbs/_macro.njk +12 -4
- package/components/browser-banner/_macro.njk +6 -3
- package/components/button/_button.scss +36 -1
- package/components/button/_macro.njk +63 -62
- package/components/button/example-button-ghost.njk +1 -0
- package/components/call-to-action/_macro.njk +7 -5
- package/components/call-to-action/example-call-to-action-default.njk +3 -2
- package/components/card/_macro.njk +26 -10
- package/components/card/example-card-set-with-images.njk +31 -29
- package/components/card/example-card-set-with-lists.njk +58 -56
- package/components/card/example-card-set.njk +28 -26
- package/components/card/example-card.njk +9 -7
- package/components/char-check-limit/_macro.njk +1 -3
- package/components/checkboxes/_checkbox-macro.njk +19 -15
- package/components/checkboxes/_macro.njk +81 -72
- package/components/checkboxes/example-checkboxes-disabled.njk +30 -30
- package/components/checkboxes/example-checkboxes-error.njk +0 -1
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +162 -170
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +81 -81
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +79 -79
- package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +7 -5
- package/components/checkboxes/example-checkboxes.njk +7 -5
- package/components/content-pagination/_macro.njk +34 -32
- package/components/content-pagination/example-content-pagination.njk +17 -17
- package/components/cookies-banner/_macro.njk +19 -6
- package/components/cookies-banner/example-cookies-banner-cymraeg.njk +2 -1
- package/components/cookies-banner/example-cookies-banner.njk +3 -4
- package/components/date-input/_macro.njk +71 -63
- package/components/date-input/example-date-input-error-for-single-field.njk +0 -1
- package/components/date-input/example-date-input-error.njk +0 -1
- package/components/description-list/_macro.njk +20 -11
- package/components/details/_macro.njk +18 -11
- package/components/details/example-details-with-warning.njk +15 -10
- package/components/document-list/_macro.njk +102 -93
- package/components/document-list/example-document-list-article-featured.njk +27 -25
- package/components/document-list/example-document-list-articles.njk +55 -53
- package/components/document-list/example-document-list-downloads.njk +49 -47
- package/components/document-list/example-document-list-search-result-featured.njk +19 -17
- package/components/document-list/example-document-list-search-results.njk +60 -58
- package/components/duration/_macro.njk +61 -55
- package/components/duration/example-duration-error-for-single-field.njk +28 -26
- package/components/duration/example-duration-single-field.njk +23 -19
- package/components/duration/example-duration.njk +33 -29
- package/components/error/_macro.njk +8 -6
- package/components/external-link/_macro.njk +7 -5
- package/components/external-link/example-external-link.njk +9 -6
- package/components/feedback/_macro.njk +7 -5
- package/components/field/_macro.njk +2 -2
- package/components/fieldset/_macro.njk +23 -16
- package/components/footer/_macro.njk +28 -21
- package/components/footer/_macro.spec.js +1 -1
- package/components/footer/example-footer-cymraeg.njk +2 -1
- package/components/footer/example-footer-default.njk +3 -4
- package/components/footer/example-footer-transactional.njk +2 -1
- package/components/footer/example-footer-warning.njk +2 -1
- package/components/footer/example-footer-with-alternative-organisation.njk +2 -1
- package/components/footer/example-footer-with-coat-of-arms.njk +2 -1
- package/components/footer/example-footer-with-copyright.njk +2 -1
- package/components/footer/example-footer.njk +2 -1
- package/components/header/_header.scss +24 -19
- package/components/header/_macro.njk +183 -141
- package/components/header/example-header-default.njk +2 -1
- package/components/header/example-header-external-for-survey-with-description.njk +2 -1
- package/components/header/example-header-external-for-surveys.njk +2 -1
- package/components/header/example-header-external-welsh.njk +7 -7
- package/components/header/example-header-external-with-navigation-and-search.njk +3 -2
- package/components/header/example-header-external-with-navigation.njk +2 -1
- package/components/header/example-header-external-with-service-links.njk +2 -1
- package/components/header/example-header-external-with-sub-navigation-removed.njk +2 -1
- package/components/header/example-header-external-with-sub-navigation.njk +3 -2
- package/components/header/example-header-internal.njk +2 -1
- package/components/header/example-header-multiple-logos.njk +2 -1
- package/components/header/{example-header-neutral-for-multicoloured-logo.njk → example-header-neutral.njk} +2 -1
- package/components/helpers/grid.njk +17 -16
- package/components/hero/_macro.njk +6 -11
- package/components/hero/example-hero-dark.njk +2 -1
- package/components/hero/example-hero-default.njk +2 -1
- package/components/icon/_macro.njk +601 -168
- package/components/image/_macro.njk +7 -5
- package/components/input/_macro.njk +114 -95
- package/components/input/example-input-search-with-character-check.njk +1 -1
- package/components/input/example-input-search-with-placeholder.njk +1 -1
- package/components/input/example-input-search.njk +1 -1
- package/components/label/_macro.njk +32 -26
- package/components/language-selector/_macro.njk +11 -2
- package/components/list/_list.scss +13 -0
- package/components/list/_macro.njk +93 -73
- package/components/message/_macro.njk +20 -7
- package/components/message-list/_macro.njk +26 -20
- package/components/modal/_macro.njk +11 -12
- package/components/multiple-input-fields/_macro.njk +30 -28
- package/components/mutually-exclusive/_macro.njk +20 -13
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-date.njk +7 -5
- package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +44 -40
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +7 -5
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-number.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +6 -4
- package/components/navigation/_macro.njk +133 -67
- package/components/navigation/_navigation.scss +0 -9
- package/components/pagination/_macro.njk +42 -20
- package/components/panel/_macro.njk +27 -16
- package/components/panel/example-panel-bare.njk +6 -4
- package/components/panel/example-panel-with-announcement.njk +7 -4
- package/components/panel/example-panel-with-error-summary.njk +6 -4
- package/components/panel/example-panel-with-warning.njk +5 -3
- package/components/password/_macro.njk +7 -5
- package/components/phase-banner/_macro.njk +3 -3
- package/components/phase-banner/example-phase-banner-alpha.njk +2 -1
- package/components/phase-banner/example-phase-banner-beta.njk +4 -3
- package/components/question/_macro.njk +62 -47
- package/components/question/example-question-ccs.njk +40 -35
- package/components/question/example-question-fieldset.njk +84 -80
- package/components/question/example-question-interviewer-note.njk +27 -24
- package/components/question/example-question-no-fieldset.njk +39 -33
- package/components/quote/_macro.njk +3 -1
- package/components/radios/_macro.njk +54 -36
- package/components/radios/_macro.spec.js +21 -0
- package/components/radios/example-radios-with-clear-button-expanded.njk +6 -4
- package/components/radios/example-radios-with-clear-button.njk +6 -4
- package/components/radios/example-radios-with-descriptions.njk +7 -5
- package/components/radios/example-radios-with-revealed-select-expanded.njk +6 -4
- package/components/radios/example-radios-with-revealed-select.njk +6 -4
- package/components/radios/example-radios-with-revealed-text-area-expanded.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-area.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-input-expanded.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-input.njk +7 -5
- package/components/radios/example-radios-with-separator.njk +6 -4
- package/components/radios/example-radios-with-visible-text-input.njk +7 -5
- package/components/radios/example-radios-without-border.njk +0 -1
- package/components/radios/example-radios.njk +7 -5
- package/components/related-content/_macro.njk +10 -11
- package/components/related-content/_section-macro.njk +7 -7
- package/components/related-content/example-related-content-general.njk +5 -3
- package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -49
- package/components/related-content/example-related-content-social-media.njk +40 -38
- package/components/relationships/_macro.njk +10 -8
- package/components/relationships/example-relationships-error.njk +176 -168
- package/components/relationships/example-relationships-you.njk +169 -163
- package/components/relationships/example-relationships.njk +167 -161
- package/components/section-navigation/_macro.njk +34 -12
- package/components/select/_macro.njk +21 -18
- package/components/share-page/_macro.njk +10 -5
- package/components/skip-to-content/_macro.njk +1 -1
- package/components/skip-to-content/example-skip-to-content.njk +1 -0
- package/components/status/_macro.njk +1 -1
- package/components/summary/_macro.njk +53 -23
- package/components/summary/example-summary-household-no-rows.njk +18 -16
- package/components/summary/example-summary-household.njk +75 -73
- package/components/summary/example-summary-hub-minimal.njk +74 -72
- package/components/summary/example-summary-hub.njk +169 -167
- package/components/table/_macro.njk +72 -45
- package/components/table-of-contents/_macro.njk +34 -32
- package/components/table-of-contents/example-table-of-contents-grouped.njk +1 -1
- package/components/table-of-contents/example-table-of-contents-single.njk +1 -1
- package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +79 -38
- package/components/table-of-contents/example-table-of-contents-sticky.njk +50 -13
- package/components/tabs/_macro.njk +12 -6
- package/components/tabs/example-tabs-details.njk +5 -6
- package/components/text-indent/_macro.njk +1 -3
- package/components/textarea/_macro.njk +49 -46
- package/components/textarea/_macro.spec.js +0 -11
- package/components/timeline/_macro.njk +4 -6
- package/components/timeout-modal/_macro.njk +21 -19
- package/components/timeout-modal/example-timeout-modal.njk +16 -14
- package/components/timeout-panel/_macro.njk +19 -17
- package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -11
- package/components/upload/_macro.njk +20 -16
- package/components/video/_macro.njk +16 -2
- package/components/video/example-video.njk +2 -2
- package/css/main.css +1 -1
- package/layout/_dsTemplate.njk +22 -20
- package/layout/_template.njk +63 -49
- package/package.json +4 -3
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/overrides/hcm.scss +1 -1
- package/scss/vars/_colors.scss +1 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Table of contents on full page'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
-
{% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}
|
|
6
5
|
|
|
6
|
+
{% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}
|
|
7
7
|
{% extends "layout/_template.njk" %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
{%
|
|
9
|
+
set pageConfig = {
|
|
10
|
+
"header": {
|
|
11
|
+
"title": "What is the census?"
|
|
12
|
+
},
|
|
13
|
+
"breadcrumbs": {
|
|
14
|
+
"ariaLabel": 'Back',
|
|
15
|
+
"itemsList": [
|
|
16
|
+
{
|
|
17
|
+
"url": '/',
|
|
18
|
+
"id": "back-example-feedback-form-error",
|
|
19
|
+
"text": 'Back',
|
|
20
|
+
"attributes": {
|
|
21
|
+
"data-attribute": "Example attribute"
|
|
22
|
+
}
|
|
22
23
|
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"footer": {
|
|
27
|
+
"OGLLink": {
|
|
28
|
+
"pre": 'All content is available under the',
|
|
29
|
+
"link": 'Open Government Licence v3.0',
|
|
30
|
+
"url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
|
|
31
|
+
"post": ', except where otherwise stated'
|
|
23
32
|
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"footer": {
|
|
27
|
-
"OGLLink": {
|
|
28
|
-
"pre": 'All content is available under the',
|
|
29
|
-
"link": 'Open Government Licence v3.0',
|
|
30
|
-
"url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
|
|
31
|
-
"post": ', except where otherwise stated'
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
%}
|
|
35
36
|
|
|
36
37
|
{% block main %}
|
|
37
38
|
<div class="ons-page__container ons-container">
|
|
@@ -69,42 +70,82 @@ layout: ~
|
|
|
69
70
|
<div class="ons-grid__col ons-col-7@m ons-push-1@m">
|
|
70
71
|
<section id="section1">
|
|
71
72
|
<h2>What is the census?</h2>
|
|
72
|
-
<p>
|
|
73
|
+
<p>
|
|
74
|
+
The census is a survey that happens every 10 years and gives us a picture of all the people and households in
|
|
75
|
+
England and Wales.
|
|
76
|
+
</p>
|
|
73
77
|
|
|
74
|
-
<p>
|
|
78
|
+
<p>
|
|
79
|
+
Your answers to the census questions will help organisations make decisions on planning and funding public services
|
|
80
|
+
in your area, including transport, education and healthcare.
|
|
81
|
+
</p>
|
|
75
82
|
</section>
|
|
76
83
|
<section id="section2">
|
|
77
84
|
<h2>The online census has now closed</h2>
|
|
78
85
|
<p>Census Day was on Sunday 21 March 2021.</p>
|
|
79
86
|
|
|
80
|
-
<p>
|
|
87
|
+
<p>
|
|
88
|
+
If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census
|
|
89
|
+
2021.
|
|
90
|
+
</p>
|
|
81
91
|
</section>
|
|
82
92
|
<section id="section3">
|
|
83
93
|
<h2>What happens after Census Day</h2>
|
|
84
|
-
<p>
|
|
94
|
+
<p>
|
|
95
|
+
Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>,
|
|
96
|
+
help to improve the quality and accuracy of the census results.
|
|
97
|
+
</p>
|
|
85
98
|
|
|
86
|
-
<p>
|
|
99
|
+
<p>
|
|
100
|
+
Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
|
|
101
|
+
publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
|
|
102
|
+
</p>
|
|
87
103
|
|
|
88
|
-
<p>
|
|
104
|
+
<p>
|
|
105
|
+
To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
|
|
106
|
+
consultation.
|
|
107
|
+
</p>
|
|
89
108
|
</section>
|
|
90
109
|
<section id="section4">
|
|
91
110
|
<h2>The census in Northern Ireland and Scotland</h2>
|
|
92
111
|
<p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
|
|
93
112
|
|
|
94
|
-
<p>
|
|
113
|
+
<p>
|
|
114
|
+
If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out
|
|
115
|
+
about the census for Northern Ireland.
|
|
116
|
+
</p>
|
|
95
117
|
|
|
96
|
-
<p>
|
|
118
|
+
<p>
|
|
119
|
+
If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
|
|
120
|
+
census for Scotland.
|
|
121
|
+
</p>
|
|
97
122
|
</section>
|
|
98
123
|
<section id="section5">
|
|
99
124
|
<h2>The last census</h2>
|
|
100
|
-
<p>
|
|
125
|
+
<p>
|
|
126
|
+
The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety
|
|
127
|
+
of ways.
|
|
128
|
+
</p>
|
|
101
129
|
|
|
102
|
-
<p>
|
|
130
|
+
<p>
|
|
131
|
+
For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
|
|
132
|
+
essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn
|
|
133
|
+
more about dementia.
|
|
134
|
+
</p>
|
|
103
135
|
|
|
104
|
-
<p>
|
|
105
|
-
|
|
136
|
+
<p>
|
|
137
|
+
To read more about the benefits that information from the 2011 Census helped to create, visit the Office for
|
|
138
|
+
National Statistics (ONS) website.
|
|
139
|
+
</p>
|
|
140
|
+
<p>
|
|
141
|
+
The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
|
|
142
|
+
started six to eight weeks after Census Day.
|
|
143
|
+
</p>
|
|
106
144
|
|
|
107
|
-
<p>
|
|
145
|
+
<p>
|
|
146
|
+
The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
|
|
147
|
+
questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
|
|
148
|
+
</p>
|
|
108
149
|
|
|
109
150
|
<p>The CCS has now closed.</p>
|
|
110
151
|
</section>
|
|
@@ -29,14 +29,20 @@
|
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
31
|
})
|
|
32
|
-
}}
|
|
32
|
+
-}}
|
|
33
33
|
</div>
|
|
34
34
|
<div class="ons-grid__col ons-col-7@m ons-push-1@m">
|
|
35
35
|
<section id="section1">
|
|
36
36
|
<h2>What is the census?</h2>
|
|
37
|
-
<p>
|
|
37
|
+
<p>
|
|
38
|
+
The census is a survey that happens every 10 years and gives us a picture of all the people and households in England
|
|
39
|
+
and Wales.
|
|
40
|
+
</p>
|
|
38
41
|
|
|
39
|
-
<p>
|
|
42
|
+
<p>
|
|
43
|
+
Your answers to the census questions will help organisations make decisions on planning and funding public services in
|
|
44
|
+
your area, including transport, education and healthcare.
|
|
45
|
+
</p>
|
|
40
46
|
</section>
|
|
41
47
|
<section id="section2">
|
|
42
48
|
<h2>The online census has now closed</h2>
|
|
@@ -46,30 +52,61 @@
|
|
|
46
52
|
</section>
|
|
47
53
|
<section id="section3">
|
|
48
54
|
<h2>What happens after Census Day</h2>
|
|
49
|
-
<p>
|
|
55
|
+
<p>
|
|
56
|
+
Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>, help
|
|
57
|
+
to improve the quality and accuracy of the census results.
|
|
58
|
+
</p>
|
|
50
59
|
|
|
51
|
-
<p>
|
|
60
|
+
<p>
|
|
61
|
+
Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
|
|
62
|
+
publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
|
|
63
|
+
</p>
|
|
52
64
|
|
|
53
|
-
<p>
|
|
65
|
+
<p>
|
|
66
|
+
To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
|
|
67
|
+
consultation.
|
|
68
|
+
</p>
|
|
54
69
|
</section>
|
|
55
70
|
<section id="section4">
|
|
56
71
|
<h2>The census in Northern Ireland and Scotland</h2>
|
|
57
72
|
<p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
|
|
58
73
|
|
|
59
|
-
<p>
|
|
74
|
+
<p>
|
|
75
|
+
If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out about
|
|
76
|
+
the census for Northern Ireland.
|
|
77
|
+
</p>
|
|
60
78
|
|
|
61
|
-
<p>
|
|
79
|
+
<p>
|
|
80
|
+
If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
|
|
81
|
+
census for Scotland.
|
|
82
|
+
</p>
|
|
62
83
|
</section>
|
|
63
84
|
<section id="section5">
|
|
64
85
|
<h2>The last census</h2>
|
|
65
|
-
<p>
|
|
86
|
+
<p>
|
|
87
|
+
The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety of
|
|
88
|
+
ways.
|
|
89
|
+
</p>
|
|
66
90
|
|
|
67
|
-
<p>
|
|
91
|
+
<p>
|
|
92
|
+
For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
|
|
93
|
+
essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn more
|
|
94
|
+
about dementia.
|
|
95
|
+
</p>
|
|
68
96
|
|
|
69
|
-
<p>
|
|
70
|
-
|
|
97
|
+
<p>
|
|
98
|
+
To read more about the benefits that information from the 2011 Census helped to create, visit the Office for National
|
|
99
|
+
Statistics (ONS) website.
|
|
100
|
+
</p>
|
|
101
|
+
<p>
|
|
102
|
+
The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
|
|
103
|
+
started six to eight weeks after Census Day.
|
|
104
|
+
</p>
|
|
71
105
|
|
|
72
|
-
<p>
|
|
106
|
+
<p>
|
|
107
|
+
The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
|
|
108
|
+
questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
|
|
109
|
+
</p>
|
|
73
110
|
|
|
74
111
|
<p>The CCS has now closed.</p>
|
|
75
112
|
</section>
|
|
@@ -7,21 +7,27 @@
|
|
|
7
7
|
{% endfor %}
|
|
8
8
|
{% endset %}
|
|
9
9
|
|
|
10
|
-
<section class="{{ classes }}"
|
|
11
|
-
{% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}
|
|
12
|
-
>
|
|
10
|
+
<section class="{{ classes }}" {% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}>
|
|
13
11
|
{% set titleTag = params.titleTag | default("h2") %}
|
|
14
|
-
|
|
12
|
+
{% set openingTag = "<" + titleTag %}
|
|
13
|
+
{% set closingTag = "</" + titleTag + ">" %}
|
|
14
|
+
{{ openingTag | safe }}
|
|
15
|
+
class="ons-tabs__title ons-u-fs-r--b
|
|
16
|
+
ons-u-mt-no{{ ' ' + params.titleClasses if params.titleClasses else '' }}">{{ params.title }}{{ closingTag | safe }}
|
|
15
17
|
<div>
|
|
16
18
|
<ul class="ons-tabs__list">
|
|
19
|
+
<!-- prettier-ignore-start -->
|
|
17
20
|
{%- for tab in params.tabs -%}
|
|
18
|
-
<li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower}}" class="ons-tab"{% if tab.attributes %}{% for attribute, value in (tab.attributes.items() if tab.attributes is mapping and tab.attributes.items else tab.attributes) %} {{ attribute }}{% if value %}="{{ value }}"{% endif %}
|
|
21
|
+
<li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower }}" class="ons-tab"{% if tab.attributes %}{% for attribute, value in (tab.attributes.items() if tab.attributes is mapping and tab.attributes.items else tab.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>{{ tab.title }}{% if tab.hiddenSpan %}<span class="ons-u-vh">{{ tab.hiddenSpan }}</span>{% endif %}</a></li>
|
|
19
22
|
{%- endfor -%}
|
|
23
|
+
<!-- prettier-ignore-end -->
|
|
20
24
|
</ul>
|
|
21
25
|
</div>
|
|
22
26
|
{% for tab in params.tabs %}
|
|
23
27
|
<section id="{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower }}" class="ons-tabs__panel">
|
|
24
|
-
{% if tab.showTitle %}
|
|
28
|
+
{% if tab.showTitle %}
|
|
29
|
+
<h2 id="{{ tab.title|trim|replace(' ','-')|lower + '-content-title' }}" class="ons-u-vh">{{ tab.title }}</h2>
|
|
30
|
+
{% endif %}
|
|
25
31
|
{{ tab.content | safe }}
|
|
26
32
|
</section>
|
|
27
33
|
{% endfor %}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<style>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
.example-video-block {
|
|
3
|
+
border: solid 1px #707071;
|
|
4
|
+
}
|
|
5
5
|
</style>
|
|
6
6
|
|
|
7
7
|
<div class="example-video-block">
|
|
@@ -11,15 +11,14 @@
|
|
|
11
11
|
"videoEmbedUrl": 'https://www.youtube.com/embed/OwYVwPPxPj4',
|
|
12
12
|
"videoLinkURL": 'https://www.youtube.com/watch?v=OwYVwPPxPj4',
|
|
13
13
|
"image": {
|
|
14
|
-
"largeSrc": '/
|
|
15
|
-
"smallSrc": '/
|
|
14
|
+
"largeSrc": '/ds-img/youtube-example-cover.png',
|
|
15
|
+
"smallSrc": '/ds-img/youtube-example-cover.png',
|
|
16
16
|
"alt": "Youtube video"
|
|
17
17
|
},
|
|
18
18
|
"title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
|
|
19
19
|
"linkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
|
|
20
20
|
})
|
|
21
21
|
}}
|
|
22
|
-
|
|
23
22
|
{% from "components/tabs/_macro.njk" import onsTabs %}
|
|
24
23
|
{{
|
|
25
24
|
onsTabs({
|
|
@@ -3,75 +3,78 @@
|
|
|
3
3
|
{% from "components/field/_macro.njk" import onsField %}
|
|
4
4
|
{% from "components/label/_macro.njk" import onsLabel %}
|
|
5
5
|
{% from "components/char-check-limit/_macro.njk" import onsCharLimit %}
|
|
6
|
-
|
|
6
|
+
{% set textareaExclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive %}
|
|
7
7
|
|
|
8
8
|
{% set field %}
|
|
9
|
-
{% set textareaExclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive else "" %}
|
|
10
|
-
|
|
11
9
|
{% if params.label %}
|
|
12
|
-
{{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
{{
|
|
11
|
+
onsLabel({
|
|
12
|
+
"for": params.id,
|
|
13
|
+
"text": params.label.text,
|
|
14
|
+
"description": params.label.description,
|
|
15
|
+
"classes": params.label.classes
|
|
16
|
+
})
|
|
17
|
+
}}
|
|
18
18
|
{% endif %}
|
|
19
19
|
|
|
20
20
|
<textarea
|
|
21
21
|
id="{{ params.id }}"
|
|
22
|
-
class="ons-input ons-input--textarea
|
|
22
|
+
class="ons-input ons-input--textarea{{ ' ons-input--error' if params.error }}{{ ' ons-js-char-limit-input' if params.charCheckLimit and params.charCheckLimit.limit }}{{ textareaExclusiveClass }}{{ ' ' + params.classes if params.classes else '' }}{% if params.width %}{{ ' ' }}ons-input--w-{{ params.width }}{% endif %}"
|
|
23
23
|
{% if params.name %}
|
|
24
|
-
|
|
24
|
+
name="{{ params.name }}"
|
|
25
25
|
{% endif %}
|
|
26
26
|
rows="{{ params.rows | default(8) }}"
|
|
27
27
|
{% if params.charCheckLimit and params.charCheckLimit.limit %}
|
|
28
|
-
maxlength="{{ params.charCheckLimit.limit }}"
|
|
29
|
-
data-char-limit-ref="{{ params.id }}-lim"
|
|
28
|
+
maxlength="{{ params.charCheckLimit.limit }}" data-char-limit-ref="{{ params.id }}-lim"
|
|
30
29
|
aria-describedby="{{ params.id }}-lim"
|
|
31
30
|
{% endif %}
|
|
32
|
-
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ attribute }}{% if value %}="{{ value }}"{% endif %}
|
|
33
|
-
>
|
|
31
|
+
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
|
|
32
|
+
>
|
|
33
|
+
{{- params.value if params.value -}}</textarea
|
|
34
|
+
>
|
|
34
35
|
|
|
35
36
|
{% if params.charCheckLimit and params.charCheckLimit.limit %}
|
|
36
|
-
{%
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
{%
|
|
38
|
+
call onsCharLimit({
|
|
39
|
+
"id": params.id ~ "-lim",
|
|
40
|
+
"limit": params.charCheckLimit.limit,
|
|
41
|
+
"charCountSingular": params.charCheckLimit.charCountSingular,
|
|
42
|
+
"charCountPlural": params.charCheckLimit.charCountPlural
|
|
43
|
+
})
|
|
44
|
+
%}
|
|
42
45
|
{% endcall %}
|
|
43
46
|
{% endif %}
|
|
44
47
|
{% endset %}
|
|
45
48
|
|
|
46
49
|
{% if params.mutuallyExclusive %}
|
|
47
|
-
{%
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}) %}
|
|
62
|
-
{% call onsField({
|
|
50
|
+
{%
|
|
51
|
+
call onsMutuallyExclusive({
|
|
52
|
+
"id": params.fieldId,
|
|
53
|
+
"classes": params.fieldClasses,
|
|
54
|
+
"legend": params.legend,
|
|
55
|
+
"legendClasses": params.legendClasses,
|
|
56
|
+
"description": params.description,
|
|
57
|
+
"dontWrap": params.dontWrap,
|
|
58
|
+
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
59
|
+
"exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
|
|
60
|
+
"or": params.mutuallyExclusive.or,
|
|
61
|
+
"deselectMessage": params.mutuallyExclusive.deselectMessage,
|
|
62
|
+
"deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
|
|
63
|
+
"deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective,
|
|
63
64
|
"error": params.error
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
{
|
|
65
|
+
})
|
|
66
|
+
%}
|
|
67
|
+
{{ field | safe }}
|
|
67
68
|
{% endcall %}
|
|
68
69
|
{% else %}
|
|
69
|
-
{%
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
{%
|
|
71
|
+
call onsField({
|
|
72
|
+
"id": params.fieldId,
|
|
73
|
+
"classes": params.fieldClasses,
|
|
74
|
+
"dontWrap": params.dontWrap,
|
|
75
|
+
"error": params.error
|
|
76
|
+
})
|
|
77
|
+
%}
|
|
75
78
|
{{ field | safe }}
|
|
76
79
|
{% endcall %}
|
|
77
80
|
{% endif %}
|
|
@@ -285,16 +285,5 @@ describe('macro: textarea', () => {
|
|
|
285
285
|
error: EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR.error,
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
|
-
|
|
289
|
-
it('still renders field component', () => {
|
|
290
|
-
const faker = templateFaker();
|
|
291
|
-
const fieldSpy = faker.spy('field');
|
|
292
|
-
|
|
293
|
-
faker.renderComponent('textarea', EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR);
|
|
294
|
-
|
|
295
|
-
expect(fieldSpy.occurrences).toContainEqual({
|
|
296
|
-
error: EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR.error,
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
288
|
});
|
|
300
289
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{% macro onsTimeline(params) %}
|
|
2
|
-
|
|
3
2
|
{% from "components/list/_macro.njk" import onsList %}
|
|
4
3
|
|
|
5
4
|
<div class="ons-timeline{{ ' ' + params.classes if params.classes else '' }}">
|
|
6
5
|
{% set titleTag = params.titleTag | default("h2") %}
|
|
6
|
+
{% set openingTag = "<" + titleTag %}
|
|
7
|
+
{% set closingTag = "</" + titleTag + ">" %}
|
|
7
8
|
{% for item in params.items %}
|
|
8
9
|
<div class="ons-timeline__item">
|
|
9
|
-
|
|
10
|
+
{{ openingTag | safe }} class="ons-timeline__heading">{{ item.heading }}{{ closingTag | safe }}
|
|
10
11
|
{% if item.itemsList %}
|
|
11
12
|
<div class="ons-timeline__content">
|
|
12
13
|
{{
|
|
@@ -17,12 +18,9 @@
|
|
|
17
18
|
}}
|
|
18
19
|
</div>
|
|
19
20
|
{% elif item.content %}
|
|
20
|
-
<div class="ons-timeline__content">
|
|
21
|
-
{{ item.content | safe }}
|
|
22
|
-
</div>
|
|
21
|
+
<div class="ons-timeline__content">{{ item.content | safe }}</div>
|
|
23
22
|
{% endif %}
|
|
24
23
|
</div>
|
|
25
24
|
{% endfor %}
|
|
26
25
|
</div>
|
|
27
|
-
|
|
28
26
|
{% endmacro %}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
{% from "components/modal/_macro.njk" import onsModal %}
|
|
2
2
|
{% macro onsTimeoutModal(params) %}
|
|
3
|
-
{%
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
{%
|
|
4
|
+
call onsModal({
|
|
5
|
+
"title": params.title,
|
|
6
|
+
"btnText": params.btnText,
|
|
7
|
+
"classes": "ons-js-timeout-modal",
|
|
8
|
+
"attributes": {
|
|
9
|
+
"data-redirect-url": params.redirectUrl,
|
|
10
|
+
"data-server-session-expires-at": params.sessionExpiresAt,
|
|
11
|
+
"data-show-modal-time": params.showModalTimeInSeconds,
|
|
12
|
+
"data-server-session-expiry-endpoint": params.serverSessionExpiryEndpoint,
|
|
13
|
+
"data-countdown-text": params.countdownText,
|
|
14
|
+
"data-countdown-expired-text": params.countdownExpiredText,
|
|
15
|
+
"data-minutes-text-singular": params.minutesTextSingular,
|
|
16
|
+
"data-minutes-text-plural": params.minutesTextPlural,
|
|
17
|
+
"data-seconds-text-singular": params.secondsTextSingular,
|
|
18
|
+
"data-seconds-text-plural": params.secondsTextPlural,
|
|
19
|
+
"data-full-stop": params.endWithFullStop,
|
|
20
|
+
"aria-describedby": "timeout-time-remaining"
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
%}
|
|
22
24
|
<p>{{ params.textFirstLine }}</p>
|
|
23
25
|
<p class="ons-js-timeout-timer" aria-hidden="true" aria-relevant="additions"></p>
|
|
24
26
|
<p class="ons-js-timeout-timer-acc ons-u-vh" role="status" id="timeout-time-remaining"></p>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{% from "components/timeout-modal/_macro.njk" import onsTimeoutModal %}
|
|
2
2
|
|
|
3
3
|
<div style="min-height:20rem;">
|
|
4
|
-
{{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
{{
|
|
5
|
+
onsTimeoutModal({
|
|
6
|
+
"showModalTimeInSeconds": 60,
|
|
7
|
+
"redirectUrl": "#!",
|
|
8
|
+
"title": "You will be signed out soon",
|
|
9
|
+
"textFirstLine": "It appears you have been inactive for a while.",
|
|
10
|
+
"countdownText": "To protect your information, your progress will be saved and you will be signed out in",
|
|
11
|
+
"countdownExpiredText": "You are being signed out.",
|
|
12
|
+
"btnText": "Continue survey",
|
|
13
|
+
"minutesTextSingular": "minute",
|
|
14
|
+
"minutesTextPlural": "minutes",
|
|
15
|
+
"secondsTextSingular": "second",
|
|
16
|
+
"secondsTextPlural": "seconds",
|
|
17
|
+
"endWithFullStop": true
|
|
18
|
+
})
|
|
19
|
+
}}
|
|
18
20
|
</div>
|