@ons/design-system 62.0.1 → 62.1.0
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/README.md +0 -63
- package/components/access-code/example-access-code-error.njk +87 -0
- package/components/access-code/example-access-code.njk +63 -0
- package/components/accordion/example-accordion-open.njk +126 -0
- package/components/accordion/example-accordion.njk +25 -0
- package/components/address-input/example-address-input-editable.njk +52 -0
- package/components/address-input/example-address-input-manual.njk +23 -0
- package/components/address-input/example-address-input.njk +40 -0
- package/components/autosuggest/example-autosuggest-country-multiple.njk +30 -0
- package/components/autosuggest/example-autosuggest-country.njk +29 -0
- package/components/back-link/example-back-link.njk +17 -0
- package/components/breadcrumbs/example-breadcrumbs-single.njk +13 -0
- package/components/breadcrumbs/example-breadcrumbs.njk +17 -0
- package/components/button/_button.scss +5 -3
- package/components/button/example-button-custom.njk +20 -0
- package/components/button/example-button-disabled.njk +7 -0
- package/components/button/example-button-download.njk +9 -0
- package/components/button/example-button-ghost.njk +15 -0
- package/components/button/example-button-group.njk +16 -0
- package/components/button/example-button-link.njk +7 -0
- package/components/button/example-button-loader.njk +9 -0
- package/components/button/example-button-new-window.njk +12 -0
- package/components/button/example-button-print.njk +8 -0
- package/components/button/example-button-secondary-small.njk +8 -0
- package/components/button/example-button-secondary.njk +8 -0
- package/components/button/example-button-small.njk +8 -0
- package/components/button/example-button-timer.njk +9 -0
- package/components/button/example-button.njk +6 -0
- package/components/call-to-action/example-call-to-action-default.njk +14 -0
- package/components/card/example-card-set-with-images.njk +41 -0
- package/components/card/example-card-set-with-lists.njk +68 -0
- package/components/card/example-card-set.njk +38 -0
- package/components/card/example-card.njk +9 -0
- package/components/checkboxes/example-checkboxes-disabled.njk +34 -0
- package/components/checkboxes/example-checkboxes-error.njk +60 -0
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +177 -0
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +86 -0
- package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +69 -0
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +59 -0
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +51 -0
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +61 -0
- package/components/checkboxes/example-checkboxes-without-border.njk +33 -0
- package/components/checkboxes/example-checkboxes.njk +46 -0
- package/components/content-pagination/example-content-pagination.njk +20 -0
- package/components/cookies-banner/_macro.njk +4 -4
- package/components/cookies-banner/_macro.spec.js +41 -1
- package/components/cookies-banner/example-cookies-banner-cymraeg.njk +9 -0
- package/components/cookies-banner/example-cookies-banner.njk +7 -0
- package/components/date-input/example-date-input-error.njk +62 -0
- package/components/date-input/example-date-input.njk +36 -0
- package/components/details/example-details-with-saved-state.njk +10 -0
- package/components/details/example-details-with-warning.njk +19 -0
- package/components/details/example-details.njk +9 -0
- package/components/document-list/example-document-list-article-featured.njk +31 -0
- package/components/document-list/example-document-list-articles.njk +60 -0
- package/components/document-list/example-document-list-downloads.njk +59 -0
- package/components/document-list/example-document-list-search-result-featured.njk +19 -0
- package/components/document-list/example-document-list-search-results.njk +67 -0
- package/components/duration/example-duration-error.njk +30 -0
- package/components/duration/example-duration.njk +35 -0
- package/components/duration/examples-duration-error-for-single-field.njk +31 -0
- package/components/external-link/example-external-link.njk +8 -0
- package/components/feedback/example-feedback-call-to-action.njk +14 -0
- package/components/footer/example-footer-cymraeg.njk +54 -0
- package/components/footer/example-footer-default.njk +7 -0
- package/components/footer/example-footer-transactional.njk +62 -0
- package/components/footer/example-footer-warning.njk +32 -0
- package/components/footer/example-footer-with-alternative-organisation.njk +124 -0
- package/components/footer/example-footer-with-coat-of-arms.njk +32 -0
- package/components/footer/example-footer-with-copyright.njk +35 -0
- package/components/footer/example-footer.njk +85 -0
- package/components/header/_header.scss +2 -2
- package/components/header/_macro.spec.js +97 -0
- package/components/header/example-header-default.njk +12 -0
- package/components/header/example-header-external-for-survey-with-description.njk +20 -0
- package/components/header/example-header-external-for-surveys.njk +33 -0
- package/components/header/example-header-external-welsh.njk +29 -0
- package/components/header/example-header-external-with-navigation.njk +42 -0
- package/components/header/example-header-external-with-service-links.njk +35 -0
- package/components/header/example-header-external-with-sub-navigation.njk +132 -0
- package/components/header/example-header-internal.njk +32 -0
- package/components/header/example-header-neutral-for-multicoloured-logo.njk +59 -0
- package/components/hero/example-hero-dark.njk +15 -0
- package/components/hero/example-hero-default.njk +14 -0
- package/components/images/example-images-for-regular-screens.njk +8 -0
- package/components/images/example-images-for-retina-screens.njk +10 -0
- package/components/input/example-input-email.njk +12 -0
- package/components/input/example-input-number-prefixed.njk +17 -0
- package/components/input/example-input-number-suffixed.njk +34 -0
- package/components/input/example-input-number.njk +15 -0
- package/components/input/example-input-numeric-values.njk +64 -0
- package/components/input/example-input-telephone.njk +13 -0
- package/components/input/example-input-text-width-constrained.njk +11 -0
- package/components/input/example-input-text-with-character-limit-checker.njk +17 -0
- package/components/input/example-input-text-with-description.njk +10 -0
- package/components/input/example-input-text.njk +9 -0
- package/components/label/example-label-with-description.njk +8 -0
- package/components/label/example-label.njk +8 -0
- package/components/metadata/example-metadata.njk +57 -0
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +71 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +47 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date.njk +49 -0
- package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +45 -0
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +36 -0
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +63 -0
- package/components/mutually-exclusive/example-mutually-exclusive-number.njk +43 -0
- package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +40 -0
- package/components/navigation/_macro.njk +1 -1
- package/components/pagination/example-pagination-first.njk +24 -0
- package/components/pagination/example-pagination-last.njk +24 -0
- package/components/pagination/example-pagination-with-no-range-indicator.njk +42 -0
- package/components/pagination/example-pagination.njk +116 -0
- package/components/panel/example-panel-bare.njk +9 -0
- package/components/panel/example-panel-with-announcement.njk +18 -0
- package/components/panel/example-panel-with-error-details.njk +18 -0
- package/components/panel/example-panel-with-error-summary.njk +25 -0
- package/components/panel/example-panel-with-information.njk +7 -0
- package/components/panel/example-panel-with-spacious-information.njk +7 -0
- package/components/panel/example-panel-with-success-message.njk +10 -0
- package/components/panel/example-panel-with-warning.njk +8 -0
- package/components/password/example-password.njk +11 -0
- package/components/phase-banner/example-phase-banner-alpha.njk +10 -0
- package/components/phase-banner/example-phase-banner-beta.njk +9 -0
- package/components/question/example-question-ccs.njk +49 -0
- package/components/question/example-question-fieldset.njk +99 -0
- package/components/question/example-question-interviewer-note.njk +38 -0
- package/components/question/example-question-no-fieldset.njk +46 -0
- package/components/radios/example-radios-with-clear-button.njk +97 -0
- package/components/radios/example-radios-with-descriptions.njk +57 -0
- package/components/radios/example-radios-with-error.njk +38 -0
- package/components/radios/example-radios-with-revealed-checkboxes.njk +69 -0
- package/components/radios/example-radios-with-revealed-radios.njk +68 -0
- package/components/radios/example-radios-with-revealed-select.njk +69 -0
- package/components/radios/example-radios-with-revealed-text-input.njk +80 -0
- package/components/radios/example-radios-with-separator.njk +59 -0
- package/components/radios/example-radios-with-visible-text-input.njk +40 -0
- package/components/radios/example-radios-without-border.njk +48 -0
- package/components/radios/examples-radios.njk +38 -0
- package/components/related-content/example-related-content-general.njk +44 -0
- package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -0
- package/components/related-content/example-related-content-social-media.njk +40 -0
- package/components/relationships/example-relationships-error.njk +211 -0
- package/components/relationships/example-relationships-you.njk +187 -0
- package/components/relationships/example-relationships.njk +185 -0
- package/components/search/example-search-with-character-check.njk +23 -0
- package/components/search/example-search-with-placeholder.njk +16 -0
- package/components/search/example-search.njk +16 -0
- package/components/section-navigation/example-section-navigation-vertical.njk +40 -0
- package/components/section-navigation/example-section-navigation.njk +21 -0
- package/components/select/example-select-wide.njk +55 -0
- package/components/select/example-select-with-error.njk +58 -0
- package/components/select/example-select-with-inline-label.njk +23 -0
- package/components/select/example-select.njk +50 -0
- package/components/share-page/example-share-page.njk +11 -0
- package/components/skip-to-content/example-skip-to-content.njk +10 -0
- package/components/status/example-status-dead.njk +7 -0
- package/components/status/example-status-error.njk +7 -0
- package/components/status/example-status-neutral-information.njk +6 -0
- package/components/status/example-status-pending.njk +7 -0
- package/components/status/example-status-small.njk +8 -0
- package/components/status/example-status-success.njk +7 -0
- package/components/summary/example-summary-grouped-total.njk +67 -0
- package/components/summary/example-summary-grouped-with-errors.njk +96 -0
- package/components/summary/example-summary-grouped.njk +353 -0
- package/components/summary/example-summary-household-no-rows.njk +20 -0
- package/components/summary/example-summary-household.njk +77 -0
- package/components/summary/example-summary-hub.njk +170 -0
- package/components/summary/example-summary-multiple.njk +81 -0
- package/components/summary/example-summary-no-action.njk +40 -0
- package/components/summary/example-summary.njk +107 -0
- package/components/table/_macro.njk +1 -1
- package/components/table/_table.scss +10 -10
- package/components/table/example-table-basic.njk +47 -0
- package/components/table/example-table-compact.njk +73 -0
- package/components/table/example-table-footer.njk +56 -0
- package/components/table/example-table-numeric.njk +81 -0
- package/components/table/example-table-responsive.njk +89 -0
- package/components/table/example-table-scrollable.njk +158 -0
- package/components/table/example-table-sortable.njk +236 -0
- package/components/table/sortable-table.dom.js +1 -1
- package/components/table/sortable-table.js +5 -2
- package/components/table-of-contents/example-table-of-contents-grouped.njk +50 -0
- package/components/table-of-contents/example-table-of-contents-single.njk +39 -0
- package/components/table-of-contents/example-table-of-contents-sticky.njk +78 -0
- package/components/tabs/example-tabs-details.njk +59 -0
- package/components/tabs/example-tabs.njk +39 -0
- package/components/textarea/example-textarea-error.njk +16 -0
- package/components/textarea/example-textarea-with-character-limit.njk +18 -0
- package/components/textarea/example-textarea.njk +12 -0
- package/components/timeline/example-timeline.njk +35 -0
- package/components/timeout-modal/example-timeout-modal.njk +16 -0
- package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -0
- package/components/upload/example-upload-error.njk +16 -0
- package/components/upload/example-upload.njk +12 -0
- package/components/video/example-video.njk +14 -0
- package/css/main.css +3 -3
- package/css/print.css +1 -1
- package/layout/_template.njk +1 -12
- package/package.json +3 -8
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +2 -2
- package/scss/base/_typography.scss +2 -2
- package/scss/main.scss +0 -1
- package/scss/print.scss +13 -5
- package/scss/utilities/_highlight.scss +6 -0
- package/scss/utilities/_index.scss +1 -0
- package/components/code-highlight/_macro.njk +0 -5
- package/components/code-highlight/_macro.spec.js +0 -56
- package/components/code-highlight/code-highlight.spec.js +0 -18
- package/scss/patternlib.scss +0 -148
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "How do you usually travel to work?",
|
|
6
|
+
"classes": "ons-u-mt-no",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
}) %}
|
|
9
|
+
{{
|
|
10
|
+
onsRadios({
|
|
11
|
+
"dontWrap": true,
|
|
12
|
+
"name": "travel",
|
|
13
|
+
"radios": [
|
|
14
|
+
{
|
|
15
|
+
"id": "home",
|
|
16
|
+
"label": {
|
|
17
|
+
"text": "Work mainly from home"
|
|
18
|
+
},
|
|
19
|
+
"value": "home"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "car",
|
|
23
|
+
"label": {
|
|
24
|
+
"text": "Car or van"
|
|
25
|
+
},
|
|
26
|
+
"value": "car"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "underground",
|
|
30
|
+
"label": {
|
|
31
|
+
"text": "Underground, metro, light rail or tram"
|
|
32
|
+
},
|
|
33
|
+
"value": "underground"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "train",
|
|
37
|
+
"label": {
|
|
38
|
+
"text": "Train"
|
|
39
|
+
},
|
|
40
|
+
"value": "train"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "bus",
|
|
44
|
+
"label": {
|
|
45
|
+
"text": "Bus, minibus or coach"
|
|
46
|
+
},
|
|
47
|
+
"value": "bus"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "bicycle",
|
|
51
|
+
"label": {
|
|
52
|
+
"text": "Bicycle"
|
|
53
|
+
},
|
|
54
|
+
"value": "bicycle"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "walk",
|
|
58
|
+
"label": {
|
|
59
|
+
"text": "Walk"
|
|
60
|
+
},
|
|
61
|
+
"value": "walk"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "other-radio",
|
|
65
|
+
"label": {
|
|
66
|
+
"text": "Other"
|
|
67
|
+
},
|
|
68
|
+
"value": "other",
|
|
69
|
+
"other": {
|
|
70
|
+
"id": "other-textbox",
|
|
71
|
+
"name": "other-answer",
|
|
72
|
+
"label": {
|
|
73
|
+
"text": "Enter how you travel"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
}}
|
|
80
|
+
{% endcall %}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
2
|
+
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "How satisfied are you with this service?",
|
|
6
|
+
"legendIsQuestionTitle": true
|
|
7
|
+
}) %}
|
|
8
|
+
{{
|
|
9
|
+
onsRadios({
|
|
10
|
+
"dontWrap": true,
|
|
11
|
+
"name": "satisfaction",
|
|
12
|
+
"or": "Or",
|
|
13
|
+
"radios": [
|
|
14
|
+
{
|
|
15
|
+
"id": "very-satisfied",
|
|
16
|
+
"label": {
|
|
17
|
+
"text": "Very satisfied"
|
|
18
|
+
},
|
|
19
|
+
"value": "very-satisfied"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "somewhat-satisfied",
|
|
23
|
+
"label": {
|
|
24
|
+
"text": "Somewhat satisfied"
|
|
25
|
+
},
|
|
26
|
+
"value": "somewhat-satisfied"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "neither",
|
|
30
|
+
"label": {
|
|
31
|
+
"text": "Neither satisfied or dissatisfied"
|
|
32
|
+
},
|
|
33
|
+
"value": "neither"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "somewhat-dissatisfied",
|
|
37
|
+
"label": {
|
|
38
|
+
"text": "Somewhat dissatisfied"
|
|
39
|
+
},
|
|
40
|
+
"value": "somewhat-dissatisfied"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "very-dissatisfied",
|
|
44
|
+
"label": {
|
|
45
|
+
"text": "Very dissatisfied"
|
|
46
|
+
},
|
|
47
|
+
"value": "very-dissatisfied"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "no",
|
|
51
|
+
"label": {
|
|
52
|
+
"text": "I don’t want to give feedback"
|
|
53
|
+
},
|
|
54
|
+
"value": "no"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
}}
|
|
59
|
+
{% endcall %}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "Is the gender you identify with the same as your sex registered at birth?",
|
|
6
|
+
"classes": "ons-u-mt-no",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
}) %}
|
|
9
|
+
{{
|
|
10
|
+
onsRadios({
|
|
11
|
+
"dontWrap": true,
|
|
12
|
+
"name": "gender-identity",
|
|
13
|
+
"radios": [
|
|
14
|
+
{
|
|
15
|
+
"id": "yes",
|
|
16
|
+
"label": {
|
|
17
|
+
"text": "Yes"
|
|
18
|
+
},
|
|
19
|
+
"value": "yes"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "no",
|
|
23
|
+
"label": {
|
|
24
|
+
"text": "No"
|
|
25
|
+
},
|
|
26
|
+
"value": "no",
|
|
27
|
+
"other": {
|
|
28
|
+
"open": true,
|
|
29
|
+
"otherType": "input",
|
|
30
|
+
"id": "no-textbox",
|
|
31
|
+
"name": "no-answer",
|
|
32
|
+
"label": {
|
|
33
|
+
"text": "Enter your gender identity"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
}}
|
|
40
|
+
{% endcall %}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsRadios({
|
|
5
|
+
"name": "download-format",
|
|
6
|
+
"legend": "Select download format",
|
|
7
|
+
"borderless": true,
|
|
8
|
+
"radios": [
|
|
9
|
+
{
|
|
10
|
+
"id": "xls",
|
|
11
|
+
"label": {
|
|
12
|
+
"text": "XLS format (78.9 KB)",
|
|
13
|
+
"description": "Includes supporting information"
|
|
14
|
+
},
|
|
15
|
+
"value": "xls"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "csv",
|
|
19
|
+
"label": {
|
|
20
|
+
"text": "CSV format (554.7 KB)"
|
|
21
|
+
},
|
|
22
|
+
"value": "csv"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "csvw",
|
|
26
|
+
"label": {
|
|
27
|
+
"text": "CSVW format (1.9 KB)"
|
|
28
|
+
},
|
|
29
|
+
"value": "csvw"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "json",
|
|
33
|
+
"label": {
|
|
34
|
+
"text": "JSON file (10.9 KB)"
|
|
35
|
+
},
|
|
36
|
+
"value": "json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "supporting",
|
|
40
|
+
"label": {
|
|
41
|
+
"text": "Support information (2.6 KB)"
|
|
42
|
+
},
|
|
43
|
+
"value": "supporting"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
}}
|
|
48
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "What type of accommodation do you live in?",
|
|
6
|
+
"classes": "ons-u-mt-no",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
}) %}
|
|
9
|
+
{{
|
|
10
|
+
onsRadios({
|
|
11
|
+
"name": "property-type",
|
|
12
|
+
"dontWrap": true,
|
|
13
|
+
"radios": [
|
|
14
|
+
{
|
|
15
|
+
"id": "house",
|
|
16
|
+
"label": {
|
|
17
|
+
"text": "House or bungalow"
|
|
18
|
+
},
|
|
19
|
+
"value": "house"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "flat",
|
|
23
|
+
"label": {
|
|
24
|
+
"text": "Flat, maisonette or apartment"
|
|
25
|
+
},
|
|
26
|
+
"value": "flat"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "mobile",
|
|
30
|
+
"label": {
|
|
31
|
+
"text": "Caravan or other mobile or temporary structure"
|
|
32
|
+
},
|
|
33
|
+
"value": "mobile"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
}}
|
|
38
|
+
{% endcall %}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{% from "components/related-content/_macro.njk" import onsRelatedContent %}
|
|
2
|
+
{% from "components/related-content/_section-macro.njk" import onsRelatedContentSection %}
|
|
3
|
+
{% from "components/lists/_macro.njk" import onsList %}
|
|
4
|
+
|
|
5
|
+
{% call onsRelatedContent({
|
|
6
|
+
"ariaLabel": 'Related content'
|
|
7
|
+
}) %}
|
|
8
|
+
{% call onsRelatedContentSection() %}
|
|
9
|
+
<p class="ons-u-mb-xs">Telephone: 0800 587 2021</p>
|
|
10
|
+
|
|
11
|
+
{{
|
|
12
|
+
onsList({
|
|
13
|
+
"classes": 'ons-u-mb-no',
|
|
14
|
+
"variants": 'bare',
|
|
15
|
+
"itemsList": [
|
|
16
|
+
{
|
|
17
|
+
"text": 'Monday to Friday, 8am to 8pm'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"text": 'Saturday, 8am to 1pm'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
}}
|
|
25
|
+
{% endcall %}
|
|
26
|
+
{% call onsRelatedContentSection() %}
|
|
27
|
+
<p class="ons-u-mb-xs">Live chat</p>
|
|
28
|
+
|
|
29
|
+
{{
|
|
30
|
+
onsList({
|
|
31
|
+
"classes": 'ons-u-mb-no',
|
|
32
|
+
"variants": 'bare',
|
|
33
|
+
"itemsList": [
|
|
34
|
+
{
|
|
35
|
+
"text": 'Monday to Friday, 10am to 5pm'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"text": 'Saturday, 9am to 3pm'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
})
|
|
42
|
+
}}
|
|
43
|
+
{% endcall %}
|
|
44
|
+
{% endcall %}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{% from "components/related-content/_macro.njk" import onsRelatedContent %}
|
|
2
|
+
|
|
3
|
+
{{ onsRelatedContent({
|
|
4
|
+
"ariaLabel": 'Related content',
|
|
5
|
+
"rows": [
|
|
6
|
+
{
|
|
7
|
+
"id": 'related-help-with-the-census',
|
|
8
|
+
"title": 'Help with the census',
|
|
9
|
+
"itemsList": [
|
|
10
|
+
{
|
|
11
|
+
"text": 'I’m moving house',
|
|
12
|
+
"url": '#0'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"text": 'What if I’m away or abroad on Census Day?',
|
|
16
|
+
"url": '#0'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"text": 'Get an access code or paper census',
|
|
20
|
+
"url": '#0'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"text": 'Find a census support centre',
|
|
24
|
+
"url": '#0'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"text": 'Languages',
|
|
28
|
+
"url": '#0'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"text": 'Accessibility',
|
|
32
|
+
"url": '#0'
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": 'related-content',
|
|
38
|
+
"title": 'Related content',
|
|
39
|
+
"itemsList": [
|
|
40
|
+
{
|
|
41
|
+
"text": 'How we will contact or visit you',
|
|
42
|
+
"url": '#0'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"text": 'Media enquiries',
|
|
46
|
+
"url": '#0'
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}) }}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{% from "components/related-content/_macro.njk" import onsRelatedContent %}
|
|
2
|
+
|
|
3
|
+
{{ onsRelatedContent({
|
|
4
|
+
"ariaLabel": 'Social media links',
|
|
5
|
+
"rows": [
|
|
6
|
+
{
|
|
7
|
+
"id": 'follow-us',
|
|
8
|
+
"title": 'Follow us',
|
|
9
|
+
"variants": 'social',
|
|
10
|
+
"iconPosition": 'before',
|
|
11
|
+
"iconSize": 'xxl',
|
|
12
|
+
"itemsList": [
|
|
13
|
+
{
|
|
14
|
+
"url": '#0',
|
|
15
|
+
"text": 'Twitter',
|
|
16
|
+
"iconType": 'twitter',
|
|
17
|
+
"rel": 'noreferrer external'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"url": '#0',
|
|
21
|
+
"text": 'Facebook',
|
|
22
|
+
"iconType": 'facebook',
|
|
23
|
+
"rel": 'noreferrer external'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"url": '#0',
|
|
27
|
+
"text": 'Instagram',
|
|
28
|
+
"iconType": 'instagram',
|
|
29
|
+
"rel": 'noreferrer external'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"url": '#0',
|
|
33
|
+
"text": 'LinkedIn',
|
|
34
|
+
"iconType": 'linkedin',
|
|
35
|
+
"rel": 'noreferrer external'
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}) }}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Example: Third-person relationship question"
|
|
3
|
+
layout: ~
|
|
4
|
+
---
|
|
5
|
+
{% extends "layout/_template.njk" %}
|
|
6
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
7
|
+
{% from "components/relationships/_macro.njk" import onsRelationships %}
|
|
8
|
+
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
9
|
+
{% from "components/lists/_macro.njk" import onsList %}
|
|
10
|
+
|
|
11
|
+
{% set pageConfig = {
|
|
12
|
+
"header": {
|
|
13
|
+
"title": "Relationships example"
|
|
14
|
+
},
|
|
15
|
+
"breadcrumbs": {
|
|
16
|
+
"ariaLabel": 'Breadcrumbs',
|
|
17
|
+
"itemsList": [
|
|
18
|
+
{
|
|
19
|
+
"url": '#0',
|
|
20
|
+
"text": 'Previous'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
} %}
|
|
25
|
+
|
|
26
|
+
{% block main %}
|
|
27
|
+
|
|
28
|
+
{% call
|
|
29
|
+
onsPanel({
|
|
30
|
+
title: "There is a problem with your answer",
|
|
31
|
+
type: "error"
|
|
32
|
+
})
|
|
33
|
+
%}
|
|
34
|
+
{{
|
|
35
|
+
onsList({
|
|
36
|
+
"element": "ol",
|
|
37
|
+
"itemsList": [
|
|
38
|
+
{
|
|
39
|
+
"text": "Select a relationship",
|
|
40
|
+
"url": "#relationship-error",
|
|
41
|
+
"variants": "inPageLink"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
})
|
|
45
|
+
}}
|
|
46
|
+
{% endcall %}
|
|
47
|
+
{% call onsQuestion({
|
|
48
|
+
"title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>…</em>",
|
|
49
|
+
"description": "<p>Complete the sentence by selecting the appropriate relationship</p>",
|
|
50
|
+
"readDescriptionFirst": true,
|
|
51
|
+
"legendIsQuestionTitle": true,
|
|
52
|
+
"legendTitleClasses": "ons-js-relationships-legend",
|
|
53
|
+
"submitButton": true
|
|
54
|
+
}) %}
|
|
55
|
+
{{ onsRelationships({
|
|
56
|
+
"playback": "Amanda Bloggs is Joe Bloggs' <em>…</em>",
|
|
57
|
+
"name": "relationship",
|
|
58
|
+
"dontWrap": true,
|
|
59
|
+
"error": {
|
|
60
|
+
"id": "relationship-error",
|
|
61
|
+
"text": "Select a relationship"
|
|
62
|
+
},
|
|
63
|
+
"radios": [
|
|
64
|
+
{
|
|
65
|
+
"id": "husband-wife",
|
|
66
|
+
"value": "husband-wife",
|
|
67
|
+
"label": {
|
|
68
|
+
"text": "Husband or wife"
|
|
69
|
+
},
|
|
70
|
+
"attributes": {
|
|
71
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>husband or wife</em>",
|
|
72
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>husband or wife</em>"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "civil-partner",
|
|
77
|
+
"value": "civil-partner",
|
|
78
|
+
"label": {
|
|
79
|
+
"text": "Legally registered civil partner"
|
|
80
|
+
},
|
|
81
|
+
"attributes": {
|
|
82
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>legally registered civil partner</em>",
|
|
83
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>legally registered civil partner</em>"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "partner",
|
|
88
|
+
"value": "partner",
|
|
89
|
+
"label": {
|
|
90
|
+
"text": "Partner"
|
|
91
|
+
},
|
|
92
|
+
"attributes": {
|
|
93
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>partner</em>",
|
|
94
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>partner</em>"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "son-daughter",
|
|
99
|
+
"value": "son-daughter",
|
|
100
|
+
"label": {
|
|
101
|
+
"text": "Son or daughter"
|
|
102
|
+
},
|
|
103
|
+
"attributes": {
|
|
104
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>son or daughter</em>",
|
|
105
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>son or daughter</em>"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "stepchild",
|
|
110
|
+
"value": "stepchild",
|
|
111
|
+
"label": {
|
|
112
|
+
"text": "Stepchild"
|
|
113
|
+
},
|
|
114
|
+
"attributes": {
|
|
115
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepchild</em>",
|
|
116
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepchild</em>"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "brother-sister",
|
|
121
|
+
"value": "brother-sister",
|
|
122
|
+
"label": {
|
|
123
|
+
"text": "Brother or sister"
|
|
124
|
+
},
|
|
125
|
+
"attributes": {
|
|
126
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>brother or sister</em>",
|
|
127
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>brother or sister</em>"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "stepbrother-stepsister",
|
|
132
|
+
"value": "stepbrother-stepsister",
|
|
133
|
+
"label": {
|
|
134
|
+
"text": "Stepbrother or stepsister"
|
|
135
|
+
},
|
|
136
|
+
"attributes": {
|
|
137
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepbrother or sister</em>",
|
|
138
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepbrother or sister</em>"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "mother-father",
|
|
143
|
+
"value": "mother-father",
|
|
144
|
+
"label": {
|
|
145
|
+
"text": "Mother or father"
|
|
146
|
+
},
|
|
147
|
+
"attributes": {
|
|
148
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>mother or father</em>",
|
|
149
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>mother or father</em>"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "stepmother-stepfather",
|
|
154
|
+
"value": "stepmother-stepfather",
|
|
155
|
+
"label": {
|
|
156
|
+
"text": "Stepmother or stepfather"
|
|
157
|
+
},
|
|
158
|
+
"attributes": {
|
|
159
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepmother or stepfather</em>",
|
|
160
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepmother or stepfather</em>"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "grandchild",
|
|
165
|
+
"value": "grandchild",
|
|
166
|
+
"label": {
|
|
167
|
+
"text": "Grandchild"
|
|
168
|
+
},
|
|
169
|
+
"attributes": {
|
|
170
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandchild</em>",
|
|
171
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandchild</em>"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "grandparent",
|
|
176
|
+
"value": "grandparent",
|
|
177
|
+
"label": {
|
|
178
|
+
"text": "Grandparent"
|
|
179
|
+
},
|
|
180
|
+
"attributes": {
|
|
181
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandparents</em>",
|
|
182
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandparents</em>"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "other-relation",
|
|
187
|
+
"value": "other-relation",
|
|
188
|
+
"label": {
|
|
189
|
+
"text": "Other relation"
|
|
190
|
+
},
|
|
191
|
+
"attributes": {
|
|
192
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>",
|
|
193
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>other relation</em>"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "unrelated",
|
|
198
|
+
"value": "unrelated",
|
|
199
|
+
"label": {
|
|
200
|
+
"text": "Unrelated",
|
|
201
|
+
"description": "Including foster child"
|
|
202
|
+
},
|
|
203
|
+
"attributes": {
|
|
204
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <em>unrelated</em> to Joe Bloggs",
|
|
205
|
+
"data-playback": "Amanda Bloggs is <em>unrelated</em> to Joe Bloggs"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}) }}
|
|
210
|
+
{% endcall %}
|
|
211
|
+
{% endblock %}
|