@ons/design-system 70.0.16 → 72.0.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.
Files changed (212) hide show
  1. package/README.md +10 -1
  2. package/components/access-code/_macro.njk +4 -4
  3. package/components/access-code/_macro.spec.js +10 -10
  4. package/components/access-code/example-access-code-error.njk +2 -2
  5. package/components/access-code/example-access-code.njk +2 -2
  6. package/components/accordion/_macro.njk +1 -1
  7. package/components/accordion/_macro.spec.js +162 -91
  8. package/components/accordion/_test_examples.js +13 -0
  9. package/components/address-input/_macro.njk +7 -7
  10. package/components/address-input/_macro.spec.js +16 -15
  11. package/components/address-input/autosuggest.address.error.js +1 -1
  12. package/components/address-input/autosuggest.address.js +25 -25
  13. package/components/address-input/autosuggest.address.spec.js +6 -5
  14. package/components/address-input/example-address-input-editable.njk +5 -4
  15. package/components/address-input/example-address-input.njk +4 -5
  16. package/components/autosuggest/_autosuggest.scss +8 -8
  17. package/components/autosuggest/_macro.njk +5 -5
  18. package/components/autosuggest/autosuggest.spec.js +1 -1
  19. package/components/back-to-top/_back-to-top.scss +2 -2
  20. package/components/back-to-top/_macro.spec.js +1 -1
  21. package/components/back-to-top/example-full-page-back-to-top.njk +6 -6
  22. package/components/breadcrumbs/_breadcrumbs.scss +1 -1
  23. package/components/breadcrumbs/_macro.spec.js +121 -115
  24. package/components/breadcrumbs/_test_examples.js +36 -0
  25. package/components/browser-banner/_macro.spec.js +1 -1
  26. package/components/button/_button.scss +24 -16
  27. package/components/button/_macro.njk +5 -5
  28. package/components/button/_macro.spec.js +2 -2
  29. package/components/button/example-button-custom.njk +1 -1
  30. package/components/card/_card.scss +0 -6
  31. package/components/card/_macro.njk +9 -9
  32. package/components/card/_macro.spec.js +57 -24
  33. package/components/card/example-card-set-with-images.njk +30 -18
  34. package/components/card/example-card-set-with-lists.njk +57 -45
  35. package/components/card/example-card-set.njk +27 -15
  36. package/components/card/example-card.njk +9 -5
  37. package/components/char-check-limit/_macro.njk +1 -1
  38. package/components/checkboxes/_checkbox.scss +4 -4
  39. package/components/checkboxes/_checkboxes.scss +1 -1
  40. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +4 -4
  41. package/components/cookies-banner/_cookies-banner.scss +5 -5
  42. package/components/cookies-banner/_macro.njk +15 -13
  43. package/components/cookies-banner/_macro.spec.js +1 -1
  44. package/components/details/_details.scss +5 -6
  45. package/components/details/_macro.njk +4 -4
  46. package/components/details/_macro.spec.js +1 -1
  47. package/components/document-list/_document-list.scss +0 -2
  48. package/components/document-list/_macro.njk +18 -18
  49. package/components/document-list/_macro.spec.js +16 -14
  50. package/components/document-list/example-document-list-article-featured.njk +5 -3
  51. package/components/document-list/example-document-list-articles.njk +15 -9
  52. package/components/document-list/example-document-list-downloads.njk +15 -9
  53. package/components/document-list/example-document-list-search-result-featured.njk +5 -3
  54. package/components/document-list/example-document-list-search-results.njk +20 -12
  55. package/components/download-resources/_download-resources.scss +1 -2
  56. package/components/download-resources/download-resources.spec.js +12 -6
  57. package/components/external-link/_macro.njk +1 -1
  58. package/components/external-link/_macro.spec.js +1 -1
  59. package/components/external-link/example-external-link.njk +1 -1
  60. package/components/feedback/_macro.njk +1 -1
  61. package/components/feedback/_macro.spec.js +3 -3
  62. package/components/feedback/example-feedback-call-to-action.njk +1 -1
  63. package/components/field/_field-group.scss +0 -2
  64. package/components/field/_field.scss +1 -2
  65. package/components/fieldset/_fieldset.scss +2 -2
  66. package/components/fieldset/_macro.njk +1 -1
  67. package/components/fieldset/_macro.spec.js +1 -1
  68. package/components/footer/_footer.scss +12 -7
  69. package/components/footer/_macro.njk +54 -34
  70. package/components/footer/_macro.spec.js +90 -28
  71. package/components/footer/example-footer-cymraeg.njk +1 -1
  72. package/components/footer/example-footer-transactional.njk +1 -1
  73. package/components/footer/example-footer-warning.njk +1 -1
  74. package/components/footer/example-footer-with-alternative-organisation.njk +99 -94
  75. package/components/footer/example-footer-with-coat-of-arms.njk +1 -1
  76. package/components/footer/example-footer-with-copyright.njk +1 -1
  77. package/components/footer/example-footer-with-multiple-logos-and-split-display.njk +173 -0
  78. package/components/footer/example-footer-with-multiple-logos.njk +172 -0
  79. package/components/footer/example-footer.njk +1 -1
  80. package/components/header/_header.scss +7 -14
  81. package/components/header/_macro.njk +19 -19
  82. package/components/header/_macro.spec.js +18 -18
  83. package/components/header/example-header-external-for-surveys.njk +2 -2
  84. package/components/header/example-header-external-welsh.njk +2 -2
  85. package/components/header/example-header-external-with-sub-navigation-removed.njk +1 -1
  86. package/components/header/example-header-external-with-sub-navigation.njk +1 -1
  87. package/components/header/example-header-multiple-logos.njk +4 -4
  88. package/components/hero/_hero.scss +6 -8
  89. package/components/hero/_macro.njk +1 -1
  90. package/components/icon/_icon.scss +4 -4
  91. package/components/icon/_macro.njk +4 -4
  92. package/components/icon/_macro.spec.js +2 -2
  93. package/components/image/_image.scss +1 -1
  94. package/components/image/_macro.njk +1 -1
  95. package/components/image/_macro.spec.js +10 -10
  96. package/components/image/example-image-for-regular-screens.njk +1 -1
  97. package/components/input/_input-type.scss +0 -2
  98. package/components/input/_input.scss +10 -10
  99. package/components/input/_macro.njk +4 -2
  100. package/components/input/example-input-search-with-character-check.njk +1 -1
  101. package/components/input/example-input-search.njk +1 -1
  102. package/components/label/_label.scss +1 -3
  103. package/components/language-selector/_macro.njk +3 -3
  104. package/components/language-selector/_macro.spec.js +7 -7
  105. package/components/list/_list.scss +1 -5
  106. package/components/list/_macro.njk +9 -10
  107. package/components/list/_macro.spec.js +50 -9
  108. package/components/list/example-inline-list-with-social-icon-prefix.njk +1 -1
  109. package/components/message/_macro.njk +3 -3
  110. package/components/message/_macro.spec.js +3 -3
  111. package/components/message-list/_macro.njk +2 -2
  112. package/components/message-list/_macro.spec.js +8 -4
  113. package/components/message-list/_message-list.scss +2 -2
  114. package/components/navigation/_macro.njk +9 -9
  115. package/components/navigation/_macro.spec.js +2 -2
  116. package/components/navigation/_navigation.scss +2 -6
  117. package/components/navigation/navigation.dom.js +1 -1
  118. package/components/navigation/navigation.spec.js +4 -4
  119. package/components/pagination/_macro.njk +2 -2
  120. package/components/pagination/_pagination.scss +1 -7
  121. package/components/panel/_macro.njk +5 -4
  122. package/components/panel/_macro.spec.js +2 -2
  123. package/components/panel/_panel.scss +12 -8
  124. package/components/password/_macro.njk +1 -1
  125. package/components/password/_macro.spec.js +2 -2
  126. package/components/phase-banner/_macro.njk +1 -1
  127. package/components/phase-banner/_phase-banner.scss +3 -4
  128. package/components/phase-banner/example-phase-banner-alpha.njk +1 -1
  129. package/components/phase-banner/example-phase-banner-beta.njk +1 -1
  130. package/components/question/_macro.njk +8 -8
  131. package/components/question/_macro.spec.js +3 -3
  132. package/components/question/_question.scss +3 -3
  133. package/components/radios/_macro.njk +1 -1
  134. package/components/radios/_macro.spec.js +1 -1
  135. package/components/radios/_radios.scss +1 -1
  136. package/components/radios/example-radios-with-clear-button-expanded.njk +1 -1
  137. package/components/radios/example-radios-with-clear-button.njk +1 -1
  138. package/components/related-content/_macro.spec.js +2 -2
  139. package/components/related-content/_related-content.scss +1 -1
  140. package/components/related-content/example-related-content-general.njk +2 -2
  141. package/components/related-content/example-related-content-social-media.njk +1 -1
  142. package/components/reply/_macro.njk +3 -1
  143. package/components/reply/_macro.spec.js +1 -1
  144. package/components/reply/reply.spec.js +1 -1
  145. package/components/section-navigation/_macro.njk +10 -10
  146. package/components/section-navigation/_macro.spec.js +15 -15
  147. package/components/section-navigation/_section-navigation.scss +3 -8
  148. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +3 -3
  149. package/components/section-navigation/example-section-navigation-vertical.njk +14 -14
  150. package/components/section-navigation/example-section-navigation.njk +3 -3
  151. package/components/select/example-select-with-inline-label.njk +1 -1
  152. package/components/share-page/_macro.njk +7 -7
  153. package/components/share-page/_macro.spec.js +2 -2
  154. package/components/share-page/example-share-page.njk +1 -1
  155. package/components/status/_status.scss +1 -1
  156. package/components/summary/_macro.njk +33 -33
  157. package/components/summary/_macro.spec.js +34 -34
  158. package/components/summary/_summary.scss +2 -4
  159. package/components/summary/example-summary-card-grouped.njk +34 -34
  160. package/components/summary/example-summary-grouped-total.njk +7 -7
  161. package/components/summary/example-summary-grouped-with-errors.njk +9 -9
  162. package/components/summary/example-summary-grouped.njk +34 -34
  163. package/components/summary/example-summary-household.njk +7 -7
  164. package/components/summary/example-summary-hub-minimal.njk +8 -8
  165. package/components/summary/example-summary-hub.njk +16 -16
  166. package/components/summary/example-summary-multiple.njk +7 -7
  167. package/components/summary/example-summary-no-action.njk +5 -5
  168. package/components/summary/example-summary.njk +9 -9
  169. package/components/table/_table.scss +2 -3
  170. package/components/table-of-contents/_macro.njk +3 -3
  171. package/components/table-of-contents/_macro.spec.js +3 -3
  172. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
  173. package/components/tabs/_macro.njk +3 -3
  174. package/components/tabs/_macro.spec.js +3 -3
  175. package/components/tabs/_tabs.scss +3 -4
  176. package/components/tabs/example-tabs-details.njk +1 -1
  177. package/components/text-indent/_text-indent.scss +1 -1
  178. package/components/text-indent/example-text-indent.njk +1 -1
  179. package/components/timeline/_macro.njk +4 -4
  180. package/components/timeline/_macro.spec.js +3 -3
  181. package/components/timeline/_timeline.scss +4 -3
  182. package/components/timeline/example-timeline.njk +1 -1
  183. package/components/upload/_upload.scss +2 -2
  184. package/components/video/_macro.njk +4 -4
  185. package/components/video/_macro.spec.js +2 -2
  186. package/components/video/_video.scss +1 -1
  187. package/components/video/example-video.njk +2 -2
  188. package/components/video/video.spec.js +2 -2
  189. package/css/main.css +1 -1
  190. package/layout/_dsTemplate.njk +1 -1
  191. package/layout/_template.njk +31 -31
  192. package/package.json +3 -2
  193. package/scripts/main.es5.js +1 -1
  194. package/scripts/main.js +1 -1
  195. package/scss/base/_global.scss +2 -0
  196. package/scss/base/_typography.scss +0 -2
  197. package/scss/main.scss +0 -1
  198. package/scss/objects/_container.scss +1 -1
  199. package/scss/objects/_page.scss +2 -3
  200. package/scss/overrides/rtl.scss +1 -1
  201. package/scss/utilities/_grid.scss +103 -96
  202. package/scss/utilities/_margin.scss +11 -5
  203. package/scss/utilities/_padding.scss +12 -5
  204. package/scss/utilities/_typography.scss +2 -1
  205. package/scss/vars/_forms.scss +8 -10
  206. package/scss/vars/_grid.scss +4 -4
  207. package/scss/vars/_typography.scss +26 -19
  208. package/components/call-to-action/_call-to-action.scss +0 -8
  209. package/components/call-to-action/_macro.njk +0 -24
  210. package/components/call-to-action/_macro.spec.js +0 -48
  211. package/components/call-to-action/example-call-to-action-default.njk +0 -15
  212. package/components/metadata/_macro.njk +0 -14
