govuk_publishing_components 24.9.0 → 24.10.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +7 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +36 -6
  4. data/app/assets/javascripts/govuk_publishing_components/components/show-password.js +12 -0
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +34 -34
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +0 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +0 -8
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -37
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +1 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -11
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +4 -2
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +0 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +0 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +0 -1
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +4 -4
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -4
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +20 -20
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +0 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +0 -4
  22. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +16 -2
  23. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +0 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss +2 -0
  25. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +15 -0
  26. data/app/views/govuk_publishing_components/component_guide/index.html.erb +2 -2
  27. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  28. data/app/views/govuk_publishing_components/components/_accordion.html.erb +25 -0
  29. data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +1 -1
  30. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
  31. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
  33. data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
  34. data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_show_password.html.erb +2 -0
  36. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +4 -4
  37. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +3 -3
  38. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
  39. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +9 -27
  40. data/app/views/govuk_publishing_components/components/docs/accordion.yml +73 -73
  41. data/app/views/govuk_publishing_components/components/docs/show_password.yml +10 -0
  42. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +5 -0
  43. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +1 -1
  44. data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +2 -1
  45. data/config/locales/cy.yml +0 -5
  46. data/config/locales/en.yml +10 -6
  47. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -4
  48. data/lib/govuk_publishing_components/version.rb +1 -1
  49. metadata +22 -3
  50. data/app/assets/javascripts/component_guide/visual-regression.js +0 -71
@@ -20,7 +20,6 @@ $share-button-height: 32px;
20
20
  }
21
21
 
