@ons/design-system 53.0.1 → 53.0.4
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/footer/_macro.njk +8 -4
- package/components/navigation/_macro.njk +4 -4
- package/components/navigation/_macro.spec.js +20 -0
- package/favicons/ids/cy/android-chrome-192x192.png +0 -0
- package/favicons/ids/cy/android-chrome-512x512.png +0 -0
- package/favicons/ids/cy/apple-touch-icon.png +0 -0
- package/favicons/ids/cy/browserconfig.xml +12 -0
- package/favicons/ids/cy/favicon-16x16.png +0 -0
- package/favicons/ids/cy/favicon-32x32.png +0 -0
- package/favicons/ids/cy/favicon.ico +0 -0
- package/favicons/ids/cy/manifest.json +20 -0
- package/favicons/ids/cy/mstile-150x150.png +0 -0
- package/favicons/ids/cy/mstile-310x150.png +0 -0
- package/favicons/ids/cy/mstile-310x310.png +0 -0
- package/favicons/ids/cy/mstile-70x70.png +0 -0
- package/favicons/ids/cy/opengraph.png +0 -0
- package/favicons/ids/cy/safari-pinned-tab.svg +27 -0
- package/favicons/ids/cy/site.webmanifest +54 -0
- package/favicons/ids/cy/twitter.png +0 -0
- package/favicons/ids/en/android-chrome-192x192.png +0 -0
- package/favicons/ids/en/android-chrome-512x512.png +0 -0
- package/favicons/ids/en/apple-touch-icon.png +0 -0
- package/favicons/ids/en/browserconfig.xml +12 -0
- package/favicons/ids/en/favicon-16x16.png +0 -0
- package/favicons/ids/en/favicon-32x32.png +0 -0
- package/favicons/ids/en/favicon.ico +0 -0
- package/favicons/ids/en/manifest.json +20 -0
- package/favicons/ids/en/mstile-150x150.png +0 -0
- package/favicons/ids/en/mstile-310x150.png +0 -0
- package/favicons/ids/en/mstile-310x310.png +0 -0
- package/favicons/ids/en/mstile-70x70.png +0 -0
- package/favicons/ids/en/opengraph.png +0 -0
- package/favicons/ids/en/safari-pinned-tab.svg +27 -0
- package/favicons/ids/en/site.webmanifest +54 -0
- package/favicons/ids/en/twitter.png +0 -0
- package/js/cookies-settings.js +5 -3
- package/js/cookies-settings.spec.js +25 -1
- package/layout/_template.njk +3 -2
- package/package.json +1 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
|
@@ -38,8 +38,6 @@
|
|
|
38
38
|
"altTextId": 'poweredby-alt'
|
|
39
39
|
})
|
|
40
40
|
}}
|
|
41
|
-
{% else %}
|
|
42
|
-
{{ onsLogo | safe }}
|
|
43
41
|
{% endif %}
|
|
44
42
|
{% endset %}
|
|
45
43
|
|
|
@@ -177,9 +175,15 @@
|
|
|
177
175
|
</div>
|
|
178
176
|
{% endif %}
|
|
179
177
|
|
|
180
|
-
{% if
|
|
178
|
+
{% if params.poweredBy is defined and params.poweredBy %}
|
|
179
|
+
{% if not params.poweredBy.partnership %}
|
|
180
|
+
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
181
|
+
{{ poweredByLogo | safe }}
|
|
182
|
+
</div>
|
|
183
|
+
{% endif %}
|
|
184
|
+
{% else %}
|
|
181
185
|
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
182
|
-
{{
|
|
186
|
+
{{ onsLogo | safe }}
|
|
183
187
|
</div>
|
|
184
188
|
{% endif %}
|
|
185
189
|
</div>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<ul class="ons-navigation__list">
|
|
43
43
|
{% for item in (params.navigation.itemsList if params.navigation.itemsList is iterable else params.navigation.itemsList.items()) %}
|
|
44
44
|
<li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.currentPath) or (item.url != (params.navigation.siteBasePath | default('/')) and item.url in params.navigation.currentPath) }}">
|
|
45
|
-
<a class="ons-navigation__link" href="{{ item.url }}" {% if item.id is defined and item.id %}id="{{ item.id }}" {% endif %}>{{ item.title }}</a>
|
|
45
|
+
<a class="ons-navigation__link" href="{{ item.url }}" {% if item.id is defined and item.id %}id="{{ item.id }}" {% endif %}{% if item.ariaLabel is defined and item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %}>{{ item.title }}</a>
|
|
46
46
|
</li>
|
|
47
47
|
{% endfor %}
|
|
48
48
|
</ul>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<ul class="ons-navigation__list ons-navigation__list">
|
|
56
56
|
{% for item in (params.navigation.subNavigation.itemsList if params.navigation.subNavigation.itemsList is iterable else params.navigation.subNavigation.itemsList.items()) %}
|
|
57
57
|
<li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.subNavigation.currentPath) or (item.url != (params.navigation.subNavigation.siteBasePath | default('/')) and item.url in params.navigation.subNavigation.currentPath) }}">
|
|
58
|
-
<a class="ons-navigation__link ons-navigation__link" href="{{ item.url }}" {% if item.id is defined and item.id %}id="{{ item.id }}" {% endif %}>{{ item.title }}</a>
|
|
58
|
+
<a class="ons-navigation__link ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel is defined and item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id is defined and item.id %}id="{{ item.id }}" {% endif %}>{{ item.title }}</a>
|
|
59
59
|
</li>
|
|
60
60
|
{% endfor %}
|
|
61
61
|
</ul>
|
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
</li>
|
|
82
82
|
{% for item in (params.navigation.subNavigation.itemsList if params.navigation.subNavigation.itemsList is iterable else params.navigation.subNavigation.itemsList.items()) %}
|
|
83
83
|
<li class="ons-navigation__item {{ ' ons-navigation__item--active' if (item.url == params.navigation.subNavigation.currentPath) or (item.url != (params.navigation.subNavigation.siteBasePath | default('/')) and item.url in params.navigation.subNavigation.currentPath) }}">
|
|
84
|
-
<a class="ons-navigation__link" href="{{ item.url }}" {% if item.id is defined and item.id %}id="{{ item.id }}--mobile" {% endif %}>{{ item.title }}</a>
|
|
84
|
+
<a class="ons-navigation__link" href="{{ item.url }}" {% if item.ariaLabel is defined and item.ariaLabel %}aria-label="{{ item.ariaLabel }}" {% endif %} {% if item.id is defined and item.id %}id="{{ item.id }}--mobile" {% endif %}>{{ item.title }}</a>
|
|
85
85
|
{% if item.sections %}
|
|
86
86
|
{% for section in item.sections %}
|
|
87
87
|
{% if section.sectionTitle %}<h3 class="ons-navigation__list-header">{{ section.sectionTitle }}</h3>{% endif %}
|
|
88
88
|
<ul class="ons-navigation__list ons-navigation__list--child ons-list--dashed ons-u-ml-s ons-u-mt-xs">
|
|
89
89
|
{% for child in section.children %}
|
|
90
90
|
<li class="ons-navigation__item ons-list__item {{ ' ons-navigation__item--active' if (child.url == params.navigation.subNavigation.currentPath) or (child.url != (params.navigation.subNavigation.sitsiteBasePatheBasePath | default('/')) and child.url in params.navigation.subNavigation.currentPath) }}">
|
|
91
|
-
<a class="ons-navigation__link ons-navigation__link--section" href="{{ child.url }}" {% if child.id is defined and child.id %}id="{{ child.id }}" {% endif %}>{{ child.title }}</a>
|
|
91
|
+
<a class="ons-navigation__link ons-navigation__link--section" href="{{ child.url }}" {% if child.ariaLabel is defined and child.ariaLabel %}aria-label="{{ child.ariaLabel }}" {% endif %} {% if child.id is defined and child.id %}id="{{ child.id }}" {% endif %}>{{ child.title }}</a>
|
|
92
92
|
</li>
|
|
93
93
|
{% endfor %}
|
|
94
94
|
</ul>
|
|
@@ -14,12 +14,14 @@ const PARAMS = {
|
|
|
14
14
|
itemsList: [
|
|
15
15
|
{
|
|
16
16
|
title: 'Main nav item 1',
|
|
17
|
+
ariaLabel: 'Main nav ariaLabel 1',
|
|
17
18
|
url: '#0',
|
|
18
19
|
classes: 'custom-class-main-item-1',
|
|
19
20
|
id: 'main-item-1',
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
title: 'Main nav item 2',
|
|
24
|
+
ariaLabel: 'Main nav ariaLabel 2',
|
|
23
25
|
url: '#1',
|
|
24
26
|
classes: 'custom-class-main-item-2',
|
|
25
27
|
id: 'main-item-2',
|
|
@@ -34,12 +36,14 @@ const PARAMS = {
|
|
|
34
36
|
itemsList: [
|
|
35
37
|
{
|
|
36
38
|
title: 'Sub nav item 1',
|
|
39
|
+
ariaLabel: 'Sub nav ariaLabel 1',
|
|
37
40
|
url: '#0',
|
|
38
41
|
classes: 'custom-class-sub-item-1',
|
|
39
42
|
id: 'sub-item-1',
|
|
40
43
|
},
|
|
41
44
|
{
|
|
42
45
|
title: 'Sub nav item 2',
|
|
46
|
+
ariaLabel: 'Sub nav ariaLabel 2',
|
|
43
47
|
url: '#1',
|
|
44
48
|
classes: 'custom-class-sub-item-2',
|
|
45
49
|
id: 'sub-item-2',
|
|
@@ -49,10 +53,12 @@ const PARAMS = {
|
|
|
49
53
|
children: [
|
|
50
54
|
{
|
|
51
55
|
title: 'Child item 1',
|
|
56
|
+
ariaLabel: 'Child item ariaLabel 1',
|
|
52
57
|
url: '#0',
|
|
53
58
|
},
|
|
54
59
|
{
|
|
55
60
|
title: 'Child item 2',
|
|
61
|
+
ariaLabel: 'Child item ariaLabel 2',
|
|
56
62
|
url: '#1',
|
|
57
63
|
},
|
|
58
64
|
],
|
|
@@ -157,6 +163,13 @@ describe('macro: navigation', () => {
|
|
|
157
163
|
expect(values).toEqual(['Main nav item 1', 'Main nav item 2']);
|
|
158
164
|
});
|
|
159
165
|
|
|
166
|
+
it('has the correct aria-label for each list item', () => {
|
|
167
|
+
const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
|
|
168
|
+
|
|
169
|
+
const values = mapAll($('.ons-navigation--main .ons-navigation__link'), node => node.attr('aria-label'));
|
|
170
|
+
expect(values).toEqual(['Main nav ariaLabel 1', 'Main nav ariaLabel 2']);
|
|
171
|
+
});
|
|
172
|
+
|
|
160
173
|
it('has the provided custom class for each list item', () => {
|
|
161
174
|
const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
|
|
162
175
|
|
|
@@ -230,6 +243,13 @@ describe('macro: navigation', () => {
|
|
|
230
243
|
expect(values).toEqual(['Sub nav item 1', 'Sub nav item 2']);
|
|
231
244
|
});
|
|
232
245
|
|
|
246
|
+
it('has the correct aria-label for each list item', () => {
|
|
247
|
+
const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
|
|
248
|
+
|
|
249
|
+
const values = mapAll($('.ons-navigation--sub .ons-navigation__link'), node => node.attr('aria-label'));
|
|
250
|
+
expect(values).toEqual(['Sub nav ariaLabel 1', 'Sub nav ariaLabel 2']);
|
|
251
|
+
});
|
|
252
|
+
|
|
233
253
|
it('has the provided custom class for each list item', () => {
|
|
234
254
|
const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
|
|
235
255
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig>
|
|
3
|
+
<msapplication>
|
|
4
|
+
<tile>
|
|
5
|
+
<square70x70logo src="/mstile-70x70.png"/>
|
|
6
|
+
<square150x150logo src="/mstile-150x150.png"/>
|
|
7
|
+
<square310x310logo src="/mstile-310x310.png"/>
|
|
8
|
+
<wide310x150logo src="/mstile-310x150.png"/>
|
|
9
|
+
<TileColor>#da532c</TileColor>
|
|
10
|
+
</tile>
|
|
11
|
+
</msapplication>
|
|
12
|
+
</browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Integrated Data Service",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-192x192.png",
|
|
7
|
+
"sizes": "192x192",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-512x512.png",
|
|
12
|
+
"sizes": "512x512",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"content_security_policy": "script-src 'self' https://cdn.ons.gov.uk; object-src 'self' https://cdn.ons.gov.uk;",
|
|
17
|
+
"theme_color": "#ffffff",
|
|
18
|
+
"background_color": "#ffffff",
|
|
19
|
+
"display": "standalone"
|
|
20
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
<metadata>
|
|
8
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
+
</metadata>
|
|
10
|
+
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
11
|
+
fill="#000000" stroke="none">
|
|
12
|
+
<path d="M3455 3371 c-16 -10 -251 -241 -522 -512 -431 -433 -492 -499 -498
|
|
13
|
+
-531 -26 -143 110 -258 236 -200 33 15 172 149 536 513 435 437 492 498 499
|
|
14
|
+
532 16 89 -16 161 -86 197 -51 26 -125 26 -165 1z"/>
|
|
15
|
+
<path d="M3681 2996 c-43 -24 -1003 -989 -1017 -1023 -20 -46 -17 -92 9 -143
|
|
16
|
+
26 -53 59 -78 116 -91 94 -21 86 -28 549 434 l422 421 423 -421 c462 -462 454
|
|
17
|
+
-455 548 -434 57 13 90 38 117 91 24 49 28 100 9 143 -14 33 -980 1002 -1019
|
|
18
|
+
1023 -34 18 -125 18 -157 0z"/>
|
|
19
|
+
<path d="M1040 2744 c-39 -16 -741 -710 -766 -756 -20 -39 -18 -121 5 -167 23
|
|
20
|
+
-45 53 -66 115 -83 90 -24 99 -18 424 305 l292 292 288 -287 c341 -342 354
|
|
21
|
+
-350 469 -292 40 19 57 35 72 68 23 46 27 109 10 153 -15 42 -715 741 -764
|
|
22
|
+
764 -48 22 -98 23 -145 3z"/>
|
|
23
|
+
<path d="M1656 2750 c-16 -5 -42 -22 -59 -37 -64 -61 -76 -150 -28 -224 16
|
|
24
|
+
-24 186 -200 377 -390 269 -267 358 -349 387 -359 69 -22 153 8 200 72 30 41
|
|
25
|
+
34 124 9 174 -30 56 -717 739 -764 759 -41 16 -77 18 -122 5z"/>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "IDS",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-36x36.png",
|
|
7
|
+
"sizes": "36x36",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-48x48.png",
|
|
12
|
+
"sizes": "48x48",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "/android-chrome-72x72.png",
|
|
17
|
+
"sizes": "72x72",
|
|
18
|
+
"type": "image/png"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"src": "/android-chrome-96x96.png",
|
|
22
|
+
"sizes": "96x96",
|
|
23
|
+
"type": "image/png"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "/android-chrome-144x144.png",
|
|
27
|
+
"sizes": "144x144",
|
|
28
|
+
"type": "image/png"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"src": "/android-chrome-192x192.png",
|
|
32
|
+
"sizes": "192x192",
|
|
33
|
+
"type": "image/png"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "/android-chrome-256x256.png",
|
|
37
|
+
"sizes": "256x256",
|
|
38
|
+
"type": "image/png"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"src": "/android-chrome-384x384.png",
|
|
42
|
+
"sizes": "384x384",
|
|
43
|
+
"type": "image/png"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"src": "/android-chrome-512x512.png",
|
|
47
|
+
"sizes": "512x512",
|
|
48
|
+
"type": "image/png"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"theme_color": "#ffffff",
|
|
52
|
+
"background_color": "#ffffff",
|
|
53
|
+
"display": "standalone"
|
|
54
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig>
|
|
3
|
+
<msapplication>
|
|
4
|
+
<tile>
|
|
5
|
+
<square70x70logo src="/mstile-70x70.png"/>
|
|
6
|
+
<square150x150logo src="/mstile-150x150.png"/>
|
|
7
|
+
<square310x310logo src="/mstile-310x310.png"/>
|
|
8
|
+
<wide310x150logo src="/mstile-310x150.png"/>
|
|
9
|
+
<TileColor>#da532c</TileColor>
|
|
10
|
+
</tile>
|
|
11
|
+
</msapplication>
|
|
12
|
+
</browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Integrated Data Service",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-192x192.png",
|
|
7
|
+
"sizes": "192x192",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-512x512.png",
|
|
12
|
+
"sizes": "512x512",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"content_security_policy": "script-src 'self' https://cdn.ons.gov.uk; object-src 'self' https://cdn.ons.gov.uk;",
|
|
17
|
+
"theme_color": "#ffffff",
|
|
18
|
+
"background_color": "#ffffff",
|
|
19
|
+
"display": "standalone"
|
|
20
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
<metadata>
|
|
8
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
+
</metadata>
|
|
10
|
+
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
11
|
+
fill="#000000" stroke="none">
|
|
12
|
+
<path d="M3455 3371 c-16 -10 -251 -241 -522 -512 -431 -433 -492 -499 -498
|
|
13
|
+
-531 -26 -143 110 -258 236 -200 33 15 172 149 536 513 435 437 492 498 499
|
|
14
|
+
532 16 89 -16 161 -86 197 -51 26 -125 26 -165 1z"/>
|
|
15
|
+
<path d="M3681 2996 c-43 -24 -1003 -989 -1017 -1023 -20 -46 -17 -92 9 -143
|
|
16
|
+
26 -53 59 -78 116 -91 94 -21 86 -28 549 434 l422 421 423 -421 c462 -462 454
|
|
17
|
+
-455 548 -434 57 13 90 38 117 91 24 49 28 100 9 143 -14 33 -980 1002 -1019
|
|
18
|
+
1023 -34 18 -125 18 -157 0z"/>
|
|
19
|
+
<path d="M1040 2744 c-39 -16 -741 -710 -766 -756 -20 -39 -18 -121 5 -167 23
|
|
20
|
+
-45 53 -66 115 -83 90 -24 99 -18 424 305 l292 292 288 -287 c341 -342 354
|
|
21
|
+
-350 469 -292 40 19 57 35 72 68 23 46 27 109 10 153 -15 42 -715 741 -764
|
|
22
|
+
764 -48 22 -98 23 -145 3z"/>
|
|
23
|
+
<path d="M1656 2750 c-16 -5 -42 -22 -59 -37 -64 -61 -76 -150 -28 -224 16
|
|
24
|
+
-24 186 -200 377 -390 269 -267 358 -349 387 -359 69 -22 153 8 200 72 30 41
|
|
25
|
+
34 124 9 174 -30 56 -717 739 -764 759 -41 16 -77 18 -122 5z"/>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "IDS",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-36x36.png",
|
|
7
|
+
"sizes": "36x36",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-48x48.png",
|
|
12
|
+
"sizes": "48x48",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "/android-chrome-72x72.png",
|
|
17
|
+
"sizes": "72x72",
|
|
18
|
+
"type": "image/png"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"src": "/android-chrome-96x96.png",
|
|
22
|
+
"sizes": "96x96",
|
|
23
|
+
"type": "image/png"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "/android-chrome-144x144.png",
|
|
27
|
+
"sizes": "144x144",
|
|
28
|
+
"type": "image/png"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"src": "/android-chrome-192x192.png",
|
|
32
|
+
"sizes": "192x192",
|
|
33
|
+
"type": "image/png"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "/android-chrome-256x256.png",
|
|
37
|
+
"sizes": "256x256",
|
|
38
|
+
"type": "image/png"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"src": "/android-chrome-384x384.png",
|
|
42
|
+
"sizes": "384x384",
|
|
43
|
+
"type": "image/png"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"src": "/android-chrome-512x512.png",
|
|
47
|
+
"sizes": "512x512",
|
|
48
|
+
"type": "image/png"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"theme_color": "#ffffff",
|
|
52
|
+
"background_color": "#ffffff",
|
|
53
|
+
"display": "standalone"
|
|
54
|
+
}
|
|
Binary file
|
package/js/cookies-settings.js
CHANGED
|
@@ -33,12 +33,14 @@ export default class CookiesSettings {
|
|
|
33
33
|
let radioButton;
|
|
34
34
|
|
|
35
35
|
if (currentConsentCookieJSON[cookieType]) {
|
|
36
|
-
radioButton = document.querySelector(
|
|
36
|
+
radioButton = document.querySelector(`input[name=cookies-${cookieType}][value=on]`);
|
|
37
37
|
} else {
|
|
38
|
-
radioButton = document.querySelector(
|
|
38
|
+
radioButton = document.querySelector(`input[name=cookies-${cookieType}][value=off]`);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
radioButton
|
|
41
|
+
if (radioButton) {
|
|
42
|
+
radioButton.checked = true;
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -22,6 +22,20 @@ const EXAMPLE_COOKIES_SETTINGS_PAGE = `
|
|
|
22
22
|
</div>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
+
const EXAMPLE_PART_COOKIES_SETTINGS_PAGE = `
|
|
26
|
+
<form data-module="cookie-settings">
|
|
27
|
+
<input type="radio" class="ons-js-radio" name="cookies-settings" value="on">
|
|
28
|
+
<input type="radio" class="ons-js-radio" name="cookies-settings" value="off">
|
|
29
|
+
<input type="radio" class="ons-js-radio" name="cookies-campaigns" value="on">
|
|
30
|
+
<input type="radio" class="ons-js-radio" name="cookies-campaigns" value="off">
|
|
31
|
+
<button id="submit-button" type="submit">Submit</button>
|
|
32
|
+
</form>
|
|
33
|
+
|
|
34
|
+
<div class="ons-cookies-confirmation-message ons-u-d-no">
|
|
35
|
+
<a class="ons-js-return-link" href="#0">Return to previous page</a>
|
|
36
|
+
</div>
|
|
37
|
+
`;
|
|
38
|
+
|
|
25
39
|
describe('script: cookies-settings', () => {
|
|
26
40
|
beforeEach(async () => {
|
|
27
41
|
const client = await page.target().createCDPSession();
|
|
@@ -43,7 +57,7 @@ describe('script: cookies-settings', () => {
|
|
|
43
57
|
});
|
|
44
58
|
});
|
|
45
59
|
|
|
46
|
-
it('sets all radio buttons to the default values', async () => {
|
|
60
|
+
it('sets all radio buttons to the default values of every `cookieType`', async () => {
|
|
47
61
|
await setTestPage('/test', EXAMPLE_COOKIES_SETTINGS_PAGE);
|
|
48
62
|
|
|
49
63
|
const cookiesSettingsOffRadio = await page.$eval('input[name=cookies-settings][value=off]', node => node.checked);
|
|
@@ -55,6 +69,16 @@ describe('script: cookies-settings', () => {
|
|
|
55
69
|
expect(cookiesCampaignsOffRadio).toBe(true);
|
|
56
70
|
});
|
|
57
71
|
|
|
72
|
+
it('sets the provided radio buttons to the default values of every matched `cookieType`', async () => {
|
|
73
|
+
await setTestPage('/test', EXAMPLE_PART_COOKIES_SETTINGS_PAGE);
|
|
74
|
+
|
|
75
|
+
const cookiesSettingsOffRadio = await page.$eval('input[name=cookies-settings][value=off]', node => node.checked);
|
|
76
|
+
const cookiesCampaignsOffRadio = await page.$eval('input[name=cookies-campaigns][value=off]', node => node.checked);
|
|
77
|
+
|
|
78
|
+
expect(cookiesSettingsOffRadio).toBe(true);
|
|
79
|
+
expect(cookiesCampaignsOffRadio).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
|
|
58
82
|
it('sets all radios to on from off when accepting cookies', async () => {
|
|
59
83
|
await setTestPage('/test', EXAMPLE_COOKIES_SETTINGS_PAGE);
|
|
60
84
|
|
package/layout/_template.njk
CHANGED
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
onsHeader({
|
|
150
150
|
"title": pageConfig.header.title | default(pageConfig.title),
|
|
151
151
|
"classes": pageConfig.header.classes,
|
|
152
|
+
"variants": pageConfig.header.variants,
|
|
152
153
|
"wide": pageConfig.wide,
|
|
153
154
|
"language": pageConfig.language,
|
|
154
155
|
"button": pageConfig.signoutButton,
|
|
@@ -164,8 +165,8 @@
|
|
|
164
165
|
"orgLogoHref": pageConfig.header.orgLogoHref,
|
|
165
166
|
"titleLogo": pageConfig.header.titleLogo,
|
|
166
167
|
"titleLogoClasses": pageConfig.header.titleLogoClasses,
|
|
167
|
-
"
|
|
168
|
-
"
|
|
168
|
+
"titleLogoMobile": pageConfig.header.titleLogoMobile,
|
|
169
|
+
"titleLogoMobileClasses": pageConfig.header.titleLogoMobileClasses,
|
|
169
170
|
"titleLogoAlt": pageConfig.header.titleLogoAlt,
|
|
170
171
|
"titleLogoHref": pageConfig.header.titleLogoHref,
|
|
171
172
|
"customHeaderLogo": pageConfig.header.customHeaderLogo
|