govuk_publishing_components 23.12.2 → 23.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/take-action-amber.svg +4 -0
  3. data/app/assets/images/govuk_publishing_components/take-action-green.svg +4 -0
  4. data/app/assets/images/govuk_publishing_components/take-action-red.svg +4 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/header.js +3 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +5 -0
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +32 -36
  8. data/app/assets/javascripts/govuk_publishing_components/modules.js +1 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +34 -17
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +14 -8
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +35 -44
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +5 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +19 -7
  15. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +5 -0
  16. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  17. data/app/views/govuk_publishing_components/components/_button.html.erb +1 -0
  18. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -8
  19. data/app/views/govuk_publishing_components/components/_document_list.html.erb +2 -1
  20. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +9 -4
  21. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +3 -2
  22. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -2
  23. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +3 -0
  24. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +82 -0
  25. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +3 -0
  26. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +30 -0
  27. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +21 -0
  28. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +60 -1
  29. data/app/views/govuk_publishing_components/components/docs/document_list.yml +32 -7
  30. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +32 -0
  31. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +99 -1
  32. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +3 -0
  33. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +100 -0
  34. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +3 -1
  35. data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +137 -0
  36. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +11 -6
  37. data/config/initializers/assets.rb +3 -0
  38. data/config/locales/cy.yml +6 -1
  39. data/config/locales/en.yml +8 -3
  40. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +124 -2
  41. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -0
  42. data/lib/govuk_publishing_components/version.rb +1 -1
  43. data/node_modules/govuk-frontend/govuk/all.js +57 -0
  44. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  45. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +25 -10
  46. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -6
  47. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +4 -4
  48. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +34 -13
  49. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -0
  50. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +74 -31
  51. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +72 -15
  52. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  53. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +145 -52
  54. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  55. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +84 -34
  56. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  57. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  58. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +34 -14
  59. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +21 -10
  60. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -0
  61. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +2 -12
  62. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +86 -25
  63. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +20 -10
  64. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +60 -13
  65. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +37 -18
  66. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +8 -5
  67. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +36 -18
  68. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  69. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +17 -8
  70. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +130 -40
  71. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  72. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +17 -8
  73. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +20 -11
  74. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
  76. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  77. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
  79. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
  80. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
  81. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  82. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
  83. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +30 -13
  84. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +20 -9
  85. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +167 -50
  86. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +97 -18
  87. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  88. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +21 -9
  89. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +118 -25
  90. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +92 -22
  91. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +75 -18
  92. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  93. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -14
  94. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +68 -17
  95. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +19 -14
  96. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +94 -0
  97. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +9 -0
  98. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +3 -0
  99. data/node_modules/govuk-frontend/package.json +1 -1
  100. metadata +18 -4
  101. data/app/assets/stylesheets/govuk_publishing_components/components/_transition-countdown.scss +0 -125
  102. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb +0 -6
@@ -56,7 +56,6 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
56
56
 
57
57
  .gem-c-step-nav__controls {
58
58
  padding: 3px 3px 0 0;
59
- text-align: right;
60
59
  }
61
60
 
62
61
  .gem-c-step-nav__button {
@@ -93,14 +92,27 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
93
92
  @include step-nav-font(14, $line-height: 1);
94
93
  position: relative;
95
94
  z-index: 1; // this and relative position stops focus outline underlap with border of accordion
96
- padding: .5em 0;
97
- text-decoration: underline;
95
+ padding: .5em 0 1.5em;
96
+
97
+ &:hover {
98
+ text-decoration: underline;
99
+ }
98
100
 
99
101
  .gem-c-step-nav--large & {
100
102
  @include step-nav-font(14, $tablet-size: 16, $line-height: 1);
101
103
  }
102
104
  }
103
105
 