22
22
  .gem-c-share-links__link {
23
- @extend %govuk-link;
24
23
  @include govuk-font(16, $weight: bold);
25
24
  margin-right: govuk-spacing(6);
26
25
  text-decoration: none;
@@ -46,7 +46,3 @@
46
46
  .gem-c-step-nav-related__link-item {
47
47
  margin-top: govuk-spacing(3);
48
48
  }
49
-
50
- .gem-c-step-nav-related__link {
51
- @extend %govuk-link;
52
- }
@@ -15,12 +15,12 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
15
15
 
16
16
  @mixin step-nav-line-position {
17
17
  left: 0;
18
- margin-left: em(($number-circle-size / 2) - ($stroke-width / 2), 16);
18
+ margin-left: govuk-em(($number-circle-size / 2) - ($stroke-width / 2), 16);
19
19
  }
20
20
 
21
21
  @mixin step-nav-line-position-large {
22
22
  left: 0;
23
- margin-left: em(($number-circle-size-large / 2) - ($stroke-width / 2), 16);
23
+ margin-left: govuk-em(($number-circle-size-large / 2) - ($stroke-width / 2), 16);
24
24
  }
25
25
 
26
26
  // custom mixin as govuk-font does undesirable things at different breakpoints
@@ -136,10 +136,10 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
136
136
  .gem-c-step-nav__chevron {
137
137
  display: inline-block;
138
138
  vertical-align: middle;
139
- margin-left: em(5, 14);
139
+ margin-left: govuk-em(5, 14);
140
140
 
141
141
  .gem-c-step-nav--large & {
142
- margin-left: em(5, 16);
142
+ margin-left: govuk-em(5, 16);
143
143
  }
144
144
 
145
145
  svg {
@@ -150,18 +150,18 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
150
150
  .gem-c-step-nav__button-text {
151
151
  display: inline-block;
152
152
  text-align: left;
153
- min-width: em(35, 14);
153
+ min-width: govuk-em(35, 14);
154
154
 
155
155
  .gem-c-step-nav--large & {
156
- min-width: em(40, 16);
156
+ min-width: govuk-em(40, 16);
157
157
  }
158
158
  }
159
159
 
160
160
  .gem-c-step-nav__button-text--all {
161
- min-width: em(87, 14);
161
+ min-width: govuk-em(87, 14);
162
162
 
163
163
  .gem-c-step-nav--large & {
164
- min-width: em(100, 16);
164
+ min-width: govuk-em(100, 16);
165
165
  }
166
166
  }
167
167
 
@@ -172,23 +172,23 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
172
172
 
173
173
  .gem-c-step-nav__step {
174
174
  position: relative;
175
- padding-left: em(govuk-spacing(6) + govuk-spacing(3), 16);
175
+ padding-left: govuk-em(govuk-spacing(6) + govuk-spacing(3), 16);
176
176
  list-style: none;
177
177
 
178
178
  // line down the side of a step
179
179
  &:after {
180
180
  @include step-nav-vertical-line;
181
181
  @include step-nav-line-position;
182
- top: em(govuk-spacing(3), 16);
182
+ top: govuk-em(govuk-spacing(3), 16);
183
183
  }
184
184
 
185
185
  .gem-c-step-nav--large & {
186
186
  @include govuk-media-query($from: tablet) {
187
- padding-left: em(govuk-spacing(9), 16);
187
+ padding-left: govuk-em(govuk-spacing(9), 16);
188
188
 
189
189
  &:after { // stylelint-disable-line max-nesting-depth
190
190
  @include step-nav-line-position-large;
191
- top: em(govuk-spacing(6), 16);
191
+ top: govuk-em(govuk-spacing(6), 16);
192
192
  }
193
193
  }
194
194
  }
@@ -246,8 +246,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
246
246
  z-index: 5;
247
247
  top: 3px;
248
248
  left: 0;
249
- width: em($number-circle-size, 16);
250
- height: em($number-circle-size, 16);
249
+ width: govuk-em($number-circle-size, 16);
250
+ height: govuk-em($number-circle-size, 16);
251
251
  color: govuk-colour("black");
252
252
  background: govuk-colour("white");
253
253
  border-radius: 100px;
@@ -256,8 +256,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
256
256
  .gem-c-step-nav--large & {
257
257
  @include govuk-media-query($from: tablet) {
258
258
  top: 11px;
259
- width: em($number-circle-size-large, 19);
260
- height: em($number-circle-size-large, 19);
259
+ width: govuk-em($number-circle-size-large, 19);
260
+ height: govuk-em($number-circle-size-large, 19);
261
261
  }
262
262
  }
263
263
  }
@@ -283,15 +283,15 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
283
283
  .gem-c-step-nav__circle--logic {
284
284
  @include step-nav-font(19, $weight: bold, $line-height: 28px);
285
285
  left: 3px;
286
- width: em($number-circle-size, 19);
287
- height: em($number-circle-size, 19);
286
+ width: govuk-em($number-circle-size, 19);
287
+ height: govuk-em($number-circle-size, 19);
288
288
 
289
289
  .gem-c-step-nav--large & {
290
290
  @include step-nav-font(19, $tablet-size: 24, $weight: bold, $line-height: 28px, $tablet-line-height: 34px);
291
291
 
292
292
  @include govuk-media-query($from: tablet) {
293
- width: em($number-circle-size-large, 24);
294
- height: em($number-circle-size-large, 24);
293
+ width: govuk-em($number-circle-size-large, 24);
294
+ height: govuk-em($number-circle-size-large, 24);
295
295
  }
296
296
  }
297
297
  }
@@ -44,7 +44,6 @@
44
44
  }
45
45
 
46
46
  .gem-c-subscription-links__item {
47
- @extend %govuk-link;
48
47
  display: inline-block;
49
48
  text-decoration: none;
50
49
  background-repeat: no-repeat;
@@ -30,10 +30,6 @@
30
30
  }
31
31
  }
32
32
 
33
- .gem-c-translation-nav__link {
34
- @extend %govuk-link;
35
- }
36
-
37
33
  .gem-c-translation-nav--inverse {
38
34
  border-color: govuk-colour("white");
39
35
 
@@ -1,7 +1,21 @@
1
- @import "govuk/components/button/button";
2
-
3
1
  // stylelint-disable scss/at-extend-no-missing-placeholder
4
2
  .gem-c-govspeak {
3
+ @import "govuk/components/button/button";
4
+
5
+ // Some links in Govspeak should look like buttons[1] when using:
6
+ // ```
7
+ // {button}[Random page](https://gov.uk/random){/button}
8
+ // ```.
9
+ //
10
+ // To make sure that the link styles don't override the button styles this
11
+ // needs more specificity.
12
+ //
13
+ // Govspeak targets link by using element selectors; so the selector
14
+ // `.gem-c-govspeak a:link` will override `.govuk-button`. Extending
15
+ // `govuk-button` here gives `gem-c-govspeak .gem-c-button` and prevents the
16
+ // link-that-looks-like-a-button from being overriden.
17
+
18
+ // [1]: https://github.com/alphagov/govspeak#button
5
19
  .gem-c-button {
6
20
  @extend .govuk-button;
7
21
  }
@@ -271,7 +271,6 @@
271
271
  }
272
272
 
273
273
  .mc-toggle-button {
274
- @extend %govuk-body-s;
275
274
  border: 1px solid $govuk-border-colour;
276
275
  color: $govuk-link-colour;
277
276
  cursor: pointer;
@@ -1,5 +1,7 @@
1
1
  // Convert pixels to em
2
2
  @function em($value, $gem-context-font-size) {
3
+ @warn "This function is deprecated and will be removed in the next major version release - use GOV.UK Frontend's `govuk-em()` instead.";
4
+
3
5
  @if (unitless($value)) {
4
6
  $value: $value * 1px;
5
7
  }
@@ -2,3 +2,18 @@
2
2
  // It provides govuk-frontend but adds no weight to the compiled CSS
3
3
  @import "components/helpers/govuk-frontend-settings";
4
4
  @import "govuk/base";
5
+
6
+ @import 'components/mixins/margins';
7
+ // TODO: remove this focus override when govuk_template is no longer used
8
+ @import 'components/mixins/govuk-template-link-focus-override';
9
+ @import 'components/mixins/css3';
10
+
11
+ $gem-secondary-button-colour: #00823b;
12
+ $gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%);
13
+ $gem-secondary-button-background-colour: govuk-colour("white");
14
+ $gem-secondary-button-hover-background-colour: govuk-colour("light-grey", $legacy: "grey-4");
15
+
16
+ $gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
17
+ $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
18
+
19
+ $gem-hover-dark-background: #dddcdb;
@@ -79,7 +79,7 @@
79
79
 
80
80
  <% unless ENV["MAIN_COMPONENT_GUIDE"] %>
81
81
  <h2 class="component-doc-h2">Components in this application (<%= @component_docs.length %>)</h2>
82
- <ul class="component-list">
82
+ <ul class="component-list" id="list-components-in-this-application">
83
83
  <% @component_docs.each do |component_doc| %>
84
84
  <li>
85
85
  <%= link_to component_doc.name, component_doc_path(component_doc.id), class: "govuk-link" %>
@@ -93,7 +93,7 @@
93
93
  <h2 class="component-doc-h2">All gem components (<%= @gem_component_docs.length %>)</h2>
94
94
  <% end %>
95
95
 
96
- <ul class="component-list">
96
+ <ul class="component-list" id="list-all-components-in-the-gem">
97
97
  <% @gem_component_docs.each do |component_doc| %>
98
98
  <li>
99
99
  <%= link_to component_doc.name, component_doc_path(component_doc.id), class: "govuk-link" %>
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  </div>
26
26
  <% end %>
27
- <p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
27
+ <p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %>.</p>
28
28
  </div>
29
29
  </div>
30
30
 
@@ -11,9 +11,34 @@
11
11
  accordion_classes << 'gem-c-accordion--condensed' if condensed
12
12
  accordion_classes << (shared_helper.get_margin_bottom)
13
13
 
14
+ translations = {
15
+ show_text: "components.accordion.show",
16
+ hide_text: "components.accordion.hide",
17
+ show_all_text: "components.accordion.show_all",
18
+ hide_all_text: "components.accordion.hide_all",
19
+ this_section_visually_hidden: "components.accordion.this_section_visually_hidden",
20
+ }
21
+
22
+ locales = {}
23
+
14
24
  data_attributes ||= {}
15
25
  data_attributes[:module] = 'gem-accordion'
16
26
  data_attributes[:anchor_navigation] = anchor_navigation
27
+
28
+ translations.each do |key, translation|
29
+ locales[key] = shared_helper.t_locale(translation)
30
+ data_attributes[key] = t(translation)
31
+ end
32
+
33
+ unique_locales = locales.values.uniq
34
+
35
+ if unique_locales.length > 1
36
+ data_attributes[:locale] = locales
37
+ else
38
+ if unique_locales[0] != I18n.locale
39
+ data_attributes[:locale] = unique_locales[0]
40
+ end
41
+ end
17
42
  %>
18
43
  <% if items.any? %>
19
44
  <%= tag.div(class: accordion_classes, id: id, data: data_attributes) do %>
@@ -17,7 +17,7 @@
17
17
  <%= link_to(
18
18
  content_item[:link].fetch(:text),
19
19
  content_item[:link].fetch(:path),
20
- class: "gem-c-highlight-boxes__title #{"gem-c-highlight-boxes__title--featured" if content_item[:link][:featured]}",
20
+ class: "govuk-link gem-c-highlight-boxes__title #{"gem-c-highlight-boxes__title--featured" if content_item[:link][:featured]}",
21
21
  data: content_item[:link][:data_attributes]
22
22
  )
23
23
  %>
@@ -18,12 +18,12 @@
18
18
  <header class="<%= header_classes.join(' ') %>" role="banner" data-module="govuk-header">
19
19
  <div class="govuk-header__container <%= width_class %>">
20
20
  <% if search_left %>
21
- <div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
21
+ <div class="govuk-grid-row">
22
22
  <div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
23
23
  <%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
24
24
  </div>
25
25
  </div>
26
- <div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
26
+ <div class="govuk-grid-row">
27
27
  <div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop gem-c-layout-header__search">
28
28
  <%= render "govuk_publishing_components/components/layout_header/search" %>
29
29
  </div>
@@ -10,7 +10,7 @@
10
10
 
11
11
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
12
12
 
13
- css_classes = %w(gem-c-notice)
13
+ css_classes = %w[gem-c-notice]
14
14
  css_classes << (shared_helper.get_margin_bottom)
15
15
 
16
16
  aria_attributes = aria_live ? {label: 'Notice', live: 'polite'} : {label: 'Notice'}
@@ -8,7 +8,7 @@
8
8
  <% if local_assigns.include?(:previous_page) %>
9
9
  <li class="gem-c-pagination__item gem-c-pagination__item--previous">
10
10
  <a href="<%= previous_page[:url] %>"
11
- class="gem-c-pagination__link"
11
+ class="govuk-link gem-c-pagination__link"
12
12
  rel="prev"
13
13
  data-track-category="contentsClicked"
14
14
  data-track-action="previous"
@@ -34,7 +34,7 @@
34
34
  <% if local_assigns.include?(:next_page) %>
35
35
  <li class="gem-c-pagination__item gem-c-pagination__item--next">
36
36
  <a href="<%= next_page[:url] %>"
37
- class="gem-c-pagination__link"
37
+ class="govuk-link gem-c-pagination__link"
38
38
  rel="next"
39
39
  data-track-category="contentsClicked"
40
40
  data-track-action="next"
@@ -18,8 +18,8 @@
18
18
  wrapper_classes << (shared_helper.get_margin_top)
19
19
  wrapper_classes << (shared_helper.get_margin_bottom)
20
20
 
21
- classes = %w(govuk-link)
22
- classes << "gem-c-print-link__button" if href.nil?
21
+ classes = %w[govuk-link]
22
+ classes << "govuk-body-s gem-c-print-link__button" if href.nil?
23
23
  classes << "gem-c-print-link__link govuk-link--no-visited-state" if href.present?
24
24
  %>
25
25
 
@@ -52,7 +52,7 @@
52
52
  'track-action': link[:icon],
53
53
  'track-options': track_options
54
54
  },
55
- class: "gem-c-share-links__link #{brand_helper.color_class}" do %>
55
+ class: "govuk-link gem-c-share-links__link #{brand_helper.color_class}" do %>
56
56
  <span class="gem-c-share-links__link-icon">
57
57
  <% if link[:icon] == 'facebook' %>
58
58
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" aria-hidden="true">
@@ -9,6 +9,7 @@
9
9
  hint ||= nil
10
10
  error_message ||= nil
11
11
  error_items ||= nil
12
+ data ||= nil
12
13
 
13
14
  if !label
14
15
  raise ArgumentError, "This component requires a label"
@@ -37,6 +38,7 @@
37
38
  error_items: error_items,
38
39
  type: "password",
39
40
  autocomplete: autocomplete,
41
+ data: data,
40
42
  } %>
41
43
  <% end %>
42
44
  <% end %>
@@ -4,14 +4,14 @@
4
4
  always_display_as_list ||= false
5
5
  %>
6
6
  <% if links.any? %>
7
- <div
8
- class="gem-c-step-nav-related <%= "gem-c-step-nav-related--singular" if links.length == 1 %>"
7
+ <div
8
+ class="gem-c-step-nav-related <%= "gem-c-step-nav-related--singular" if links.length == 1 %>"
9
9
  data-module="gem-track-click">
10
10
  <h2 class="gem-c-step-nav-related__heading">
11
11
  <span class="gem-c-step-nav-related__pretitle"><%= pretitle %></span>
12
12
  <% if links.length == 1 && !always_display_as_list %>
13
13
  <a href="<%= links[0][:href] %>"
14
- class="gem-c-step-nav-related__link"
14
+ class="govuk-link"
15
15
  data-track-category="stepNavPartOfClicked"
16
16
  data-track-action="<%= pretitle %>"
17
17
  data-track-label="<%= links[0][:href] %>"
@@ -27,7 +27,7 @@
27
27
  <% links.each do |link| %>
28
28
  <li class="gem-c-step-nav-related__link-item">
29
29
  <a href="<%= link[:href] %>"
30
- class="gem-c-step-nav-related__link"
30
+ class="govuk-link"
31
31
  data-track-category="stepNavPartOfClicked"
32
32
  data-track-action="<%= pretitle %>"
33
33
  data-track-label="<%= link[:href] %>"
@@ -36,7 +36,7 @@
36
36
  <%= sl_helper.email_signup_link_text %>
37
37
  <% end %>
38
38
  <%= link_to email_link_text, sl_helper.email_signup_link, {
39
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
39
+ class: "govuk-link gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
40
40
  data: sl_helper.email_signup_link_data_attributes,
41
41
  lang: email_signup_link_text_locale
42
42
  } %>
@@ -50,13 +50,13 @@
50
50
  <%= sl_helper.feed_link_text %>
51
51
  <% end %>
52
52
  <%= tag.button feed_link_text, {
53
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
53
+ class: "govuk-link gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
54
54
  data: sl_helper.feed_link_data_attributes,
55
55
  lang: feed_link_text_locale
56
56
  } if sl_helper.feed_link_box_value %>
57
57
  <%= link_to feed_link_text, sl_helper.feed_link,
58
58
  {
59
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
59
+ class: "govuk-link gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
60
60
  data: sl_helper.feed_link_data_attributes,
61
61
  lang: feed_link_text_locale
62
62
  } unless sl_helper.feed_link_box_value %>
@@ -19,7 +19,7 @@
19
19
  hreflang: translation[:locale],
20
20
  lang: translation[:locale],
21
21
  rel: "alternate",
22
- class: "gem-c-translation-nav__link #{brand_helper.color_class}",
22
+ class: "govuk-link gem-c-translation-nav__link #{brand_helper.color_class}",
23
23
  data: translation[:data_attributes]
24
24
  %>
25
25
  <% end %>
@@ -11,31 +11,13 @@
11
11
  "track-dimension-index": "29",
12
12
  } %>
