@ons/design-system 55.1.0 → 55.2.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/components/access-code/_macro.njk +3 -3
- package/components/accordion/_macro.njk +1 -1
- package/components/address-input/_macro.njk +7 -7
- package/components/address-output/_macro.njk +7 -7
- package/components/autosuggest/_macro.njk +19 -19
- package/components/breadcrumbs/_macro.njk +3 -3
- package/components/button/_button.scss +1 -1
- package/components/button/_macro.njk +24 -24
- package/components/call-to-action/_macro.njk +1 -1
- package/components/card/_macro.njk +10 -10
- package/components/checkboxes/_checkbox-macro.njk +9 -9
- package/components/checkboxes/_macro.njk +10 -10
- package/components/checkboxes/checkbox-with-fieldset.js +6 -5
- package/components/checkboxes/checkboxes.dom.js +6 -9
- package/components/code-highlight/_macro.njk +1 -1
- package/components/collapsible/_macro.njk +7 -7
- package/components/date-input/_macro.njk +5 -5
- package/components/document-list/_macro.njk +29 -29
- package/components/duration/_macro.njk +9 -9
- package/components/duration/_macro.spec.js +0 -3
- package/components/error/_macro.njk +1 -1
- package/components/external-link/_macro.njk +1 -1
- package/components/feedback/_macro.njk +2 -2
- package/components/field/_macro.njk +5 -5
- package/components/fieldset/_macro.njk +8 -8
- package/components/footer/_macro.njk +17 -17
- package/components/header/_macro.njk +33 -33
- package/components/hero/_macro.njk +15 -15
- package/components/icons/_macro.njk +2 -2
- package/components/images/_macro.njk +3 -3
- package/components/input/_input-type.scss +4 -0
- package/components/input/_macro.njk +40 -34
- package/components/input/_macro.spec.js +64 -59
- package/components/label/_macro.njk +1 -1
- package/components/language-selector/_macro.njk +1 -1
- package/components/lists/_macro.njk +22 -22
- package/components/message/_macro.njk +6 -6
- package/components/message-list/_macro.njk +1 -1
- package/components/metadata/_macro.njk +2 -2
- package/components/modal/_macro.njk +4 -4
- package/components/mutually-exclusive/_macro.njk +1 -1
- package/components/mutually-exclusive/mutually-exclusive.js +3 -1
- package/components/navigation/_macro.njk +8 -8
- package/components/pagination/_macro.njk +3 -3
- package/components/panel/_macro.njk +37 -39
- package/components/panel/_macro.spec.js +1 -13
- package/components/promotional-banner/_macro.njk +2 -2
- package/components/question/_macro.njk +18 -18
- package/components/quote/_macro.njk +2 -2
- package/components/radios/_macro.njk +8 -8
- package/components/radios/check-radios.js +5 -1
- package/components/related-content/_macro.njk +2 -2
- package/components/relationships/_macro.njk +2 -2
- package/components/section-navigation/_macro.njk +2 -2
- package/components/select/_macro.njk +8 -8
- package/components/share-page/_macro.njk +2 -2
- package/components/status/_macro.njk +2 -2
- package/components/summary/_macro.njk +25 -25
- package/components/table/_macro.njk +10 -10
- package/components/table-of-contents/_macro.njk +4 -4
- package/components/textarea/_macro.njk +8 -8
- package/components/timeline/_macro.njk +1 -1
- package/components/video/_macro.njk +1 -1
- package/css/census.css +1 -1
- package/css/ids.css +1 -1
- package/css/main.css +1 -1
- package/layout/_template.njk +35 -35
- package/package.json +1 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{% macro onsDocumentList(params) %}
|
|
2
|
-
<ul{% if params.id
|
|
2
|
+
<ul{% if params.id %} id="{{ params.id }}"{% endif %} class="ons-document-list{{ ' ' + params.classes if params.classes else '' }}"{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %} {{attribute}}="{{value}}"{% endfor %}{% endif %}>
|
|
3
3
|
{% for document in (params.documents if params.documents is iterable else params.documents.items()) %}
|
|
4
4
|
|
|
5
|
-
<li class="ons-document-list__item{{ ' ons-document-list__item--featured' if document.featured
|
|
5
|
+
<li class="ons-document-list__item{{ ' ons-document-list__item--featured' if document.featured }}{{ ' ons-document-list__item--full-width' if document.fullWidth == true }}{{ ' ' + document.classes if document.classes else '' }}"{% if document.attributes %}{% for attribute, value in (document.attributes.items() if document.attributes is mapping and document.attributes.items else document.attributes) %} {{attribute}}="{{value}}"{% endfor %}{% endif %}>
|
|
6
6
|
|
|
7
|
-
{% if document.fullWidth
|
|
7
|
+
{% if document.fullWidth == true %}
|
|
8
8
|
|
|
9
|
-
<div class="ons-container{{ ' ons-container--wide' if document.wide
|
|
9
|
+
<div class="ons-container{{ ' ons-container--wide' if document.wide == true }}">
|
|
10
10
|
|
|
11
11
|
{% endif %}
|
|
12
12
|
|
|
13
|
-
{% if document.thumbnail
|
|
13
|
+
{% if document.thumbnail %}
|
|
14
14
|
|
|
15
|
-
<div class="ons-document-list__item-image{%- if document.metadata.file
|
|
15
|
+
<div class="ons-document-list__item-image{%- if document.metadata.file %} ons-document-list__item-image--file{% endif %}" aria-hidden="true">
|
|
16
16
|
<a class="ons-document-list__image-link{{ ' ons-document-list__image-link--placeholder' if not document.thumbnail.smallSrc }}" href="{{ document.url }}" tabindex="-1">
|
|
17
|
-
{% if document.thumbnail.smallSrc
|
|
17
|
+
{% if document.thumbnail.smallSrc and document.thumbnail.largeSrc %}
|
|
18
18
|
<img srcset="{{ document.thumbnail.smallSrc }} 1x, {{ document.thumbnail.largeSrc }} 2x" src="{{ document.thumbnail.smallSrc }}" alt="" loading="lazy">
|
|
19
19
|
{% endif %}
|
|
20
20
|
</a>
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
|
|
25
25
|
<div class="ons-document-list__item-content">
|
|
26
26
|
|
|
27
|
-
<div class="ons-document-list__item-header{{ ' ons-document-list__item-header--reverse' if document.showMetadataFirst
|
|
27
|
+
<div class="ons-document-list__item-header{{ ' ons-document-list__item-header--reverse' if document.showMetadataFirst == true }}">
|
|
28
28
|
|
|
29
29
|
{% set titleTag = params.titleTag | default("h2") %}
|
|
30
30
|
|
|
31
31
|
<{{ titleTag }} class="ons-document-list__item-title ons-u-fs-m ons-u-mt-no ons-u-mb-xs">
|
|
32
32
|
<a href="{{ document.url }}">{{ document.title }}
|
|
33
|
-
{%- if document.metadata
|
|
33
|
+
{%- if document.metadata and document.metadata.file %}
|
|
34
34
|
<span class="ons-u-vh">
|
|
35
35
|
{% set fileMetadataItems = [] %}
|
|
36
|
-
{% if document.metadata.file.fileType
|
|
37
|
-
{% if document.metadata.file.fileSize
|
|
38
|
-
{% if document.metadata.file.filePages
|
|
36
|
+
{% if document.metadata.file.fileType %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.fileType + ' document download'), fileMetadataItems) %}{% endif %}
|
|
37
|
+
{% if document.metadata.file.fileSize %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.fileSize), fileMetadataItems) %}{% endif %}
|
|
38
|
+
{% if document.metadata.file.filePages %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.filePages), fileMetadataItems) %}{% endif %}
|
|
39
39
|
|
|
40
40
|
, {{ fileMetadataItems | join(', ') }}
|
|
41
41
|
|
|
@@ -44,45 +44,45 @@
|
|
|
44
44
|
</span></a>
|
|
45
45
|
</{{ titleTag }}>
|
|
46
46
|
|
|
47
|
-
{%- if document.metadata
|
|
47
|
+
{%- if document.metadata %}
|
|
48
48
|
|
|
49
|
-
<ul class="ons-document-list__item-metadata{% if document.description
|
|
49
|
+
<ul class="ons-document-list__item-metadata{% if document.description %} ons-u-mb-xs{% else %} ons-u-mb-no{% endif %}">
|
|
50
50
|
|
|
51
|
-
{%- if document.metadata.date
|
|
51
|
+
{%- if document.metadata.date %}
|
|
52
52
|
<li class="ons-document-list__item-attribute">
|
|
53
53
|
{% if document.metadata.date -%}
|
|
54
|
-
{% set prefixClasses = "ons-u-fw-b" if document.metadata.date.showPrefix
|
|
54
|
+
{% set prefixClasses = "ons-u-fw-b" if document.metadata.date.showPrefix == true else "ons-u-vh" %}
|
|
55
55
|
<span class="{{ prefixClasses }}">{{ document.metadata.date.prefix | default("Published") }}: </span>
|
|
56
56
|
{%- endif -%}
|
|
57
|
-
{% if document.metadata.date.iso
|
|
57
|
+
{% if document.metadata.date.iso -%}
|
|
58
58
|
<time datetime="{{ document.metadata.date.iso }}">{{ document.metadata.date.short }}</time>
|
|
59
59
|
{%- endif %}
|
|
60
60
|
</li>
|
|
61
61
|
{% endif %}
|
|
62
62
|
|
|
63
|
-
{%- if document.metadata.type
|
|
64
|
-
<li class="ons-document-list__item-attribute{%- if document.metadata.file
|
|
65
|
-
{%- if document.metadata.type.url
|
|
63
|
+
{%- if document.metadata.type and document.metadata.type.text %}
|
|
64
|
+
<li class="ons-document-list__item-attribute{%- if document.metadata.file %} ons-u-mr-no{% endif %}">
|
|
65
|
+
{%- if document.metadata.type.url %}
|
|
66
66
|
<a class="ons-document-list__attribute-link" href="{{ document.metadata.type.url }}">
|
|
67
67
|
{% endif %}
|
|
68
|
-
<span {% if not document.metadata.file and not document.metadata.type.url %}class="ons-u-fw-b"{% endif %}>{{ document.metadata.type.text }}{%- if document.metadata.type.ref
|
|
69
|
-
{%- if document.metadata.type.url
|
|
68
|
+
<span {% if not document.metadata.file and not document.metadata.type.url %}class="ons-u-fw-b"{% endif %}>{{ document.metadata.type.text }}{%- if document.metadata.type.ref %}: {% elif document.metadata.file %},{% endif %}</span>
|
|
69
|
+
{%- if document.metadata.type.url %}
|
|
70
70
|
</a>
|
|
71
71
|
{% endif %}
|
|
72
|
-
{%- if document.metadata.type.ref
|
|
72
|
+
{%- if document.metadata.type.ref %}
|
|
73
73
|
<span>{{ document.metadata.type.ref }}</span>
|
|
74
74
|
{% endif %}
|
|
75
75
|
</li>
|
|
76
76
|
{% endif %}
|
|
77
77
|
|
|
78
|
-
{%- if document.metadata.file
|
|
78
|
+
{%- if document.metadata.file and document.metadata.file.fileType %}
|
|
79
79
|
|
|
80
80
|
<li class="ons-document-list__item-attribute" aria-hidden="true">
|
|
81
81
|
{% set fileMetadataItems = [] %}
|
|
82
82
|
|
|
83
|
-
{% if document.metadata.file.fileType
|
|
84
|
-
{% if document.metadata.file.fileSize
|
|
85
|
-
{% if document.metadata.file.filePages
|
|
83
|
+
{% if document.metadata.file.fileType %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.fileType), fileMetadataItems) %}{% endif %}
|
|
84
|
+
{% if document.metadata.file.fileSize %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.fileSize), fileMetadataItems) %}{% endif %}
|
|
85
|
+
{% if document.metadata.file.filePages %}{% set fileMetadataItems = (fileMetadataItems.push(document.metadata.file.filePages), fileMetadataItems) %}{% endif %}
|
|
86
86
|
|
|
87
87
|
{{ fileMetadataItems | join(', ') }}
|
|
88
88
|
</li>
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
{% endif %}
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
|
-
{% if document.description
|
|
96
|
+
{% if document.description %}
|
|
97
97
|
<div class="ons-document-list__item-description">{{ document.description | safe }}</div>
|
|
98
98
|
{% endif %}
|
|
99
99
|
|
|
100
100
|
</div>
|
|
101
101
|
|
|
102
|
-
{% if document.fullWidth
|
|
102
|
+
{% if document.fullWidth == true %}
|
|
103
103
|
|
|
104
104
|
</div>
|
|
105
105
|
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
{% macro onsDuration(params) %}
|
|
8
8
|
{% set numberOfFields = 0 %}
|
|
9
9
|
|
|
10
|
-
{% if params.field1
|
|
10
|
+
{% if params.field1 %}
|
|
11
11
|
{% set numberOfFields = numberOfFields + 1 %}
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
14
|
-
{% if params.field2
|
|
14
|
+
{% if params.field2 %}
|
|
15
15
|
{% set numberOfFields = numberOfFields + 1 %}
|
|
16
16
|
{% endif %}
|
|
17
17
|
|
|
18
18
|
{% set fields %}
|
|
19
|
-
{% if params.field1
|
|
19
|
+
{% if params.field1 %}
|
|
20
20
|
{{ onsInput({
|
|
21
21
|
"id": params.field1.id,
|
|
22
|
-
"classes": (" ons-input--error" if (params.error
|
|
22
|
+
"classes": (" ons-input--error" if (params.error and params.field1.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + (" ons-js-exclusive-group-item" if params.mutuallyExclusive else ""),
|
|
23
23
|
"width": "2",
|
|
24
24
|
"type": "number",
|
|
25
25
|
"name": params.field1.name,
|
|
26
26
|
"value": params.field1.value,
|
|
27
27
|
"suffix": {
|
|
28
28
|
"text": params.field1.suffix.text,
|
|
29
|
-
"title": params.field1.suffix.title
|
|
29
|
+
"title": params.field1.suffix.title,
|
|
30
30
|
"id": params.field1.suffix.id
|
|
31
31
|
},
|
|
32
32
|
"label": {
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
}) }}
|
|
40
40
|
{% endif %}
|
|
41
41
|
|
|
42
|
-
{% if params.field2
|
|
42
|
+
{% if params.field2 %}
|
|
43
43
|
{{ onsInput({
|
|
44
44
|
"id": params.field2.id,
|
|
45
|
-
"classes": (" ons-input--error" if (params.error
|
|
45
|
+
"classes": (" ons-input--error" if (params.error and params.field2.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + (" ons-js-exclusive-group-item" if params.mutuallyExclusive else ""),
|
|
46
46
|
"width": "2",
|
|
47
47
|
"type": "number",
|
|
48
48
|
"name": params.field2.name,
|
|
49
49
|
"value": params.field2.value,
|
|
50
50
|
"suffix": {
|
|
51
51
|
"text": params.field2.suffix.text,
|
|
52
|
-
"title": params.field2.suffix.title
|
|
52
|
+
"title": params.field2.suffix.title,
|
|
53
53
|
"id": params.field2.suffix.id
|
|
54
54
|
},
|
|
55
55
|
"label": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{% endif %}
|
|
64
64
|
{% endset %}
|
|
65
65
|
|
|
66
|
-
{% if params.mutuallyExclusive
|
|
66
|
+
{% if params.mutuallyExclusive %}
|
|
67
67
|
{% set mutuallyExclusive = params.mutuallyExclusive | setAttributes({
|
|
68
68
|
"id": params.id,
|
|
69
69
|
"legend": params.legendOrLabel,
|
|
@@ -78,7 +78,6 @@ describe('macro: duration', () => {
|
|
|
78
78
|
suffix: {
|
|
79
79
|
id: 'address-duration-years-suffix',
|
|
80
80
|
text: 'Years',
|
|
81
|
-
title: 'Years',
|
|
82
81
|
},
|
|
83
82
|
});
|
|
84
83
|
|
|
@@ -100,7 +99,6 @@ describe('macro: duration', () => {
|
|
|
100
99
|
suffix: {
|
|
101
100
|
id: 'address-duration-months-suffix',
|
|
102
101
|
text: 'Months',
|
|
103
|
-
title: 'Months',
|
|
104
102
|
},
|
|
105
103
|
});
|
|
106
104
|
});
|
|
@@ -228,7 +226,6 @@ describe('macro: duration', () => {
|
|
|
228
226
|
suffix: {
|
|
229
227
|
id: 'address-duration-years-suffix',
|
|
230
228
|
text: 'Years',
|
|
231
|
-
title: 'Years',
|
|
232
229
|
},
|
|
233
230
|
});
|
|
234
231
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{% set content %}
|
|
5
5
|
<p
|
|
6
6
|
class="ons-panel__error"
|
|
7
|
-
{% if params.attributes
|
|
7
|
+
{% 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 %}
|
|
8
8
|
>
|
|
9
9
|
<strong>{{ params.text }}</strong>
|
|
10
10
|
</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
3
|
+
<a href="{{ params.url }}" class="ons-external-link{% if params.classes %} {{ params.classes }}{% endif %}" target="_blank" rel="noopener">
|
|
4
4
|
<span class="ons-external-link__text">
|
|
5
5
|
{{- params.linkText | safe -}}
|
|
6
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">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% macro onsFeedback(params) %}
|
|
2
2
|
{% set headingLevel = params.headingLevel | default("2") %}
|
|
3
|
-
<div {% if params.id
|
|
4
|
-
<h{{ headingLevel }} class="ons-feedback__heading{{ ' ' + params.headingClasses if params.headingClasses
|
|
3
|
+
<div {% if params.id %} id="{{ params.id }}"{% endif %} class="ons-feedback{% if params.classes %} {{ params.classes }}{% endif %}">
|
|
4
|
+
<h{{ headingLevel }} class="ons-feedback__heading{{ ' ' + params.headingClasses if params.headingClasses }}">
|
|
5
5
|
{{ params.heading }}
|
|
6
6
|
</h{{ headingLevel }}>
|
|
7
7
|
<p class="ons-feedback__content">{{- params.content | safe -}}</p>
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
{% endif %}
|
|
7
7
|
|
|
8
8
|
{% set field %}
|
|
9
|
-
{% if params.dontWrap
|
|
9
|
+
{% if params.dontWrap %}
|
|
10
10
|
{{- caller() if caller -}}
|
|
11
11
|
{% else %}
|
|
12
12
|
<div
|
|
13
|
-
{% if params.id
|
|
14
|
-
class="ons-field{% if params.inline
|
|
15
|
-
{% if params.attributes
|
|
13
|
+
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
14
|
+
class="ons-field{% if params.inline %} ons-field--inline{% endif %}{% if params.classes %} {{ params.classes }}{% endif %}"
|
|
15
|
+
{% 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 %}
|
|
16
16
|
>
|
|
17
17
|
{{- caller() if caller -}}
|
|
18
18
|
</div>
|
|
19
19
|
{% endif %}
|
|
20
20
|
{% endset %}
|
|
21
21
|
|
|
22
|
-
{% if params.error
|
|
22
|
+
{% if params.error %}
|
|
23
23
|
{% call onsError(params.error) %}
|
|
24
24
|
{{ field | safe }}
|
|
25
25
|
{% endcall %}
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
{% macro onsFieldset(params) %}
|
|
4
4
|
{% set descriptionID = (params.id ~ "-" if params.id else "") ~ "legend-description" %}
|
|
5
5
|
{% set fieldset -%}
|
|
6
|
-
{% if params.dontWrap
|
|
6
|
+
{% if params.dontWrap -%}
|
|
7
7
|
<div class="ons-input-items">
|
|
8
8
|
{{- caller() if caller -}}
|
|
9
9
|
</div>
|
|
10
|
-
{%- elif
|
|
10
|
+
{%- elif params.legend or params.legendIsQuestionTitle -%}
|
|
11
11
|
<fieldset
|
|
12
|
-
{% if params.id
|
|
13
|
-
class="ons-fieldset{% if params.classes
|
|
14
|
-
{% if params.attributes
|
|
12
|
+
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
13
|
+
class="ons-fieldset{% if params.classes %} {{ params.classes }}{% endif %}"
|
|
14
|
+
{% 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 %}
|
|
15
15
|
>
|
|
16
|
-
<legend{% if params.description %} aria-describedBy="{{ descriptionID }}"{% endif %} class="ons-fieldset__legend{% if params.legendIsQuestionTitle %} ons-u-mb-no{% endif %}{% if params.legendClasses
|
|
16
|
+
<legend{% if params.description %} aria-describedBy="{{ descriptionID }}"{% endif %} class="ons-fieldset__legend{% if params.legendIsQuestionTitle %} ons-u-mb-no{% endif %}{% if params.legendClasses %} {{ params.legendClasses }}{% endif %}{% if params.description %} ons-fieldset__legend--with-description{% endif %}">
|
|
17
17
|
{%- if params.legendIsQuestionTitle -%}
|
|
18
|
-
<h1 id="fieldset-legend-title" class="ons-fieldset__legend-title{% if params.legendTitleClasses
|
|
18
|
+
<h1 id="fieldset-legend-title" class="ons-fieldset__legend-title{% if params.legendTitleClasses %} {{ params.legendTitleClasses }}{% endif %}">
|
|
19
19
|
{{- params.legend | safe -}}
|
|
20
20
|
</h1>
|
|
21
21
|
{%- else -%}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{%- endif %}
|
|
33
33
|
{%- endset %}
|
|
34
34
|
|
|
35
|
-
{% if params.error
|
|
35
|
+
{% if params.error -%}
|
|
36
36
|
{% call onsError(params.error) %}
|
|
37
37
|
{{- fieldset | safe -}}
|
|
38
38
|
{% endcall %}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{% from "components/lists/_macro.njk" import onsList %}
|
|
4
4
|
{% from "components/icons/_macro.njk" import onsIcon %}
|
|
5
5
|
|
|
6
|
-
{% if params.lang
|
|
6
|
+
{% if params.lang %}
|
|
7
7
|
{% set lang = params.lang %}
|
|
8
8
|
{% else %}
|
|
9
9
|
{% set lang = 'en' %}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{% endset %}
|
|
31
31
|
|
|
32
32
|
{% set poweredByLogo %}
|
|
33
|
-
{% if params.poweredBy
|
|
33
|
+
{% if params.poweredBy and params.poweredBy.logo %}
|
|
34
34
|
{{
|
|
35
35
|
onsIcon({
|
|
36
36
|
"iconType": params.poweredBy.logo,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<footer class="ons-footer">
|
|
45
45
|
|
|
46
|
-
{% if params.footerWarning
|
|
46
|
+
{% if params.footerWarning %}
|
|
47
47
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
48
48
|
<div class="ons-footer__warning">
|
|
49
49
|
<div class="ons-container">
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
{% endif %}
|
|
60
60
|
|
|
61
|
-
{% if params.button
|
|
61
|
+
{% if params.button %}
|
|
62
62
|
{% from "components/button/_macro.njk" import onsButton %}
|
|
63
63
|
<div class="ons-footer__button-container ons-u-d-no@m">
|
|
64
64
|
{{
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
{% endif %}
|
|
83
83
|
|
|
84
|
-
<div class="ons-footer__body{{ ' ' + params.classes if params.classes else '' }}" data-analytics="footer" {% if params.attributes
|
|
84
|
+
<div class="ons-footer__body{{ ' ' + params.classes if params.classes else '' }}" data-analytics="footer" {% if params.attributes %}{% for attribute, value in (params.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}>
|
|
85
85
|
<div class="ons-container{{ ' ons-container--full-width' if params.fullWidth }}{{ ' ons-container--wide' if params.wide }}">
|
|
86
86
|
<div class="ons-grid">
|
|
87
|
-
{% if params.newTabWarning
|
|
87
|
+
{% if params.newTabWarning %}
|
|
88
88
|
<div class="ons-grid__col">
|
|
89
89
|
<p class="ons-u-fs-s ons-u-mb-m ons-footer__new-tab-warning">{{ params.newTabWarning | safe }}</p>
|
|
90
90
|
</div>
|
|
91
91
|
{% endif %}
|
|
92
92
|
|
|
93
|
-
{% if params.cols
|
|
93
|
+
{% if params.cols %}
|
|
94
94
|
{% for col in params.cols %}
|
|
95
95
|
<!-- Full footer columns -->
|
|
96
96
|
<div class="ons-grid__col ons-col-4@m{{ ' ons-u-mt-m@xxs@m' if loop.index > 1 }}">
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}}
|
|
107
107
|
</div>
|
|
108
108
|
{% endfor %}
|
|
109
|
-
{% elif params.rows
|
|
109
|
+
{% elif params.rows %}
|
|
110
110
|
{% for row in params.rows %}
|
|
111
111
|
<!-- Transactional footer row -->
|
|
112
112
|
<div class="ons-grid__col">
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
{% endfor %}
|
|
122
122
|
{% endif %}
|
|
123
123
|
|
|
124
|
-
{% if (params.cols
|
|
124
|
+
{% if (params.cols) or (params.rows) %}
|
|
125
125
|
<div class="ons-grid__col ons-u-mb-m">
|
|
126
126
|
<hr class="ons-footer__hr">
|
|
127
127
|
</div>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
|
|
132
132
|
<div class="ons-grid ons-grid--flex ons-grid--vertical-top ons-grid--between">
|
|
133
133
|
<div class="ons-grid__col">
|
|
134
|
-
{% if params.legal
|
|
134
|
+
{% if params.legal %}
|
|
135
135
|
<!-- Legal -->
|
|
136
136
|
{% for legal in params.legal %}
|
|
137
137
|
{{
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
{% endfor %}
|
|
145
145
|
{% endif %}
|
|
146
146
|
|
|
147
|
-
{% if params.OGLLink
|
|
147
|
+
{% if params.OGLLink %}
|
|
148
148
|
<!-- OGL -->
|
|
149
149
|
<div class="ons-footer__license ons-u-mb-m">
|
|
150
150
|
{{
|
|
@@ -152,9 +152,9 @@
|
|
|
152
152
|
"iconType": 'ogl'
|
|
153
153
|
})
|
|
154
154
|
}}
|
|
155
|
-
{% if params.OGLLink.HTML
|
|
155
|
+
{% if params.OGLLink.HTML %}
|
|
156
156
|
{{ params.OGLLink.HTML | safe }}
|
|
157
|
-
{% elif params.OGLLink
|
|
157
|
+
{% elif params.OGLLink %}
|
|
158
158
|
{% from "components/external-link/_macro.njk" import onsExternalLink %}
|
|
159
159
|
{% if params.lang == 'cy' %}
|
|
160
160
|
{{ params.OGLLink.pre | default('Mae’r holl gynnwys ar gael o dan y') }} {{
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</div>
|
|
176
176
|
{% endif %}
|
|
177
177
|
|
|
178
|
-
{% if params.poweredBy
|
|
178
|
+
{% if params.poweredBy %}
|
|
179
179
|
{% if not params.poweredBy.partnership %}
|
|
180
180
|
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
181
181
|
{{ poweredByLogo | safe }}
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
{% endif %}
|
|
189
189
|
</div>
|
|
190
190
|
|
|
191
|
-
{% if params.crest
|
|
191
|
+
{% if params.crest %}
|
|
192
192
|
<!-- Crest -->
|
|
193
193
|
<div class="ons-grid__col ons-footer__crest ons-u-mb-m@xxs@l">
|
|
194
194
|
{{
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
{% endif %}
|
|
201
201
|
</div>
|
|
202
202
|
|
|
203
|
-
{% if (params.poweredBy
|
|
203
|
+
{% if (params.poweredBy) and (params.poweredBy.partnership) %}
|
|
204
204
|
<div class="ons-grid ons-grid--flex ons-grid--vertical-bottom ons-grid--between ons-u-mt-l">
|
|
205
205
|
<div class="ons-grid__col ons-footer__poweredby ons-u-mb-m">
|
|
206
206
|
{{ poweredByLogo | safe }}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
</div>
|
|
230
230
|
{% endif %}
|
|
231
231
|
|
|
232
|
-
{% if params.copyrightDeclaration
|
|
232
|
+
{% if params.copyrightDeclaration %}
|
|
233
233
|
<!-- Copyright -->
|
|
234
234
|
<div class="ons-grid">
|
|
235
235
|
<div class="ons-grid__col">
|