@@ -6,10 +6,12 @@
6
6
  {
7
7
  "featured": true,
8
8
  "showMetadataFirst": true,
9
- "url": '#0',
10
- "title": 'Crime and justice',
9
+ "title": {
10
+ "text": 'Crime and justice',
11
+ "url": '#0'
12
+ },
11
13
  "metadata": {
12
- "type": {
14
+ "object": {
13
15
  "text": 'Topic'
14
16
  }
15
17
  },
@@ -6,10 +6,12 @@
6
6
  {
7
7
  "featured": true,
8
8
  "showMetadataFirst": true,
9
- "url": '#0',
10
- "title": 'Crime and justice',
9
+ "title": {
10
+ "text": 'Crime and justice',
11
+ "url": '#0'
12
+ },
11
13
  "metadata": {
12
- "type": {
14
+ "object": {
13
15
  "text": 'Topic'
14
16
  }
15
17
  },
@@ -17,10 +19,12 @@
17
19
  <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
18
20
  },
19
21
  {
20
- "url": '#0',
21
- "title": 'Disability and crime',
22
+ "title": {
23
+ "text": 'Disability and crime',
24
+ "url": '#0'
25
+ },
22
26
  "metadata": {
23
- "type": {
27
+ "object": {
24
28
  "text": 'Dataset'
25
29
  },
26
30
  "date": {
@@ -33,10 +37,12 @@
33
37
  "description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <mark>Crime</mark> Survey for England and Wales (CSEW) data.</p>'
34
38
  },
35
39
  {
36
- "url": '#0',
37
- "title": 'Disability and crime, UK: 2019 (Latest release)',
40
+ "title": {
41
+ "text": 'Disability and crime, UK: 2019 (Latest release)',
42
+ "url": '#0'
43
+ },
38
44
  "metadata": {
39
- "type": {
45
+ "object": {
40
46
  "text": 'Statistical bulletin'
41
47
  },
42
48
  "date": {
@@ -49,10 +55,12 @@
49
55
  "description": '<p>An overview of published data on disability and <mark>crime</mark> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
50
56
  },
51
57
  {
52
- "url": '#0',
53
- "title": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016',
58
+ "title": {
59
+ "text": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016',
60
+ "url": '#0'
61
+ },
54
62
  "metadata": {
55
- "type": {
63
+ "object": {
56
64
  "text": 'User requested data',
57
65
  "ref": 'Ref 008052'
58
66
  },
@@ -34,8 +34,7 @@
34
34
 
35
35
  .ons-label {
36
36
  font-weight: $font-weight-regular;
37
- margin-bottom: 0;
38
- margin-right: 0.5rem;
37
+ margin: 0 0.5rem 0 0;
39
38
  }
40
39
 
41
40
  .ons-input--select {
@@ -147,8 +147,10 @@ const EXAMPLE_PAGE = `
147
147
  'data-filter': 'general-public booklet',
148
148
  'data-sort-index': '1',
149
149
  },
150
- url: '/example-booklet-1',
151
- title: 'Example booklet 1',
150
+ title: {
151
+ url: '/example-booklet-1',
152
+ text: 'Example booklet 1',
153
+ },
152
154
  description: 'The first example booklet.',
153
155
  },
154
156
  {
@@ -157,8 +159,10 @@ const EXAMPLE_PAGE = `
157
159
  'data-filter': 'general-public booklet logo',
158
160
  'data-sort-index': '2',
159
161
  },
160
- url: '/example-booklet-2',
161
- title: 'Example booklet 2 with logo',
162
+ title: {
163
+ url: '/example-booklet-2',
164
+ text: 'Example booklet 2 with logo',
165
+ },
162
166
  description: 'The second example booklet with a logo.',
163
167
  },
164
168
  {
@@ -167,8 +171,10 @@ const EXAMPLE_PAGE = `
167
171
  'data-filter': 'logo',
168
172
  'data-sort-index': '3',
169
173
  },
170
- url: '/example-logo',
171
- title: 'Example logo',
174
+ title: {
175
+ url: '/example-logo',
176
+ text: 'Example logo',
177
+ },
172
178
  description: 'An example logo.',
173
179
  },
174
180
  ],
@@ -2,7 +2,7 @@
2
2
 
3
3
  {% macro onsExternalLink(params) %}
4
4
  <a href="{{ params.url }}" class="ons-external-link{{ ' ' + params.classes if params.classes else '' }}" target="_blank" rel="noopener">
5
- <span class="ons-external-link__text"> {{- params.linkText | safe -}} </span
5
+ <span class="ons-external-link__text"> {{- params.text | safe -}} </span
6
6
  ><span class="ons-external-link__icon">&nbsp;{{- onsIcon({"iconType": 'external-link'}) -}} </span
7
7
  ><span class="ons-external-link__new-window-description ons-u-vh"
8
8
  >({{- params.newWindowDescription | default("opens in a new tab") -}})</span
@@ -7,7 +7,7 @@ import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
7
7
 
8
8
  const EXAMPLE_EXTERNAL_LINK = {
9
9
  url: 'http://example.com',
10
- linkText: 'Example link',
10
+ text: 'Example link',
11
11
  };
12
12
 
13
13
  describe('macro: external-link', () => {
@@ -5,7 +5,7 @@
5
5
  {{
6
6
  onsExternalLink({
7
7
  "url": "#0",
8
- "linkText": "link to an external website"
8
+ "text": "link to an external website"
9
9
  })
10
10
  }}
11
11
  </p>
@@ -7,6 +7,6 @@
7
7
  {{ params.heading }}
8
8
  {{ closingHeadingTag | safe }}
9
9
  <p class="ons-feedback__content">{{- params.content | safe -}}</p>
10
- <a href="{{ params.url }}" class="ons-feedback__link">{{- params.linkText -}}</a>
10
+ <a href="{{ params.linkUrl }}" class="ons-feedback__link">{{- params.linkText -}}</a>
11
11
  </div>
12
12
  {% endmacro %}
@@ -8,7 +8,7 @@ import { renderComponent } from '../../tests/helpers/rendering';
8
8
  const EXAMPLE_FEEDBACK_MINIMAL = {
9
9
  heading: 'Feedback heading',
10
10
  content: 'Feedback content...',
11
- url: 'http://example.com',
11
+ linkUrl: 'http://example.com',
12
12
  linkText: 'Feedback link text',
13
13
  };
14
14
 
@@ -19,7 +19,7 @@ const EXAMPLE_FEEDBACK_FULL = {
19
19
  headingLevel: 5,
20
20
  headingClasses: 'extra-heading-class another-extra-heading-class',
21
21
  content: 'Feedback content...',
22
- url: 'http://example.com',
22
+ linkUrl: 'http://example.com',
23
23
  linkText: 'Feedback link text',
24
24
  };
25
25
 
@@ -92,7 +92,7 @@ describe('macro: feedback', () => {
92
92
  expect($('p').text().trim()).toBe('Feedback content...');
93
93
  });
94
94
 
95
- it('has a link with the provided `url`', () => {
95
+ it('has a link with the provided `linkUrl`', () => {
96
96
  const $ = cheerio.load(renderComponent('feedback', EXAMPLE_FEEDBACK_MINIMAL));
97
97
 
98
98
  expect($('.ons-feedback__link').attr('href')).toBe('http://example.com');
@@ -6,7 +6,7 @@
6
6
  "heading": "What do you think about this service?",
7
7
  "headingClasses": 'test',
8
8
  "content": "Your comments will help us make improvements",
9
- "url": "#0",
9
+ "linkUrl": "#0",
10
10
  "linkText": "Give feedback"
11
11
  })
12
12
  }}
@@ -1,12 +1,10 @@
1
1
  .ons-field-group {
2
- font-size: 0;
3
2
  display: flex;
4
3
  flex-wrap: wrap;
5
4
  gap: 1rem;
6
5
 
7
6
  .ons-field {
8
7
  display: inline-block;
9
- font-size: 1rem;
10
8
  margin-top: 0;
11
9
  vertical-align: top;
12
10
  }
@@ -17,8 +17,7 @@
17
17
  display: flex;
18
18
 
19
19
  .ons-label {
20
- margin-bottom: 0;
21
- margin-right: 0.5rem;
20
+ margin: 0 0.5rem 0 0;
22
21
  }
23
22
  }
24
23
  }
@@ -3,7 +3,7 @@
3
3
  font-weight: $font-weight-bold;
4
4
  margin: 0;
5
5
  &:not(&--with-description) {
6
- margin-bottom: 0.55rem;
6
+ margin-bottom: 0.5rem;
7
7
  }
8
8
  &-title {
9
9
  display: block;
@@ -19,7 +19,7 @@
19
19
  &__description:not(&__description--title) {
20
20
  @extend .ons-label__description;
21
21
 
22
- margin-bottom: 0.55rem;
22
+ margin-bottom: 0.5rem;
23
23
  }
24
24
 
25
25
  &__description--title {
@@ -29,7 +29,7 @@
29
29
  {%- if params.description -%}
30
30
  <div
31
31
  id="{{ descriptionId }}"
32
- class="ons-fieldset__description{{ ' ons-fieldset__description--title ons-u-mb-m' if params.legendIsQuestionTitle }}"
32
+ class="ons-fieldset__description{{ ' ons-fieldset__description--title ons-u-mb-l' if params.legendIsQuestionTitle }}"
33
33
  >
34
34
  {{- params.description | safe -}}
35
35
  </div>
@@ -183,7 +183,7 @@ describe('macro: fieldset', () => {
183
183
  const $ = cheerio.load(renderComponent('fieldset', { ...EXAMPLE_FIELDSET_BASIC, legendIsQuestionTitle: true }));
184
184
 
185
185
  expect($('.ons-fieldset__description').hasClass('ons-fieldset__description--title')).toBe(true);
186
- expect($('.ons-fieldset__description').hasClass('ons-u-mb-m')).toBe(true);
186
+ expect($('.ons-fieldset__description').hasClass('ons-u-mb-l')).toBe(true);
187
187
  });
188
188
  });
189
189
  });
@@ -13,6 +13,9 @@
13
13
  background-clip: border-box;
14
14
  background-color: var(--ons-color-header);
15
15
  padding: 1rem;
16
+ a {
17
+ text-decoration: none;
18
+ }
16
19
  }
17
20
 
18
21
  &__warning {
@@ -25,16 +28,18 @@
25
28
  }
26
29
 
27
30
  &__ogl-img {
28
- margin: 0 0.5rem 0.2rem 0;
31
+ margin: 0 0.5rem 0.25rem 0;
29
32
  max-width: 100%;
30
33
  vertical-align: middle;
31
34
  }
32
35
 
33
- &__poweredBy-link {
34
- &:focus {
35
- .ons-icon--logo {
36
- @extend %a-focus;
37
- }
36
+ &__logo-container {
37
+ gap: 1rem;
38
+
39
+ svg,
40
+ img {
41
+ max-height: 30px;
42
+ width: auto;
38
43
  }
39
44
  }
40
45
 
@@ -54,7 +59,7 @@
54
59
 
55
60
  &--rows {
56
61
  li {
57
- margin-bottom: 0.5rem !important;
62
+ @extend .ons-u-mb-2xs;
58
63
  }
59
64
  }
60
65
  }
@@ -7,12 +7,12 @@
7
7
  {% else %}
8
8
  {% set lang = 'en' %}
9
9
  {% endif %}
10
-
10
+ {% set extraLogo = params.footerLogo.logos.logo2 %}
11
11
  {% set onsLogo %}
12
12
  {% if params.lang == 'cy' %}
13
13
  {{-
14
14
  onsIcon({
15
- "iconType": 'ons-logo-cy',
15
+ "iconType": 'ons-logo-stacked-cy' if extraLogo else 'ons-logo-cy',
16
16
  "altText": 'Swyddfa Ystadegau Gwladol',
17
17
  "altTextId": 'ons-logo-cy-footer-alt'
18
18
  })
@@ -20,7 +20,7 @@
20
20
  {% else %}
21
21
  {{-
22
22
  onsIcon({
23
- "iconType": 'ons-logo-en',
23
+ "iconType": 'ons-logo-stacked-en' if extraLogo else 'ons-logo-en' ,
24
24
  "altText": 'Office for National Statistics',
25
25
  "altTextId": 'ons-logo-en-footer-alt'
26
26
  })
@@ -69,18 +69,20 @@
69
69
  data-analytics="footer"
70
70
  {% if params.attributes %}{% for attribute, value in (params.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
71
71
  >
72
- <div class="ons-container{{ ' ons-container--full-width' if params.fullWidth }}{{ ' ons-container--wide' if params.wide }}">
72
+ <div
73
+ class="ons-container{{ ' ons-container--full-width' if params.fullWidth else "" }}{{ ' ons-container--wide' if params.wide else "" }}"
74
+ >
73
75
  <div class="ons-grid">
74
76
  {% if params.newTabWarning %}
75
77
  <div class="ons-grid__col">
76
- <p class="ons-u-fs-s ons-u-mb-m ons-footer__new-tab-warning">{{ params.newTabWarning | safe }}</p>
78
+ <p class="ons-u-fs-s ons-u-mb-l ons-footer__new-tab-warning">{{ params.newTabWarning | safe }}</p>
77
79
  </div>
78
80
  {% endif %}
79
81
 
80
82
  {% if params.cols %}
81
83
  {% for col in params.cols %}
82
84
  <!-- Full footer columns -->
83
- <div class="ons-grid__col ons-col-4@m{{ ' ons-u-mt-m@xxs@m' if loop.index > 1 }}">
85
+ <div class="ons-grid__col ons-col-4@m{{ ' ons-u-mt-l@2xs@m' if loop.index > 1 }}">
84
86
  {% if col.title %}
85
87
  <h2 class="ons-footer__heading ons-u-fs-r--b">{{ col.title }}</h2>
86
88
  {% endif %}
@@ -109,13 +111,13 @@
109
111
  {% endif %}
110
112
 
111
113
  {% if (params.cols) or (params.rows) %}
112
- <div class="ons-grid__col ons-u-mb-m">
114
+ <div class="ons-grid__col ons-u-mb-l">
113
115
  <hr class="ons-footer__hr" />
114
116
  </div>
115
117
  {% endif %}
116
118
  </div>
117
119
 
118
- <div class="ons-grid ons-grid--flex ons-grid--vertical-top ons-grid--between">
120
+ <div class="ons-grid{{ ' ons-grid-flex' if params.crest else "" }} ons-grid-flex--vertical-top ons-grid-flex--between">
119
121
  <div class="ons-grid__col">
120
122
  {% if params.legal %}
121
123
  <!-- Legal -->
@@ -130,50 +132,71 @@
130
132
  {% endfor %}
131
133
  {% endif %}
132
134
 
133
- {% if params.OGLLink %}
135
+ {% if params.oglLink %}
134
136
  <!-- OGL -->
135
- <div class="ons-footer__license ons-u-mb-m">
137
+ <div class="ons-footer__license ons-u-mb-l">
136
138
  {{-
137
139
  onsIcon({
138
140
  "iconType": 'ogl'
139
141
  })
140
142
  -}}
141
- {% if params.OGLLink.HTML %}
142
- {{ params.OGLLink.HTML | safe }}
143
- {% elif params.OGLLink %}
143
+ {% if params.oglLink.html %}
144
+ {{ params.oglLink.html | safe }}
145
+ {% elif params.oglLink %}
144
146
  {% from "components/external-link/_macro.njk" import onsExternalLink %}
145
147
  {% if params.lang == 'cy' %}
146
- {{ params.OGLLink.pre | default('Mae’r holl gynnwys ar gael o dan y') }}
148
+ {{ params.oglLink.pre | default('Mae’r holl gynnwys ar gael o dan y') }}
147
149
  {{
148
150
  onsExternalLink({
149
- "url": params.OGLLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
150
- "linkText": params.OGLLink.link | default('Drwydded Llywodraeth Leol v3.0')
151
+ "url": params.oglLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
152
+ "text": params.oglLink.text | default('Drwydded Llywodraeth Leol v3.0')
151
153
  })
152
- }}{{ params.OGLLink.post | default(', oni bai y nodir fel arall') }}
154
+ }}{{ params.oglLink.post | default(', oni bai y nodir fel arall') }}
153
155
  {% else %}
154
- {{ params.OGLLink.pre | default('All content is available under the') }}
156
+ {{ params.oglLink.pre | default('All content is available under the') }}
155
157
  {{
156
158
  onsExternalLink({
157
- "url": params.OGLLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
158
- "linkText": params.OGLLink.link | default('Open Government Licence v3.0')
159
+ "url": params.oglLink.url | default('https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
160
+ "text": params.oglLink.text | default('Open Government Licence v3.0')
159
161
  })
160
- }}{{ params.OGLLink.post | default(', except where otherwise stated') }}
162
+ }}{{ params.oglLink.post | default(', except where otherwise stated') }}
161
163
  {% endif %}
162
164
  {% endif %}
163
165
  </div>
164
166
  {% endif %}
165
- {% if not params.poweredBy %}
166
- <a
167
- class="ons-footer__poweredBy-link"
168
- {% if lang == "cy" %}href="https://cy.ons.gov.uk/"{% else %}href="https://www.ons.gov.uk/"{% endif %}
169
- >
170
- <div class="ons-footer__poweredby-logo ons-u-mb-m">{{ onsLogo | safe }}</div>
171
- </a>
167
+
168
+ {% if not params.footerLogo.logos.logo1 %}
169
+ {%
170
+ set logo1 = {
171
+ 'logoUrl': 'https://cy.ons.gov.uk/' if lang == 'cy' else 'https://www.ons.gov.uk/',
172
+ 'logoImage': onsLogo | safe
173
+ }
174
+ %}
175
+ {% set logos = [logo1, params.footerLogo.logos.logo2] %}
176
+ {% else %}
177
+ {% set logos = [params.footerLogo.logos.logo1, params.footerLogo.logos.logo2] %}
172
178
  {% endif %}
179
+
180
+ <div
181
+ class="ons-footer__logo-container ons-u-mb-l ons-grid-flex ons-grid-flex--vertical-top{{ ' ons-grid-flex--between' if params.footerLogo.display == 'split' else "" }}"
182
+ >
183
+ {% for logo in logos %}
184
+ {%- if logo.logoUrl -%}
185
+ <a
186
+ class="ons-footer__logo-link{{ ' ons-u-mr-s' if extraLogo and loop.index == 1 else "" }}"
187
+ href="{{ logo.logoUrl }}"
188
+ >{{ logo.logoImage | safe }}</a
189
+ >
190
+ {%- else -%}
191
+
192
+ {{ logo.logoImage | safe }}
193
+ {% endif %}
194
+ {% endfor %}
195
+ </div>
173
196
  </div>
174
197
  {% if params.crest %}
175
198
  <!-- Crest -->
176
- <div class="ons-grid__col ons-footer__crest ons-u-mb-m@xxs@l">
199
+ <div class="ons-grid__col ons-footer__crest ons-u-mb-l@2xs@l">
177
200
  {{-
178
201
  onsIcon({
179
202
  "iconType": 'crest'
@@ -182,15 +205,12 @@
182
205
  </div>
183
206
  {% endif %}
184
207
  </div>
185
- {% if params.poweredBy %}
186
- {{ params.poweredBy | safe }}
187
- {% endif %}
188
208
  {% if params.copyrightDeclaration %}
189
209
  <!-- Copyright -->
190
210
  {% set copyrightDeclaration = '&copy; ' + params.copyrightDeclaration.copyright + '<br /> ' + params.copyrightDeclaration.text %}
191
- <div class="ons-grid ons-grid--flex ons-grid--vertical-bottom ons-grid--between">
211
+ <div class="ons-grid ons-grid-flex ons-grid-flex--between">
192
212
  <div class="ons-grid__col">
193
- <p class="ons-u-fs-s ons-u-mb-no ons-footer__copyright">{{- copyrightDeclaration | safe -}}</p>
213
+ <p class="ons-u-fs-s ons-u-mb-l ons-footer__copyright">{{- copyrightDeclaration | safe -}}</p>
194
214
  </div>
195
215
  </div>
196
216
  {% endif %}