13
13
 
14
- <%= link_to link_path,
15
- class: "govuk-link gem-c-contextual-sidebar__brexit-cta",
16
- data: data_attributes,
17
- aria: { label: "#{t("components.related_navigation.take_action_list.aria_label")} #{link_text}" },
18
- lang: shared_helper.t_locale("components.related_navigation.transition.title") do %>
19
- <h2 class="gem-c-contextual-sidebar__brexit-heading"><%= t("components.related_navigation.transition.title") %></h2>
20
- <ul class="govuk-list gem-c-contextual-sidebar__take-action-traffic-lights">
21
- <li>
22
- <%= image_tag 'govuk_publishing_components/take-action-red.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
23
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
24
- <%= t("components.related_navigation.take_action_list.red") %>
25
- </span>
26
- </li>
27
- <li>
28
- <%= image_tag 'govuk_publishing_components/take-action-amber.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
29
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
30
- <%= t("components.related_navigation.take_action_list.amber") %>
31
- </span>
32
- </li>
33
- <li>
34
- <%= image_tag 'govuk_publishing_components/take-action-green.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
35
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
36
- <%= t("components.related_navigation.take_action_list.green") %>
37
- </span>
38
- </li>
39
- </ul>
40
- <p class="gem-c-contextual-sidebar__brexit-text"><%= link_text %></p>
14
+ <%= tag.div class: "gem-c-contextual-sidebar__brexit-cta" do %>
15
+ <%= tag.h2 t("components.related_navigation.transition.title"), class: "gem-c-contextual-sidebar__brexit-heading govuk-heading-s" %>
16
+ <%= tag.p class: "gem-c-contextual-sidebar__brexit-text govuk-body" do %>
17
+ <%= link_to link_text,
18
+ link_path,
19
+ class: "govuk-link",
20
+ data: data_attributes,
21
+ lang: shared_helper.t_locale("components.related_navigation.transition.title") %>
22
+ <% end %>
41
23
  <% end %>