106
+ .gem-c-step-nav__title-text {
107
+ display: block;
108
+ margin-bottom: govuk-spacing(1);
109
+ }
110
+
111
+ .gem-c-step-nav__chevron {
112
+ vertical-align: text-top;
113
+ margin-right: govuk-spacing(1);
114
+ }
115
+
104
116
  .gem-c-step-nav__steps {
105
117
  padding: 0;
106
118
  margin: 0;
@@ -181,7 +193,7 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
181
193
  box-sizing: border-box;
182
194
  position: absolute;
183
195
  z-index: 5;
184
- top: govuk-spacing(3);
196
+ top: govuk-spacing(1);
185
197
  left: 0;
186
198
  width: $number-circle-size;
187
199
  height: $number-circle-size;
@@ -192,7 +204,7 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
192
204
 
193
205
  .gem-c-step-nav--large & {
194
206
  @include govuk-media-query($from: tablet) {
195
- top: govuk-spacing(6);
207
+ top: govuk-spacing(3);
196
208
  width: $number-circle-size-large;
197
209
  height: $number-circle-size-large;
198
210
  }
@@ -240,7 +252,7 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
240
252
  }
241
253
 
242
254
  .gem-c-step-nav__header {
243
- padding: govuk-spacing(3) 0;
255
+ padding: govuk-spacing(1) 0 govuk-spacing(3);
244
256
  border-top: $top-border;
245
257
 
246
258
  .gem-c-step-nav--active & {
@@ -270,7 +282,7 @@ $top-border: solid 2px govuk-colour("mid-grey", $legacy: "grey-3");
270
282
 
271
283
  .gem-c-step-nav--large & {
272
284
  @include govuk-media-query($from: tablet) {
273
- padding: govuk-spacing(6) 0;
285
+ padding: govuk-spacing(2) 0 govuk-spacing(6);
274
286
  }
275
287
  }
276
288
  }
@@ -72,4 +72,9 @@
72
72
  list-style: none;
73
73
  }
74
74
  }
75
+
76
+ .mc-toggle-button,
77
+ .mc-chart-container {
78
+ display: none;
79
+ }
75
80
  }
@@ -69,7 +69,7 @@ module GovukPublishingComponents
69
69
  end
70
70
 
71
71
  def github_search_url
72
- params = { q: "org:alphagov #{partial_path}", type: "Code" }
72
+ params = { q: "org:alphagov components/components/#{id}", type: "Code" }
73
73
  "https://github.com/search?#{params.to_query}"
74
74
  end
75
75
 
@@ -1,4 +1,5 @@
1
1
  <%
2
+ # button_helper.css_classes generates "gem-c-button"
2
3
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
4
  local_assigns[:classes] = shared_helper.classes
4
5
  button = GovukPublishingComponents::Presenters::ButtonHelper.new(local_assigns)
@@ -2,12 +2,6 @@
2
2
  <% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
3
3
 
4
4
  <div class="gem-c-contextual-sidebar">
5
- <% if navigation.show_brexit_related_links? && navigation.step_by_step_count.zero? %>
6
- <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_related_links' %>
7
- <% elsif navigation.step_by_step_count.zero? && !navigation.transition_countdown_exception? %>
8
- <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
9
- <% end %>
10
-
11
5
  <% if navigation.content_tagged_to_a_reasonable_number_of_step_by_steps? %>
12
6
  <%# Rendering step by step related items because there are a few but not too many of them %>
13
7
  <%= render 'govuk_publishing_components/components/step_by_step_nav_related', links: navigation.step_nav_helper.related_links %>
@@ -30,7 +24,7 @@
30
24
  } %>
31
25
  <% end %>
32
26
 
33
- <% if navigation.show_brexit_related_links? && navigation.step_by_step_count > 0 %>
34
- <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_related_links' %>
27
+ <% if navigation.show_brexit_cta? || navigation.show_brexit_related_links? %>
28
+ <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
35
29
  <% end %>
36
30
  </div>
@@ -5,6 +5,7 @@
5
5
  classes << " gem-c-document-list--top-margin" if local_assigns[:margin_top]
6
6
  classes << " gem-c-document-list--bottom-margin" if local_assigns[:margin_bottom]
7
7
  classes << " gem-c-document-list--no-underline" if local_assigns[:remove_underline]
8
+ classes << " gem-c-document-list--no-top-border" if local_assigns[:remove_top_border]
8
9
 
9
10
  within_multitype_list ||= false
10
11
  within_multitype_list_class = " gem-c-document-list__multi-list" if within_multitype_list
@@ -50,7 +51,7 @@
50
51
  <% end %>
51
52
 
52
53
  <% if item[:link][:description] %>
53
- <p class="gem-c-document-list__item-description" ><%= item[:link][:description] %></p>
54
+ <p class="gem-c-document-list__item-description <%= "gem-c-document-list__item-description--full-size" if item[:link][:full_size_description] %>"><%= item[:link][:description] %></p>
54
55
  <% end %>
55
56
 
56
57
  <% if item[:metadata] %>
