@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,185 +1,191 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Third-person relationship question'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
{% extends "layout/_template.njk" %}
|
|
6
7
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
7
8
|
{% from "components/relationships/_macro.njk" import onsRelationships %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
{%
|
|
10
|
+
set pageConfig = {
|
|
11
|
+
"header": {
|
|
12
|
+
"title": "Relationships example"
|
|
13
|
+
},
|
|
14
|
+
"breadcrumbs": {
|
|
15
|
+
"ariaLabel": 'Breadcrumbs',
|
|
16
|
+
"itemsList": [
|
|
17
|
+
{
|
|
18
|
+
"url": '#0',
|
|
19
|
+
"text": 'Previous'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
%}
|
|
23
25
|
|
|
24
26
|
{% block main %}
|
|
25
|
-
{%
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
27
|
+
{%
|
|
28
|
+
call onsQuestion({
|
|
29
|
+
"title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>…</strong>",
|
|
30
|
+
"description": "<p>Complete the sentence by selecting the appropriate relationship</p>",
|
|
31
|
+
"readDescriptionFirst": true,
|
|
32
|
+
"legendIsQuestionTitle": true,
|
|
33
|
+
"legendTitleClasses": "ons-js-relationships-legend",
|
|
34
|
+
"submitButton": true
|
|
35
|
+
})
|
|
36
|
+
%}
|
|
37
|
+
{{
|
|
38
|
+
onsRelationships({
|
|
39
|
+
"playback": "Amanda Bloggs is Joe Bloggs' <strong>…</strong>",
|
|
40
|
+
"name": "relationship",
|
|
41
|
+
"dontWrap": true,
|
|
42
|
+
"radios": [
|
|
43
|
+
{
|
|
44
|
+
"id": "husband-wife-example-relationships",
|
|
45
|
+
"value": "husband-wife",
|
|
46
|
+
"label": {
|
|
47
|
+
"text": "Husband or wife"
|
|
48
|
+
},
|
|
49
|
+
"attributes": {
|
|
50
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>husband or wife</strong>",
|
|
51
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>husband or wife</strong>"
|
|
52
|
+
}
|
|
43
53
|
},
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
{
|
|
55
|
+
"id": "civil-partner-example-relationships",
|
|
56
|
+
"value": "civil-partner",
|
|
57
|
+
"label": {
|
|
58
|
+
"text": "Legally registered civil partner"
|
|
59
|
+
},
|
|
60
|
+
"attributes": {
|
|
61
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>legally registered civil partner</strong>",
|
|
62
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>legally registered civil partner</strong>"
|
|
63
|
+
}
|
|
54
64
|
},
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
{
|
|
66
|
+
"id": "partner-example-relationships",
|
|
67
|
+
"value": "partner",
|
|
68
|
+
"label": {
|
|
69
|
+
"text": "Partner"
|
|
70
|
+
},
|
|
71
|
+
"attributes": {
|
|
72
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>partner</strong>",
|
|
73
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>partner</strong>"
|
|
74
|
+
}
|
|
65
75
|
},
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
{
|
|
77
|
+
"id": "son-daughter-example-relationships",
|
|
78
|
+
"value": "son-daughter",
|
|
79
|
+
"label": {
|
|
80
|
+
"text": "Son or daughter"
|
|
81
|
+
},
|
|
82
|
+
"attributes": {
|
|
83
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>son or daughter</strong>",
|
|
84
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>son or daughter</strong>"
|
|
85
|
+
}
|
|
76
86
|
},
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
{
|
|
88
|
+
"id": "stepchild-example-relationships",
|
|
89
|
+
"value": "stepchild",
|
|
90
|
+
"label": {
|
|
91
|
+
"text": "Stepchild"
|
|
92
|
+
},
|
|
93
|
+
"attributes": {
|
|
94
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepchild</strong>",
|
|
95
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepchild</strong>"
|
|
96
|
+
}
|
|
87
97
|
},
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
{
|
|
99
|
+
"id": "brother-sister-example-relationships",
|
|
100
|
+
"value": "brother-sister",
|
|
101
|
+
"label": {
|
|
102
|
+
"text": "Brother or sister"
|
|
103
|
+
},
|
|
104
|
+
"attributes": {
|
|
105
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>brother or sister</strong>",
|
|
106
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>brother or sister</strong>"
|
|
107
|
+
}
|
|
98
108
|
},
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
"attributes": {
|
|
111
|
-
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepbrother or sister</strong>",
|
|
112
|
-
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepbrother or sister</strong>"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"id": "mother-father-example-relationships",
|
|
117
|
-
"value": "mother-father",
|
|
118
|
-
"label": {
|
|
119
|
-
"text": "Mother or father"
|
|
109
|
+
{
|
|
110
|
+
"id": "stepbrother-stepsister-example-relationships",
|
|
111
|
+
"value": "stepbrother-stepsister",
|
|
112
|
+
"label": {
|
|
113
|
+
"text": "Stepbrother or stepsister"
|
|
114
|
+
},
|
|
115
|
+
"attributes": {
|
|
116
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepbrother or sister</strong>",
|
|
117
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepbrother or sister</strong>"
|
|
118
|
+
}
|
|
120
119
|
},
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
120
|
+
{
|
|
121
|
+
"id": "mother-father-example-relationships",
|
|
122
|
+
"value": "mother-father",
|
|
123
|
+
"label": {
|
|
124
|
+
"text": "Mother or father"
|
|
125
|
+
},
|
|
126
|
+
"attributes": {
|
|
127
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>mother or father</strong>",
|
|
128
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>mother or father</strong>"
|
|
129
|
+
}
|
|
131
130
|
},
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
{
|
|
132
|
+
"id": "stepmother-stepfather-example-relationships",
|
|
133
|
+
"value": "stepmother-stepfather",
|
|
134
|
+
"label": {
|
|
135
|
+
"text": "Stepmother or stepfather"
|
|
136
|
+
},
|
|
137
|
+
"attributes": {
|
|
138
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepmother or stepfather</strong>",
|
|
139
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepmother or stepfather</strong>"
|
|
140
|
+
}
|
|
142
141
|
},
|
|
143
|
-
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
{
|
|
143
|
+
"id": "grandchild-example-relationships",
|
|
144
|
+
"value": "grandchild",
|
|
145
|
+
"label": {
|
|
146
|
+
"text": "Grandchild"
|
|
147
|
+
},
|
|
148
|
+
"attributes": {
|
|
149
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandchild</strong>",
|
|
150
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandchild</strong>"
|
|
151
|
+
}
|
|
153
152
|
},
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
{
|
|
154
|
+
"id": "grandparent-example-relationships",
|
|
155
|
+
"value": "grandparent",
|
|
156
|
+
"label": {
|
|
157
|
+
"text": "Grandparent"
|
|
158
|
+
},
|
|
159
|
+
"attributes": {
|
|
160
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandparents</strong>",
|
|
161
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandparents</strong>"
|
|
162
|
+
}
|
|
164
163
|
},
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"description": "Including foster child"
|
|
164
|
+
{
|
|
165
|
+
"id": "other-relation-example-relationships",
|
|
166
|
+
"value": "other-relation",
|
|
167
|
+
"label": {
|
|
168
|
+
"text": "Other relation"
|
|
169
|
+
},
|
|
170
|
+
"attributes": {
|
|
171
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>",
|
|
172
|
+
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>"
|
|
173
|
+
}
|
|
176
174
|
},
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
"
|
|
175
|
+
{
|
|
176
|
+
"id": "unrelated-example-relationships",
|
|
177
|
+
"value": "unrelated",
|
|
178
|
+
"label": {
|
|
179
|
+
"text": "Unrelated",
|
|
180
|
+
"description": "Including foster child"
|
|
181
|
+
},
|
|
182
|
+
"attributes": {
|
|
183
|
+
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs",
|
|
184
|
+
"data-playback": "Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs"
|
|
185
|
+
}
|
|
180
186
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
}}
|
|
184
190
|
{% endcall %}
|
|
185
191
|
{% endblock %}
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
{% macro onsSectionNavigation(params) %}
|
|
2
2
|
{% set headingLevel = params.headingLevel | default(2) %}
|
|
3
3
|
{% set sectionTitleHeadingLevel = headingLevel + 1 %}
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
{% set openingHeadingTag = "<h" + headingLevel | string %}
|
|
5
|
+
{% set closingHeadingTag = "</h" + headingLevel | string + ">" %}
|
|
6
|
+
|
|
7
|
+
<nav
|
|
8
|
+
class="ons-section-nav{{ ' ons-section-nav--vertical' if params.variants == 'vertical' }}{{ ' ' + params.classes if params.classes else '' }}"
|
|
9
|
+
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
10
|
+
aria-labelledby="{{ params.hiddenTitleId | default('section-menu-nav-title') }}"
|
|
11
|
+
>
|
|
12
|
+
{{ openingHeadingTag | safe }} class="ons-u-vh"
|
|
13
|
+
id="{{ params.hiddenTitleId | default('section-menu-nav-title') }}">{{ params.hiddenTitle | default("Pages in this section") }}{{ closingHeadingTag | safe }}
|
|
6
14
|
{% if params.sections %}
|
|
7
15
|
{% for section in params.sections %}
|
|
8
16
|
{% set sectionItemHeadingLevel = headingLevel + 2 if section.title else headingLevel + 1 %}
|
|
9
17
|
<div class="ons-section-nav__sub">
|
|
10
18
|
{% if section.title %}
|
|
11
|
-
|
|
19
|
+
{{ openingHeadingTag | replace(headingLevel, sectionTitleHeadingLevel | string) | safe }}
|
|
20
|
+
class="ons-u-fs-r--b
|
|
21
|
+
ons-u-mb-s">{{ section.title }}{{ closingHeadingTag | replace(headingLevel, sectionTitleHeadingLevel | string) | safe }}
|
|
12
22
|
{% endif %}
|
|
13
23
|
<ul class="ons-section-nav__list">
|
|
14
24
|
{% for item in section.itemsList %}
|
|
15
|
-
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title|lower) %}
|
|
25
|
+
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title | lower) %}
|
|
16
26
|
{% set isCurrent = true %}
|
|
17
27
|
{% else %}
|
|
18
28
|
{% set isCurrent = false %}
|
|
19
29
|
{% endif %}
|
|
20
|
-
<li
|
|
30
|
+
<li
|
|
31
|
+
class="ons-section-nav__item{{ ' ' + item.classes if item.classes else '' }}{{ ' ons-section-nav__item--active' if isCurrent == true }}"
|
|
32
|
+
>
|
|
21
33
|
{% if isCurrent == true %}
|
|
22
|
-
|
|
34
|
+
{{ openingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
35
|
+
class="ons-section-nav__link ons-section-nav__item-header" href="{{ item.url }}"
|
|
36
|
+
aria-current="location">{{ item.title }}{{ closingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
23
37
|
{% else %}
|
|
24
38
|
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.title }}</a>
|
|
25
39
|
{% endif %}
|
|
@@ -27,7 +41,9 @@
|
|
|
27
41
|
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-xs ons-u-mb-xs">
|
|
28
42
|
{% for anchor in item.anchors %}
|
|
29
43
|
<li class="ons-section-nav__item ons-list__item">
|
|
30
|
-
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link"
|
|
44
|
+
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link"
|
|
45
|
+
>{{ anchor.title }}</a
|
|
46
|
+
>
|
|
31
47
|
</li>
|
|
32
48
|
{% endfor %}
|
|
33
49
|
</ul>
|
|
@@ -39,19 +55,25 @@
|
|
|
39
55
|
{% endfor %}
|
|
40
56
|
{% else %}
|
|
41
57
|
{% if params.title %}
|
|
42
|
-
|
|
58
|
+
{{ openingHeadingTag | replace(headingLevel, sectionTitleHeadingLevel | string) | safe }}
|
|
59
|
+
class="ons-u-fs-r--b
|
|
60
|
+
ons-u-mb-s">{{ params.title }}{{ closingHeadingTag | replace(headingLevel, sectionTitleHeadingLevel | string) }}
|
|
43
61
|
{% endif %}
|
|
44
62
|
<ul class="ons-section-nav__list">
|
|
45
63
|
{% for item in params.itemsList %}
|
|
46
64
|
{% set sectionItemHeadingLevel = headingLevel + 2 if params.title else headingLevel + 1 %}
|
|
47
|
-
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title|lower) %}
|
|
65
|
+
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.title | lower) %}
|
|
48
66
|
{% set isCurrent = true %}
|
|
49
67
|
{% else %}
|
|
50
68
|
{% set isCurrent = false %}
|
|
51
69
|
{% endif %}
|
|
52
|
-
<li
|
|
53
|
-
{% if isCurrent == true %}
|
|
54
|
-
|
|
70
|
+
<li
|
|
71
|
+
class="ons-section-nav__item{{ ' ' + item.classes if item.classes else '' }}{% if isCurrent == true %}{{ ' ' }}ons-section-nav__item--active{% endif %}"
|
|
72
|
+
>
|
|
73
|
+
{% if isCurrent == true %}
|
|
74
|
+
{{ openingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
75
|
+
class="ons-section-nav__link ons-section-nav__item-header" href="{{ item.url }}"
|
|
76
|
+
aria-current="location">{{ item.title }}{{ closingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
55
77
|
{% else %}
|
|
56
78
|
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.title }}</a>
|
|
57
79
|
{% endif %}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
{% from "components/field/_macro.njk" import onsField %}
|
|
3
3
|
{% from "components/label/_macro.njk" import onsLabel %}
|
|
4
4
|
|
|
5
|
-
{%
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
{%
|
|
6
|
+
call onsField({
|
|
7
|
+
"id": params.fieldId,
|
|
8
|
+
"classes": params.fieldClasses,
|
|
9
|
+
"legendClasses": params.legendClasses,
|
|
10
|
+
"dontWrap": params.dontWrap,
|
|
11
|
+
"error": params.error,
|
|
12
|
+
"inline": params.label.inline if params.label
|
|
13
|
+
})
|
|
14
|
+
%}
|
|
13
15
|
{{
|
|
14
16
|
onsLabel({
|
|
15
17
|
"for": params.id,
|
|
@@ -21,18 +23,19 @@
|
|
|
21
23
|
<select
|
|
22
24
|
id="{{ params.id }}"
|
|
23
25
|
name="{{ params.name }}"
|
|
24
|
-
class="ons-input ons-input--select{
|
|
25
|
-
{% 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 %}
|
|
26
|
+
class="ons-input ons-input--select{{ ' ' + params.classes if params.classes else '' }}{{ ' ons-input--error' if params.error }}"
|
|
27
|
+
{% 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 %}
|
|
26
28
|
>
|
|
27
29
|
{% for option in params.options %}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
<option
|
|
31
|
+
value="{{ option.value | default(option.text) }}"
|
|
32
|
+
{% if option.id %}{{ ' ' }}id="{{ option.id }}"{% endif %}
|
|
33
|
+
{% if option.selected %}{{ ' ' }}selected{% endif %}
|
|
34
|
+
{% if option.disabled %}{{ ' ' }}disabled{% endif %}
|
|
35
|
+
{% if option.attributes %}{% for attribute, value in option.attributes %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
|
|
36
|
+
>
|
|
37
|
+
{{- option.text -}}
|
|
38
|
+
</option>
|
|
36
39
|
{% endfor %}
|
|
37
40
|
</select>
|
|
38
41
|
{% endcall %}
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
{% if params.title %}
|
|
5
5
|
{% set titleTag = params.titleTag | default("h2") %}
|
|
6
|
-
|
|
6
|
+
{% set openingTag = "<" + titleTag %}
|
|
7
|
+
{% set closingTag = "</" + titleTag + ">" %}
|
|
8
|
+
{{ openingTag | safe }}
|
|
9
|
+
class="ons-u-fs-r--b ons-u-mb-xs">{{ params.title }}{{ closingTag | safe }}
|
|
7
10
|
{% endif %}
|
|
8
11
|
|
|
9
12
|
{% if params.facebook and params.facebook == true %}
|
|
10
|
-
{%
|
|
13
|
+
{%
|
|
14
|
+
set facebook =
|
|
11
15
|
{
|
|
12
16
|
"url": 'https://www.facebook.com/sharer/sharer.php?u=' ~ params.pageURL|urlencode,
|
|
13
17
|
"text": 'Facebook',
|
|
@@ -15,10 +19,11 @@
|
|
|
15
19
|
"rel": 'noreferrer external',
|
|
16
20
|
"target": '_blank'
|
|
17
21
|
}
|
|
18
|
-
|
|
22
|
+
%}
|
|
19
23
|
{% endif %}
|
|
20
24
|
{% if params.twitter and params.twitter == true %}
|
|
21
|
-
{%
|
|
25
|
+
{%
|
|
26
|
+
set twitter =
|
|
22
27
|
{
|
|
23
28
|
"url": 'https://twitter.com/intent/tweet?original_referer&text=' ~ params.pageTitle|urlencode ~ '&url=' ~ params.pageURL|urlencode,
|
|
24
29
|
"text": 'Twitter',
|
|
@@ -26,7 +31,7 @@
|
|
|
26
31
|
"rel": 'noreferrer external',
|
|
27
32
|
"target": '_blank'
|
|
28
33
|
}
|
|
29
|
-
|
|
34
|
+
%}
|
|
30
35
|
{% endif %}
|
|
31
36
|
{{
|
|
32
37
|
onsList({
|