@ons/design-system 52.0.0 → 53.0.2
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/button/_button.scss +75 -33
- package/components/button/_macro.njk +1 -1
- package/components/button/_macro.spec.js +2 -2
- package/components/external-link/_macro.njk +5 -2
- package/components/external-link/_macro.spec.js +18 -1
- package/components/footer/_footer.scss +19 -4
- package/components/footer/_macro.njk +108 -98
- package/components/footer/_macro.spec.js +131 -2
- package/components/header/_header.scss +65 -46
- package/components/header/_macro.njk +172 -120
- package/components/header/_macro.spec.js +85 -29
- package/components/hero/_hero.scss +30 -140
- package/components/hero/_macro.njk +13 -20
- package/components/hero/_macro.spec.js +32 -29
- package/components/icons/_macro.njk +257 -29
- package/components/icons/_macro.spec.js +6 -6
- package/components/input/_input.scss +8 -0
- package/components/language-selector/_macro.njk +1 -1
- package/components/language-selector/_macro.spec.js +9 -1
- package/components/navigation/_macro.njk +42 -35
- package/components/navigation/_macro.spec.js +34 -32
- package/components/navigation/_navigation.scss +20 -4
- package/components/related-content/_macro.njk +13 -21
- package/components/related-content/_macro.spec.js +18 -27
- package/components/related-content/_section-macro.njk +10 -0
- package/components/related-content/_section-macro.spec.js +43 -0
- package/components/share-page/_macro.njk +4 -2
- package/css/census.css +3 -1
- package/css/ids.css +2 -0
- package/css/main.css +1 -1
- package/img/dummy-brand-logo.svg +1 -0
- package/layout/_template.njk +9 -4
- package/package.json +1 -1
- package/scripts/main.es5.js +2 -2
- package/scss/ids.scss +2 -0
- package/scss/settings/_census.scss +141 -0
- package/scss/settings/_ids.scss +48 -0
- package/scss/utilities/_margin.scss +1 -0
- package/scss/vars/_colors.scss +5 -2
|
@@ -230,9 +230,9 @@ $button-shadow-size: 3px;
|
|
|
230
230
|
|
|
231
231
|
&--text-link-inverse & {
|
|
232
232
|
&__inner {
|
|
233
|
-
color: $color-
|
|
233
|
+
color: $color-text-inverse-link;
|
|
234
234
|
.ons-svg-icon {
|
|
235
|
-
fill: $color-
|
|
235
|
+
fill: $color-text-inverse-link;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -253,9 +253,9 @@ $button-shadow-size: 3px;
|
|
|
253
253
|
&--text-link-inverse:active &,
|
|
254
254
|
&--text-link-inverse.active & {
|
|
255
255
|
&__inner {
|
|
256
|
-
color: $color-
|
|
256
|
+
color: $color-text-inverse-link-hover;
|
|
257
257
|
.ons-svg-icon {
|
|
258
|
-
fill: $color-
|
|
258
|
+
fill: $color-text-inverse-link-hover;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -279,8 +279,7 @@ $button-shadow-size: 3px;
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
&--ghost
|
|
283
|
-
&--mobile & {
|
|
282
|
+
&--ghost & {
|
|
284
283
|
&__inner {
|
|
285
284
|
background: transparent;
|
|
286
285
|
border: 2px solid rgba(255, 255, 255, 0.6);
|
|
@@ -293,36 +292,51 @@ $button-shadow-size: 3px;
|
|
|
293
292
|
}
|
|
294
293
|
|
|
295
294
|
&--ghost-dark & {
|
|
296
|
-
@extend .ons-btn--secondary;
|
|
297
295
|
&__inner {
|
|
298
296
|
background: transparent;
|
|
299
|
-
border: 2px solid
|
|
297
|
+
border: 2px solid $color-black;
|
|
298
|
+
box-shadow: none;
|
|
300
299
|
color: $color-text;
|
|
300
|
+
.ons-svg-icon {
|
|
301
|
+
fill: $color-black;
|
|
302
|
+
}
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
305
|
|
|
304
306
|
&--ghost,
|
|
305
|
-
&--
|
|
306
|
-
&--
|
|
307
|
+
&--ghost-dark,
|
|
308
|
+
&--dropdown,
|
|
309
|
+
&--text-link {
|
|
307
310
|
&:active,
|
|
308
311
|
.active {
|
|
309
312
|
top: 0;
|
|
310
313
|
}
|
|
311
314
|
}
|
|
312
315
|
|
|
313
|
-
&--ghost:active:focus
|
|
316
|
+
&--ghost:active:focus,
|
|
317
|
+
&--ghost-dark:active:focus {
|
|
314
318
|
box-shadow: none;
|
|
315
319
|
outline: 3px solid transparent;
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
&--ghost:focus:hover,
|
|
319
|
-
&--
|
|
320
|
-
&--
|
|
323
|
+
&--ghost-dark:focus:hover,
|
|
324
|
+
&--dropdown:focus:hover,
|
|
325
|
+
&--text-link:focus:hover {
|
|
321
326
|
outline: none;
|
|
322
327
|
}
|
|
323
328
|
|
|
324
|
-
&--ghost:hover &,
|
|
325
|
-
&--
|
|
329
|
+
&--ghost-dark:focus:hover &,
|
|
330
|
+
&--dropdown:focus:hover & {
|
|
331
|
+
&__inner {
|
|
332
|
+
color: $color-text;
|
|
333
|
+
.ons-svg-icon {
|
|
334
|
+
fill: $color-text;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&--ghost:hover & {
|
|
326
340
|
&__inner {
|
|
327
341
|
background: rgba(0, 0, 0, 0.1);
|
|
328
342
|
border-color: $color-white;
|
|
@@ -330,11 +344,8 @@ $button-shadow-size: 3px;
|
|
|
330
344
|
}
|
|
331
345
|
|
|
332
346
|
&--ghost:active &,
|
|
333
|
-
&--mobile:active &,
|
|
334
347
|
&--ghost:active:focus &,
|
|
335
|
-
&--
|
|
336
|
-
&--ghost.active &,
|
|
337
|
-
&--mobile.active & {
|
|
348
|
+
&--ghost.active & {
|
|
338
349
|
&__inner {
|
|
339
350
|
background: rgba(0, 0, 0, 0.2);
|
|
340
351
|
border-color: rgba(255, 255, 255, 0.6);
|
|
@@ -345,8 +356,23 @@ $button-shadow-size: 3px;
|
|
|
345
356
|
}
|
|
346
357
|
}
|
|
347
358
|
|
|
359
|
+
&--ghost-dark:hover &,
|
|
360
|
+
&--ghost-dark:active &,
|
|
361
|
+
&--ghost-dark:active:focus &,
|
|
362
|
+
&--ghost-dark.active & {
|
|
363
|
+
&__inner {
|
|
364
|
+
background: $color-black;
|
|
365
|
+
border-color: $color-black;
|
|
366
|
+
color: $color-white;
|
|
367
|
+
.ons-svg-icon {
|
|
368
|
+
fill: $color-white;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
348
373
|
&--ghost.active:focus &,
|
|
349
|
-
&--
|
|
374
|
+
&--ghost-dark.active:focus &,
|
|
375
|
+
&--dropdown.active:focus & {
|
|
350
376
|
&__inner {
|
|
351
377
|
background: $color-focus;
|
|
352
378
|
color: $color-text-link-focus;
|
|
@@ -357,7 +383,8 @@ $button-shadow-size: 3px;
|
|
|
357
383
|
}
|
|
358
384
|
|
|
359
385
|
&--ghost:focus &,
|
|
360
|
-
&--
|
|
386
|
+
&--ghost-dark:focus &,
|
|
387
|
+
&--dropdown:focus & {
|
|
361
388
|
&__inner {
|
|
362
389
|
box-shadow: none;
|
|
363
390
|
.ons-svg-icon {
|
|
@@ -395,17 +422,22 @@ $button-shadow-size: 3px;
|
|
|
395
422
|
}
|
|
396
423
|
|
|
397
424
|
&--dropdown {
|
|
398
|
-
@extend .ons-btn--ghost;
|
|
399
425
|
@extend .ons-btn--mobile;
|
|
400
426
|
|
|
401
427
|
width: 100%;
|
|
428
|
+
}
|
|
402
429
|
|
|
403
|
-
|
|
430
|
+
&--dropdown & {
|
|
431
|
+
@extend .ons-btn--mobile;
|
|
432
|
+
|
|
433
|
+
width: 100%;
|
|
434
|
+
|
|
435
|
+
&__inner {
|
|
404
436
|
background: $color-branded-tint;
|
|
405
437
|
border: none;
|
|
406
438
|
border-radius: 0;
|
|
407
439
|
box-shadow: none;
|
|
408
|
-
color: $color-text
|
|
440
|
+
color: $color-branded-text;
|
|
409
441
|
display: block;
|
|
410
442
|
font-size: 1rem;
|
|
411
443
|
font-weight: normal;
|
|
@@ -413,20 +445,30 @@ $button-shadow-size: 3px;
|
|
|
413
445
|
text-align: left;
|
|
414
446
|
|
|
415
447
|
.ons-svg-icon {
|
|
416
|
-
fill: $color-text
|
|
448
|
+
fill: $color-branded-text;
|
|
417
449
|
float: right;
|
|
418
450
|
margin-top: 3px;
|
|
419
451
|
}
|
|
420
452
|
}
|
|
453
|
+
}
|
|
421
454
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
455
|
+
&--dropdown:hover & {
|
|
456
|
+
&__inner {
|
|
457
|
+
background: $color-branded-secondary;
|
|
458
|
+
color: $color-white;
|
|
459
|
+
.ons-svg-icon {
|
|
460
|
+
fill: $color-white;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
&--dropdown:active &,
|
|
466
|
+
&--dropdown:active:focus & {
|
|
467
|
+
&__inner {
|
|
468
|
+
background: $color-branded-secondary;
|
|
469
|
+
color: $color-white;
|
|
470
|
+
.ons-svg-icon {
|
|
471
|
+
fill: $color-white;
|
|
430
472
|
}
|
|
431
473
|
}
|
|
432
474
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
{% endif -%}
|
|
87
87
|
</span>
|
|
88
88
|
{% if params.url is defined and params.url and params.newWindow is defined and params.newWindow %}
|
|
89
|
-
<span class="ons-btn__new-window-description ons-u-vh">{{ params.newWindowDescription | default("opens in a new
|
|
89
|
+
<span class="ons-btn__new-window-description ons-u-vh">({{ params.newWindowDescription | default("opens in a new tab") }})</span>
|
|
90
90
|
{% endif %}
|
|
91
91
|
{% if params.buttonContext is defined and params.buttonContext %}
|
|
92
92
|
<span class="ons-btn__context ons-u-vh">{{ params.buttonContext }}</span>
|
|
@@ -407,7 +407,7 @@ describe('macro: button', () => {
|
|
|
407
407
|
}),
|
|
408
408
|
);
|
|
409
409
|
|
|
410
|
-
expect($('.ons-btn__new-window-description').text()).toBe('opens in a new
|
|
410
|
+
expect($('.ons-btn__new-window-description').text()).toBe('(opens in a new tab)');
|
|
411
411
|
});
|
|
412
412
|
|
|
413
413
|
it('has a custom new window description when `newWindow` is `true` and `newWindowDescription` is provided', () => {
|
|
@@ -419,7 +419,7 @@ describe('macro: button', () => {
|
|
|
419
419
|
}),
|
|
420
420
|
);
|
|
421
421
|
|
|
422
|
-
expect($('.ons-btn__new-window-description').text()).toBe('custom opens in a new window text');
|
|
422
|
+
expect($('.ons-btn__new-window-description').text()).toBe('(custom opens in a new window text)');
|
|
423
423
|
});
|
|
424
424
|
|
|
425
425
|
it('has the `download` attribute when `buttonStyle` is "download"', () => {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{# Icon needed to be directly put here instead of calling macro to solve an issue with extra space on the end of links being underlined #}
|
|
2
2
|
{% macro onsExternalLink(params) %}
|
|
3
|
-
<a href="{{ params.url }}" class="ons-external-link{% if params.classes is defined and params.classes %} {{ params.classes }}{% endif %}" target="_blank" rel="noopener">
|
|
3
|
+
<a href="{{ params.url }}" class="ons-external-link{% if params.classes is defined and params.classes %} {{ params.classes }}{% endif %}" target="_blank" rel="noopener">
|
|
4
|
+
<span class="ons-external-link__text">
|
|
5
|
+
{{- params.linkText | safe -}}
|
|
6
|
+
</span><span class="ons-external-link__icon"> <svg class="ons-svg-icon" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true">
|
|
4
7
|
<path d="M13.5,9H13a.5.5,0,0,0-.5.5v3h-9v-9h3A.5.5,0,0,0,7,3V2.5A.5.5,0,0,0,6.5,2h-4a.5.5,0,0,0-.5.5v11a.5.5,0,0,0,.5.5h11a.5.5,0,0,0,.5-.5v-4A.5.5,0,0,0,13.5,9Z" transform="translate(-2 -1.99)"/>
|
|
5
8
|
<path d="M8.83,7.88a.51.51,0,0,0,.71,0l2.31-2.32,1.28,1.28A.51.51,0,0,0,14,6.49v-4a.52.52,0,0,0-.5-.5h-4A.51.51,0,0,0,9,2.52a.58.58,0,0,0,.14.33l1.28,1.28L8.12,6.46a.51.51,0,0,0,0,.71Z" transform="translate(-2 -1.99)"/>
|
|
6
|
-
</svg></span></a>
|
|
9
|
+
</svg></span><span class="ons-external-link__new-window-description ons-u-vh">({{- params.newWindowDescription | default("opens in a new tab") -}})</span></a>
|
|
7
10
|
{% endmacro %}
|
|
@@ -47,10 +47,27 @@ describe('macro: external-link', () => {
|
|
|
47
47
|
it('has the expected link text', async () => {
|
|
48
48
|
const $ = cheerio.load(renderComponent('external-link', EXAMPLE_EXTERNAL_LINK));
|
|
49
49
|
|
|
50
|
-
const $hyperlink = $('a.ons-external-link');
|
|
50
|
+
const $hyperlink = $('a.ons-external-link .ons-external-link__text');
|
|
51
51
|
expect($hyperlink.text().trim()).toBe('Example link');
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
it('has a default new window description', async () => {
|
|
55
|
+
const $ = cheerio.load(renderComponent('external-link', EXAMPLE_EXTERNAL_LINK));
|
|
56
|
+
|
|
57
|
+
expect($('.ons-external-link__new-window-description').text()).toBe('(opens in a new tab)');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('has a custom new window description when `newWindowDescription` is provided', () => {
|
|
61
|
+
const $ = cheerio.load(
|
|
62
|
+
renderComponent('external-link', {
|
|
63
|
+
...EXAMPLE_EXTERNAL_LINK,
|
|
64
|
+
newWindowDescription: 'custom opens in a new tab text',
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
expect($('.ons-external-link__new-window-description').text()).toBe('(custom opens in a new tab text)');
|
|
69
|
+
});
|
|
70
|
+
|
|
54
71
|
it('has an "external-link" icon', async () => {
|
|
55
72
|
const $ = cheerio.load(renderComponent('external-link', EXAMPLE_EXTERNAL_LINK));
|
|
56
73
|
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
background-color: $color-banner-bg-dark;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
&__license {
|
|
23
|
+
@extend .ons-u-fs-s;
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
&__ogl-img {
|
|
23
27
|
margin: 0 0.5rem 0.2rem 0;
|
|
24
28
|
max-width: 100%;
|
|
@@ -37,10 +41,6 @@
|
|
|
37
41
|
.ons-list__link {
|
|
38
42
|
margin-right: 0;
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
.ons-poweredbylogo {
|
|
42
|
-
min-height: 1.5rem;
|
|
43
|
-
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&--rows {
|
|
@@ -48,4 +48,19 @@
|
|
|
48
48
|
margin-bottom: 0.5rem !important;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
&__poweredby,
|
|
53
|
+
&__crest,
|
|
54
|
+
&__partnership {
|
|
55
|
+
font-size: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__partnership {
|
|
59
|
+
&-prefix {
|
|
60
|
+
@extend .ons-u-fs-s;
|
|
61
|
+
|
|
62
|
+
margin-bottom: 0.2rem;
|
|
63
|
+
margin-top: -0.3rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
51
66
|
}
|
|
@@ -9,33 +9,36 @@
|
|
|
9
9
|
{% set lang = 'en' %}
|
|
10
10
|
{% endif %}
|
|
11
11
|
|
|
12
|
-
{% set
|
|
12
|
+
{% set onsLogo %}
|
|
13
|
+
{% if params.lang == 'cy' %}
|
|
14
|
+
{{
|
|
15
|
+
onsIcon({
|
|
16
|
+
"iconType": 'ons-logo-cy',
|
|
17
|
+
"altText": 'Swyddfa Ystadegau Gwladol',
|
|
18
|
+
"altTextId": 'ons-logo-cy-footer-alt'
|
|
19
|
+
})
|
|
20
|
+
}}
|
|
21
|
+
{% else %}
|
|
22
|
+
{{
|
|
23
|
+
onsIcon({
|
|
24
|
+
"iconType": 'ons-logo-en',
|
|
25
|
+
"altText": 'Office for National Statistics',
|
|
26
|
+
"altTextId": 'ons-logo-en-footer-alt'
|
|
27
|
+
})
|
|
28
|
+
}}
|
|
29
|
+
{% endif %}
|
|
30
|
+
{% endset %}
|
|
13
31
|
|
|
32
|
+
{% set poweredByLogo %}
|
|
14
33
|
{% if params.poweredBy is defined and params.poweredBy and params.poweredBy.logo is defined and params.poweredBy.logo %}
|
|
15
34
|
{{
|
|
16
35
|
onsIcon({
|
|
17
36
|
"iconType": params.poweredBy.logo,
|
|
18
|
-
"altText": params.poweredBy.alt
|
|
37
|
+
"altText": params.poweredBy.alt,
|
|
38
|
+
"altTextId": 'poweredby-alt'
|
|
19
39
|
})
|
|
20
40
|
}}
|
|
21
|
-
{% else %}
|
|
22
|
-
{% if params.lang == 'cy' %}
|
|
23
|
-
{{
|
|
24
|
-
onsIcon({
|
|
25
|
-
"iconType": 'ons-logo-cy',
|
|
26
|
-
"altText": 'Swyddfa Ystadegau Gwladol'
|
|
27
|
-
})
|
|
28
|
-
}}
|
|
29
|
-
{% else %}
|
|
30
|
-
{{
|
|
31
|
-
onsIcon({
|
|
32
|
-
"iconType": 'ons-logo-en',
|
|
33
|
-
"altText": 'Office for National Statistics'
|
|
34
|
-
})
|
|
35
|
-
}}
|
|
36
|
-
{% endif %}
|
|
37
41
|
{% endif %}
|
|
38
|
-
|
|
39
42
|
{% endset %}
|
|
40
43
|
|
|
41
44
|
<footer class="ons-footer">
|
|
@@ -81,12 +84,6 @@
|
|
|
81
84
|
<div class="ons-footer__body{{ ' ' + params.classes if params.classes else '' }}" data-analytics="footer" {% if params.attributes is defined and params.attributes %}{% for attribute, value in (params.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}>
|
|
82
85
|
<div class="ons-container{{ ' ons-container--wide' if params.wide }}">
|
|
83
86
|
<div class="ons-grid">
|
|
84
|
-
{% if params.poweredBy is defined and params.poweredBy and params.OGLLink is defined and params.OGLLink %}
|
|
85
|
-
<div class="ons-grid__col ons-u-mb-m">
|
|
86
|
-
{{ poweredByLogo | safe }}
|
|
87
|
-
</div>
|
|
88
|
-
{% endif %}
|
|
89
|
-
|
|
90
87
|
{% if params.newTabWarning is defined and params.newTabWarning %}
|
|
91
88
|
<div class="ons-grid__col">
|
|
92
89
|
<p class="ons-u-fs-s ons-u-mb-m ons-footer__new-tab-warning">{{ params.newTabWarning | safe }}</p>
|
|
@@ -95,6 +92,7 @@
|
|
|
95
92
|
|
|
96
93
|
{% if params.cols is defined and params.cols %}
|
|
97
94
|
{% for col in params.cols %}
|
|
95
|
+
<!-- Full footer columns -->
|
|
98
96
|
<div class="ons-grid__col ons-col-4@m{{ ' ons-u-mt-m@xxs@m' if loop.index > 1 }}">
|
|
99
97
|
{% if col.title %}
|
|
100
98
|
<h2 class="ons-footer__heading ons-u-fs-r--b">{{ col.title }}</h2>
|
|
@@ -108,17 +106,9 @@
|
|
|
108
106
|
}}
|
|
109
107
|
</div>
|
|
110
108
|
{% endfor %}
|
|
111
|
-
{%
|
|
112
|
-
|
|
113
|
-
{% if params.cols is defined and params.cols and params.rows is defined and params.rows %}
|
|
114
|
-
<div class="ons-grid__col ons-u-mb-m">
|
|
115
|
-
<hr class="ons-footer__hr">
|
|
116
|
-
</div>
|
|
117
|
-
{% endif %}
|
|
118
|
-
|
|
119
|
-
{% if params.rows is defined and params.rows %}
|
|
109
|
+
{% elif params.rows is defined and params.rows %}
|
|
120
110
|
{% for row in params.rows %}
|
|
121
|
-
<!--
|
|
111
|
+
<!-- Transactional footer row -->
|
|
122
112
|
<div class="ons-grid__col">
|
|
123
113
|
{{
|
|
124
114
|
onsList({
|
|
@@ -128,105 +118,125 @@
|
|
|
128
118
|
})
|
|
129
119
|
}}
|
|
130
120
|
</div>
|
|
131
|
-
{% if loop.length > 1 %}
|
|
132
|
-
{% if not loop.last %}
|
|
133
|
-
<div class="ons-grid__col ons-u-mb-m">
|
|
134
|
-
<hr class="ons-footer__hr">
|
|
135
|
-
</div>
|
|
136
|
-
{% endif %}
|
|
137
|
-
{% endif %}
|
|
138
121
|
{% endfor %}
|
|
139
122
|
{% endif %}
|
|
140
123
|
|
|
141
|
-
{% if params.
|
|
142
|
-
<!-- OGL -->
|
|
143
|
-
<div class="ons-grid__col ons-u-mb-m">
|
|
144
|
-
<hr class="ons-footer__hr">
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
<div class="ons-grid__col">
|
|
148
|
-
<div class="ons-footer__license">
|
|
149
|
-
{{
|
|
150
|
-
onsIcon({
|
|
151
|
-
"iconType": 'ogl'
|
|
152
|
-
})
|
|
153
|
-
}}
|
|
154
|
-
{% if params.OGLLink.HTML is defined and params.OGLLink.HTML %}
|
|
155
|
-
{{ params.OGLLink.HTML | safe }}
|
|
156
|
-
{% else %}
|
|
157
|
-
{% from "components/external-link/_macro.njk" import onsExternalLink %}
|
|
158
|
-
{{ params.OGLLink.pre }} {{
|
|
159
|
-
onsExternalLink({
|
|
160
|
-
"url": params.OGLLink.url,
|
|
161
|
-
"linkText": params.OGLLink.link
|
|
162
|
-
})
|
|
163
|
-
}}{{ params.OGLLink.post }}
|
|
164
|
-
{% endif %}
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
{% endif %}
|
|
168
|
-
|
|
169
|
-
{% if params.legal is defined and params.legal or params.rows is defined and params.rows and params.OGLLink is not defined or params.OGLLink is not defined and params.legal is not defined and (params.rows is defined and params.rows or params.cols is defined and params.cols) %}
|
|
124
|
+
{% if (params.cols is defined and params.cols) or (params.rows is defined and params.rows) %}
|
|
170
125
|
<div class="ons-grid__col ons-u-mb-m">
|
|
171
126
|
<hr class="ons-footer__hr">
|
|
172
127
|
</div>
|
|
173
128
|
{% endif %}
|
|
174
129
|
|
|
175
|
-
{% if params.OGLLink is not defined and params.legal is not defined %}
|
|
176
|
-
<div class="ons-grid__col">
|
|
177
|
-
{{ poweredByLogo | safe }}
|
|
178
|
-
</div>
|
|
179
|
-
{% endif %}
|
|
180
130
|
</div>
|
|
181
131
|
|
|
182
|
-
{% if params.legal is defined and params.legal or params.rows is defined and params.rows and params.OGLLink is not defined or params.cols is defined and params.cols and params.OGLLink is not defined %}
|
|
183
132
|
<div class="ons-grid ons-grid--flex ons-grid--vertical-top ons-grid--between">
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
133
|
+
<div class="ons-grid__col">
|
|
134
|
+
{% if params.legal is defined and params.legal %}
|
|
135
|
+
<!-- Legal -->
|
|
136
|
+
{% for legal in params.legal %}
|
|
188
137
|
{{
|
|
189
138
|
onsList({
|
|
190
|
-
"classes": 'ons-u-mb-
|
|
139
|
+
"classes": 'ons-u-mb-s ons-footer--rows',
|
|
191
140
|
"variants": ['bare', 'inline'],
|
|
192
141
|
"itemsList": legal.itemsList
|
|
193
142
|
})
|
|
194
143
|
}}
|
|
195
|
-
|
|
196
|
-
|
|
144
|
+
{% endfor %}
|
|
145
|
+
{% endif %}
|
|
146
|
+
|
|
147
|
+
{% if params.OGLLink == true or params.OGLLink is defined %}
|
|
148
|
+
<!-- OGL -->
|
|
149
|
+
<div class="ons-footer__license ons-u-mb-m">
|
|
150
|
+
{{
|
|
151
|
+
onsIcon({
|
|
152
|
+
"iconType": 'ogl'
|
|
153
|
+
})
|
|
154
|
+
}}
|
|
155
|
+
{% if params.OGLLink.HTML is defined and params.OGLLink.HTML %}
|
|
156
|
+
{{ params.OGLLink.HTML | safe }}
|
|
157
|
+
{% elif params.OGLLink == true or params.OGLLink is defined %}
|
|
158
|
+
{% from "components/external-link/_macro.njk" import onsExternalLink %}
|
|
159
|
+
{% if params.lang == 'cy' %}
|
|
160
|
+
{{ params.OGLLink.pre | default('Mae’r holl gynnwys ar gael o dan y') }} {{
|
|
161
|
+
onsExternalLink({
|
|
162
|
+
"url": params.OGLLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
|
|
163
|
+
"linkText": params.OGLLink.link | default('Drwydded Llywodraeth Leol v3.0')
|
|
164
|
+
})
|
|
165
|
+
}}{{ params.OGLLink.post | default(', oni bai y nodir fel arall') }}
|
|
166
|
+
{% else %}
|
|
167
|
+
{{ params.OGLLink.pre | default('All content is available under the') }} {{
|
|
168
|
+
onsExternalLink({
|
|
169
|
+
"url": params.OGLLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
|
|
170
|
+
"linkText": params.OGLLink.link | default('Open Government Licence v3.0')
|
|
171
|
+
})
|
|
172
|
+
}}{{ params.OGLLink.post | default(', except where otherwise stated') }}
|
|
173
|
+
{% endif %}
|
|
197
174
|
{% endif %}
|
|
198
175
|
</div>
|
|
199
|
-
{%
|
|
200
|
-
|
|
176
|
+
{% endif %}
|
|
177
|
+
|
|
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 %}
|
|
185
|
+
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
186
|
+
{{ onsLogo | safe }}
|
|
187
|
+
</div>
|
|
188
|
+
{% endif %}
|
|
189
|
+
</div>
|
|
201
190
|
|
|
202
191
|
{% if params.crest is defined and params.crest %}
|
|
203
192
|
<!-- Crest -->
|
|
204
|
-
<div class="ons-grid__col ons-footer__crest">
|
|
193
|
+
<div class="ons-grid__col ons-footer__crest ons-u-mb-m@xxs@l">
|
|
205
194
|
{{
|
|
206
195
|
onsIcon({
|
|
207
196
|
"iconType": 'crest'
|
|
208
197
|
})
|
|
209
198
|
}}
|
|
210
199
|
</div>
|
|
211
|
-
{% elif params.legal is defined and params.legal %}
|
|
212
|
-
<!-- Powered by -->
|
|
213
|
-
<div class="ons-grid__col">
|
|
214
|
-
<div class="ons-poweredbylogo">{{ poweredByLogo | safe }}</div>
|
|
215
|
-
</div>
|
|
216
200
|
{% endif %}
|
|
201
|
+
</div>
|
|
217
202
|
|
|
203
|
+
{% if (params.poweredBy is defined and params.poweredBy) and (params.poweredBy.partnership is defined and params.poweredBy.partnership) %}
|
|
204
|
+
<div class="ons-grid ons-grid--flex ons-grid--vertical-bottom ons-grid--between ons-u-mt-l">
|
|
205
|
+
<div class="ons-grid__col ons-footer__poweredby ons-u-mb-m">
|
|
206
|
+
{{ poweredByLogo | safe }}
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="ons-grid__col ons-footer__partnership ons-u-mb-m">
|
|
210
|
+
<div class="ons-footer__partnership-prefix">{{ params.poweredBy.partnership }}</div>
|
|
211
|
+
{% if params.lang == 'cy' %}
|
|
212
|
+
{{
|
|
213
|
+
onsIcon({
|
|
214
|
+
"iconType": 'ons-logo-cy',
|
|
215
|
+
"altText": 'Swyddfa Ystadegau Gwladol',
|
|
216
|
+
"altTextId": 'ons-logo-cy-footer-alt'
|
|
217
|
+
})
|
|
218
|
+
}}
|
|
219
|
+
{% else %}
|
|
220
|
+
{{
|
|
221
|
+
onsIcon({
|
|
222
|
+
"iconType": 'ons-logo-en',
|
|
223
|
+
"altText": 'Office for National Statistics',
|
|
224
|
+
"altTextId": 'ons-logo-en-footer-alt'
|
|
225
|
+
})
|
|
226
|
+
}}
|
|
227
|
+
{% endif %}
|
|
228
|
+
</div>
|
|
218
229
|
</div>
|
|
219
230
|
{% endif %}
|
|
220
231
|
|
|
221
232
|
{% if params.copyrightDeclaration is defined and params.copyrightDeclaration %}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
</div>
|
|
233
|
+
<!-- Copyright -->
|
|
234
|
+
<div class="ons-grid">
|
|
235
|
+
<div class="ons-grid__col">
|
|
236
|
+
<p class="ons-u-fs-s ons-u-mb-no ons-footer__copyright">© {{ params.copyrightDeclaration.copyright }} <br> {{ params.copyrightDeclaration.text }}</p>
|
|
227
237
|
</div>
|
|
238
|
+
</div>
|
|
228
239
|
{% endif %}
|
|
229
|
-
|
|
230
240
|
</div>
|
|
231
241
|
</div>
|
|
232
242
|
</footer>
|