@@ -2,9 +2,11 @@
2
2
  meta ||= []
3
3
  navigation ||= []
4
4
  with_border ||= false
5
+ classes = %w(gem-c-layout-footer govuk-footer)
6
+ classes << "gem-c-layout-footer--border" if with_border
5
7
  %>
6
- <footer class="gem-c-layout-footer govuk-footer <%= "gem-c-layout-footer--border" if with_border %> role="contentinfo">
7
- <div class="govuk-width-container ">
8
+ <%= tag.footer class: classes, role: "contentinfo" do %>
9
+ <div class="govuk-width-container" data-module="track-click">
8
10
  <% if navigation.any? %>
9
11
  <div class="govuk-footer__navigation">
10
12
  <% navigation.each do |item| %>
@@ -29,7 +31,10 @@
29
31
  <% if item[:href] && item[:text] %>
30
32
  <li class="govuk-footer__list-item">
31
33
  <%
32
- attributes = { class: "govuk-footer__link" }.merge(item.fetch(:attributes, {}))
34
+ attributes = {
35
+ class: "govuk-footer__link",
36
+ "data-track-category": "footerClicked"
37
+ }.merge(item.fetch(:attributes, {}))
33
38
  attributes[:rel] = "noopener" if attributes[:target] == "_blank" && !attributes[:rel]
34
39
  %>
35
40
  <%= link_to item[:text], item[:href], attributes %>
@@ -80,4 +85,4 @@
80
85
  </div>
81
86
  </div>
82
87
  </div>
83
- </footer>
88
+ <% end %>
@@ -5,6 +5,7 @@
5
5
  search ||= false
6
6
  search_left ||= false
7
7
  navigation_items ||= []
8
+ navigation_aria_label ||= "Top level"
8
9
  remove_bottom_border ||= false
9
10
  search_left ||= false
10
11
  width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
@@ -28,7 +29,7 @@
28
29
  <%= render "govuk_publishing_components/components/layout_header/search" %>
29
30
  </div>
30
31
  <div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
31
- <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
32
+ <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
32
33
  </div>
33
34
  </div>
34
35
  <% else %>
@@ -37,7 +38,7 @@
37
38
  <%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
38
39
  </div>
39
40
  <div class="govuk-header__content gem-c-header__content">
40
- <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
41
+ <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
41
42
  </div>
42
43
  <% if search %>
43
44
  <div class="govuk-grid-column-one-third gem-c-layout-header__search">
@@ -24,8 +24,8 @@
24
24
  <%= "data-id=#{tracking_id}" if tracking_id %>
25
25
  data-show-text="<%= t("govuk_component.step_by_step_nav.show", default: "show") %>"
26
26
  data-hide-text="<%= t("govuk_component.step_by_step_nav.hide", default: "hide") %>"
27
- data-show-all-text="<%= t("govuk_component.step_by_step_nav.show_all", default: "Show all") %>"
28
- data-hide-all-text="<%= t("govuk_component.step_by_step_nav.hide_all", default: "Hide all") %>"
27
+ data-show-all-text="<%= t("govuk_component.step_by_step_nav.show_all", default: "Show all steps") %>"
28
+ data-hide-all-text="<%= t("govuk_component.step_by_step_nav.hide_all", default: "Hide all steps") %>"
29
29
  >
30
30
  <ol class="gem-c-step-nav__steps">
31
31
  <% steps.each_with_index do |step, step_index| %>
@@ -1,4 +1,7 @@
1
1
  <%
2
+ # DO NOT MAKE CHANGES TO THIS FILE
3
+ # It is a temporary copy of _subscription_links.html.erb and will be deleted shortly
4
+
2
5
  brand ||= false
3
6
  brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
7
 
@@ -0,0 +1,82 @@
1
+ <%
2
+ brand ||= false
3
+ brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
+
5
+ sl_helper = GovukPublishingComponents::Presenters::SubscriptionLinksHelper.new(local_assigns)
6
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
7
+
8
+ local_assigns[:margin_bottom] ||= 0
9
+ local_assigns[:margin_bottom] = 0 if local_assigns[:margin_bottom] > 9
10
+
11
+ css_classes = %w( gem-c-subscription-links )
12
+ css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
13
+ css_classes << brand_helper.brand_class
14
+ css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
15
+
16
+ data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
17
+
18
+ hide_heading ||= false
19
+
20
+ email_signup_link_text_locale = local_assigns[:email_signup_link_text_locale].presence
21
+ feed_link_text_locale = local_assigns[:feed_link_text_locale].presence
22
+ %>
23
+ <% if sl_helper.component_data_is_valid? %>
24
+ <%= tag.section class: css_classes, data: data do %>
25
+ <% unless hide_heading %>
26
+ <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
27
+ <% end %>
28
+ <ul
29
+ class="gem-c-subscription-links__list<%= ' gem-c-subscription-links__list--small' if local_assigns[:small_form] == true %>"
30
+ <%= "data-module=track-click" if sl_helper.tracking_is_present? %>
31
+ >
32
+ <% if sl_helper.email_signup_link.present? %>
33
+ <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>" >
34
+ <% email_link_text = capture do %>
35
+ <svg xmlns="http://www.w3.org/2000/svg" width="21" height="15.75" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M19.687 0H1.312C.589 0 0 .587 0 1.313v13.124c0 .726.588 1.313 1.313 1.313h18.374c.725 0 1.313-.587 1.313-1.313V1.313C21 .587 20.412 0 19.687 0zm-2.625 2.625L10.5 7.875l-6.563-5.25h13.126zm1.313 10.5H2.625V3.937L10.5 10.5l7.875-6.563v9.188z"/></svg>
36
+ <%= sl_helper.email_signup_link_text %>
37
+ <% end %>
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",
40
+ data: sl_helper.email_signup_link_data_attributes,
41
+ lang: email_signup_link_text_locale
42
+ } %>
43
+ </li>
44
+ <% end %>
45
+
46
+ <% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
47
+ <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>">
48
+ <% feed_link_text = capture do %>
49
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z"/></svg>
50
+ <%= sl_helper.feed_link_text %>
51
+ <% end %>
52
+ <%= tag.button feed_link_text, {
53
+ class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
54
+ data: sl_helper.feed_link_data_attributes,
55
+ lang: feed_link_text_locale
56
+ } if sl_helper.feed_link_box_value %>
57
+ <%= link_to feed_link_text, sl_helper.feed_link,
58
+ {
59
+ class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
60
+ data: sl_helper.feed_link_data_attributes,
61
+ lang: feed_link_text_locale
62
+ } unless sl_helper.feed_link_box_value %>
63
+ </li>
64
+ <% end %>
65
+ </ul>
66
+
67
+ <% if sl_helper.feed_link_box_value %>
68
+ <div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
69
+ <h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
70
+ <div lang="en">
71
+ <%= render "govuk_publishing_components/components/input", {
72
+ label: {
73
+ text: "Copy and paste this URL into your feed reader"
74
+ },
75
+ name: "feed-reader-box",
76
+ value: feed_link_box_value
77
+ } %>
78
+ </div>
79
+ </div>
80
+ <% end %>
81
+ <% end %>
82
+ <% end %>
@@ -1,4 +1,7 @@
1
1
  <%
2
+ # DO NOT MAKE CHANGES TO THIS FILE
3
+ # It is a temporary copy of _translation_nav.html.erb and will be deleted shortly
4
+
2
5
  brand ||= false
3
6
  brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
7
  translation_helper = GovukPublishingComponents::Presenters::TranslationNavHelper.new(local_assigns)
@@ -0,0 +1,30 @@
1
+ <%
2
+ brand ||= false
3
+ brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
+ translation_helper = GovukPublishingComponents::Presenters::TranslationNavHelper.new(local_assigns)
5
+ %>
6
+ <% if translation_helper.has_translations? %>
7
+ <nav role="navigation"
8
+ class="gem-c-translation-nav <%= translation_helper.classes %> <%= brand_helper.brand_class %>"
9
+ aria-label="<%= t("common.translations") %>"
10
+ <%= "data-module=\"track-click\"" if translation_helper.tracking_is_present? %>
11
+ >
12
+ <ul class="gem-c-translation-nav__list">
13
+ <% translation_helper.translations.each.with_index do |translation, i| %>
14
+ <li class="gem-c-translation-nav__list-item">
15
+ <% if translation[:active] %>
16
+ <span lang="<%= translation[:locale] %>"><%= translation[:text] %></span>
17
+ <% else %>
18
+ <%= link_to translation[:text], translation[:base_path],
19
+ hreflang: translation[:locale],
20
+ lang: translation[:locale],
21
+ rel: "alternate",
22
+ class: "gem-c-translation-nav__link #{brand_helper.color_class}",
23
+ data: translation[:data_attributes]
24
+ %>
25
+ <% end %>
26
+ </li>
27
+ <% end %>
28
+ </ul>
29
+ </nav>
30
+ <% end %>
@@ -14,7 +14,28 @@
14
14
  <%= link_to link_path,
15
15
  class: "govuk-link gem-c-contextual-sidebar__brexit-cta",
16
16
  data: data_attributes,
17
+ aria: { label: "#{t("components.related_navigation.take_action_list.aria_label")} #{link_text}" },
17
18
  lang: shared_helper.t_locale("components.related_navigation.transition.title") do %>
18
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>
19
40
  <p class="gem-c-contextual-sidebar__brexit-text"><%= link_text %></p>
20
41
  <% end %>
@@ -144,7 +144,33 @@ examples:
144
144
  - text: Find out what you’ll get
145
145
  href: "/settled-status-eu-citizens-families/what-settled-and-presettled-status-means"
146
146
  optional: false
147
- transition_countdown_exception:
147
+ with_brexit_cta:
148
+ description: For documents tagged with certain taxons defined in `brexit_cta_taxon_allow_list` we show a custom Brexit call to action element.
149
+ data:
150
+ content_item:
151
+ title: "Transport news story"
152
+ content_id: "3c402d90-fe77-49b9-a8aa-1800d4fc2b3d"
153
+ links:
154
+ ordered_related_items:
155
+ - title: Find an apprenticeship
156
+ base_path: /apply-apprenticeship
157
+ - title: Training and study at work
158
+ base_path: /training-study-work-your-rights
159
+ - title: Careers helpline for teenagers
160
+ base_path: /careers-helpline-for-teenagers
161
+ document_collections:
162
+ - title: Recruit an apprentice (formerly apprenticeship vacancies)
163
+ base_path: /government/collections/apprenticeship-vacancies
164
+ document_type: document_collection
165
+ - title: The future of jobs and skills
166
+ base_path: /government/collections/the-future-of-jobs-and-skills
167
+ document_type: document_collection
168
+ taxons:
169
+ - content_id: "a4038b29-b332-4f13-98b1-1c9709e216bc"
170
+ title: "Transport"
171
+ phase: "live"
172
+ with_brexit_cta_document_exception:
173
+ description: Illustrates an exception to showing the custom Brexit call to action element as defined in `brexit_cta_document_type_exceptions`.
148
174
  data:
149
175
  content_item:
150
176
  title: "30 creative teams awarded up to £100,000 each for Festival UK* 2022 R&D project"
@@ -164,3 +190,36 @@ examples:
164
190
  - title: The future of jobs and skills
165
191
  base_path: /government/collections/the-future-of-jobs-and-skills
166
192
  document_type: document_collection
193
+ taxons:
194
+ - content_id: "e2ca2f1a-0ff3-43ce-b813-16645ff27904"
195
+ title: "Society and culture"
196
+ phase: "live"
197
+ with_brexit_cta_taxon_exception:
198
+ description: Illustrates an exception to showing the custom Brexit call to action element as defined in `brexit_cta_taxon_exception_list`.
199
+ data:
200
+ content_item:
201
+ title: "Local transport news story"
202
+ content_id: "5c82db20-7631-11e4-a3cb-005056011aef"
203
+ links:
204
+ ordered_related_items:
205
+ - title: Find an apprenticeship
206
+ base_path: /apply-apprenticeship
207
+ - title: Training and study at work
208
+ base_path: /training-study-work-your-rights
209
+ - title: Careers helpline for teenagers
210
+ base_path: /careers-helpline-for-teenagers
211
+ document_collections:
212
+ - title: Recruit an apprentice (formerly apprenticeship vacancies)
213
+ base_path: /government/collections/apprenticeship-vacancies
214
+ document_type: document_collection
215
+ - title: The future of jobs and skills
216
+ base_path: /government/collections/the-future-of-jobs-and-skills
217
+ document_type: document_collection
218
+ taxons:
219
+ - content_id: "3b4d6319-fcef-4637-b35a-e3df76321894"
220
+ title: "Local transport"
221
+ phase: "live"
222
+ links:
223
+ parent_taxons:
224
+ - content_id: "a4038b29-b332-4f13-98b1-1c9709e216bc"
225
+ title: "Transport"