govuk_publishing_components 23.12.3 → 24.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) 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/cookie-banner.js +0 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +44 -39
  7. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +34 -17
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +14 -8
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +4 -4
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +35 -44
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +112 -47
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +8 -8
  15. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +0 -5
  16. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +2 -2
  17. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  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 +12 -2
  20. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +9 -4
  21. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -2
  22. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +21 -0
  23. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +65 -1
  24. data/app/views/govuk_publishing_components/components/docs/document_list.yml +50 -7
  25. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +3 -3
  26. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +11 -0
  27. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +99 -1
  28. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +9 -4
  29. data/config/initializers/assets.rb +3 -1
  30. data/config/locales/cy.yml +6 -1
  31. data/config/locales/en.yml +8 -3
  32. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +183 -2
  33. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -0
  34. data/lib/govuk_publishing_components/version.rb +1 -1
  35. data/node_modules/govuk-frontend/govuk/all.js +58 -1
  36. data/node_modules/govuk-frontend/govuk/components/_all.scss +2 -0
  37. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +25 -10
  38. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -6
  39. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +4 -4
  40. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +34 -13
  41. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -0
  42. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +2 -2
  43. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +2 -0
  44. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +74 -31
  45. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +85 -15
  48. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +145 -52
  50. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  51. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  52. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  53. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +425 -0
  54. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
  55. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
  56. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +63 -0
  57. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +84 -34
  58. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  59. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  60. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +35 -15
  61. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +21 -10
  62. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -0
  63. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +2 -12
  64. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +86 -25
  65. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +20 -10
  66. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +60 -13
  67. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +37 -18
  68. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +8 -5
  69. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +36 -18
  70. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  71. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -4
  72. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +17 -8
  73. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +130 -40
  74. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +17 -8
  76. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +20 -11
  77. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
  79. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  80. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  81. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
  82. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
  83. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
  84. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  85. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
  86. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +30 -13
  87. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +20 -9
  88. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +167 -50
  89. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +97 -18
  90. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  91. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +21 -9
  92. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +118 -25
  93. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +21 -0
  94. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +92 -22
  95. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +2 -2
  96. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +75 -18
  97. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -14
  99. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +68 -17
  100. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +19 -14
  101. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +94 -0
  102. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  103. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +94 -0
  104. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +9 -0
  105. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +3 -0
  106. data/node_modules/govuk-frontend/package.json +1 -1
  107. metadata +20 -18
  108. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg +0 -4
  109. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg +0 -4
  110. data/app/assets/javascripts/govuk_publishing_components/components/header.js +0 -8
  111. data/app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js +0 -31
  112. data/app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss +0 -138
  113. data/app/assets/stylesheets/govuk_publishing_components/components/_list.scss +0 -1
  114. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +0 -27
  115. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss +0 -13
  116. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -8
  117. data/app/views/govuk_publishing_components/components/_chevron_banner.html.erb +0 -19
  118. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +0 -85
  119. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +0 -33
  120. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb +0 -6
  121. data/app/views/govuk_publishing_components/components/docs/chevron_banner.yml +0 -33
  122. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +0 -103
  123. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +0 -139
@@ -1 +0,0 @@
1
- @import "govuk/components/list/list";
@@ -1,27 +0,0 @@
1
- // Forked from GOV.UK Frontend, namespace changed to ensure no conflicts.
2
-
3
- $gem-spacing-scale-0: 0;
4
- $gem-spacing-scale-1: 5px;
5
- $gem-spacing-scale-2: 10px;
6
- $gem-spacing-scale-3: 15px;
7
- $gem-spacing-scale-4: 20px;
8
- $gem-spacing-scale-5: 30px;
9
- $gem-spacing-scale-6: 40px;
10
- $gem-spacing-scale-7: 50px;
11
- $gem-spacing-scale-8: 60px;
12
-
13
- $gem-text-colour: $govuk-text-colour;
14
- $gem-secondary-text-colour: $govuk-secondary-text-colour;
15
-
16
- // Border widths
17
- $gem-border-width-mobile: 4px;
18
- $gem-border-width-tablet: 5px;
19
- $gem-border-width-form-element: 2px;
20
- $gem-border-width-error: 4px;
21
-
22
- // Focus
23
- $gem-focus-width: 3px;
24
- $gem-focus-colour: $govuk-focus-colour;
25
-
26
- $gem-error-colour: govuk-colour("red");
27
- $gem-success-colour: govuk-colour("green");
@@ -1,13 +0,0 @@
1
- // An arrow to represent a "back" link
2
-
3
- @mixin back-arrow {
4
- border-bottom: 5px solid transparent;
5
- border-right: 6px solid;
6
- border-top: 5px solid transparent;
7
- content: "";
8
- display: block;
9
- left: 0;
10
- margin-top: -6px;
11
- position: absolute;
12
- top: 50%;
13
- }
@@ -1,8 +0,0 @@
1
- // Mixin to clear floats
2
- @mixin gem-h-clearfix {
3
- &:after {
4
- content: "";
5
- display: block;
6
- clear: both;
7
- }
8
- }
@@ -1,19 +0,0 @@
1
- <%
2
- href ||= false
3
- text ||= false
4
- hover_border ||= false
5
-
6
- data_attributes ||= {}
7
- data_attributes[:module] = 'track-click' if data_attributes.any?
8
- %>
9
- <% if href && text %>
10
- <div class="gem-c-chevron-banner <%= "gem-c-chevron-banner--hover-border" if hover_border %>">
11
- <%= link_to href, class: "gem-c-chevron-banner__link", data: data_attributes, role: "link" do %>
12
- <span class="gem-c-chevron-banner__text"><%= text %></span>
13
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 175 109" class="gem-c-chevron-banner__chevron" preserveAspectRatio="xMidYMid meet">
14
- <path class="gem-c-chevron-banner__chevron-point" fill="#E61E32" fill-rule="nonzero" d="M91.611 51.664c1.0371 1.1432 1.0375 2.8869.000802 4.0305l-44.991 49.634c-.37092.40919-.33989 1.0416.069307 1.4125.18394.16674.42334.25909.6716.25909h36.892c.55978 0 1.0939-.2346 1.4727-.6468l46.534-50.643c1.0549-1.148 1.0546-2.9127-.000709-4.0604L85.3617.64689c-.37873-.41188-.91268-.64628-1.4722-.64628h-36.891c-.55228 0-1 .44772-1 1 0 .24841.092454.48792.25936.6719l45.352 49.992z" transform="translate(0 1)"></path>
15
- <path class="gem-c-chevron-banner__chevron-base" fill="#E61E32" fill-rule="nonzero" d="M-37.997 1l.35768 107h40.408c.55978 0 1.0939-.2346 1.4727-.6468l46.534-50.643c1.0549-1.148 1.0546-2.9127-.0007095-4.0604l-46.898-51.003c-.37873-.41188-.91268-.64628-1.4722-.64628h-40.402z" vector-effect="non-scaling-stroke"></path>
16
- </svg>
17
- <% end %>
18
- </div>
19
- <% end %>
@@ -1,85 +0,0 @@
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
-
5
- brand ||= false
6
- brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
7
-
8
- sl_helper = GovukPublishingComponents::Presenters::SubscriptionLinksHelper.new(local_assigns)
9
- shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
10
-
11
- local_assigns[:margin_bottom] ||= 0
12
- local_assigns[:margin_bottom] = 0 if local_assigns[:margin_bottom] > 9
13
-
14
- css_classes = %w( gem-c-subscription-links )
15
- css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
16
- css_classes << brand_helper.brand_class
17
- css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
18
-
19
- data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
20
-
21
- hide_heading ||= false
22
-
23
- email_signup_link_text_locale = local_assigns[:email_signup_link_text_locale].presence
24
- feed_link_text_locale = local_assigns[:feed_link_text_locale].presence
25
- %>
26
- <% if sl_helper.component_data_is_valid? %>
27
- <%= tag.section class: css_classes, data: data do %>
28
- <% unless hide_heading %>
29
- <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
30
- <% end %>
31
- <ul
32
- class="gem-c-subscription-links__list<%= ' gem-c-subscription-links__list--small' if local_assigns[:small_form] == true %>"
33
- <%= "data-module=track-click" if sl_helper.tracking_is_present? %>
34
- >
35
- <% if sl_helper.email_signup_link.present? %>
36
- <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>" >
37
- <% email_link_text = capture do %>
38
- <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>
39
- <%= sl_helper.email_signup_link_text %>
40
- <% end %>
41
- <%= link_to email_link_text, sl_helper.email_signup_link, {
42
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
43
- data: sl_helper.email_signup_link_data_attributes,
44
- lang: email_signup_link_text_locale
45
- } %>
46
- </li>
47
- <% end %>
48
-
49
- <% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
50
- <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>">
51
- <% feed_link_text = capture do %>
52
- <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>
53
- <%= sl_helper.feed_link_text %>
54
- <% end %>
55
- <%= tag.button feed_link_text, {
56
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
57
- data: sl_helper.feed_link_data_attributes,
58
- lang: feed_link_text_locale
59
- } if sl_helper.feed_link_box_value %>
60
- <%= link_to feed_link_text, sl_helper.feed_link,
61
- {
62
- class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
63
- data: sl_helper.feed_link_data_attributes,
64
- lang: feed_link_text_locale
65
- } unless sl_helper.feed_link_box_value %>
66
- </li>
67
- <% end %>
68
- </ul>
69
-
70
- <% if sl_helper.feed_link_box_value %>
71
- <div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
72
- <h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
73
- <div lang="en">
74
- <%= render "govuk_publishing_components/components/input", {
75
- label: {
76
- text: "Copy and paste this URL into your feed reader"
77
- },
78
- name: "feed-reader-box",
79
- value: feed_link_box_value
80
- } %>
81
- </div>
82
- </div>
83
- <% end %>
84
- <% end %>
85
- <% end %>
@@ -1,33 +0,0 @@
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
-
5
- brand ||= false
6
- brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
7
- translation_helper = GovukPublishingComponents::Presenters::TranslationNavHelper.new(local_assigns)
8
- %>
9
- <% if translation_helper.has_translations? %>
10
- <nav role="navigation"
11
- class="gem-c-translation-nav <%= translation_helper.classes %> <%= brand_helper.brand_class %>"
12
- aria-label="<%= t("common.translations") %>"
13
- <%= "data-module=\"track-click\"" if translation_helper.tracking_is_present? %>
14
- >
15
- <ul class="gem-c-translation-nav__list">
16
- <% translation_helper.translations.each.with_index do |translation, i| %>
17
- <li class="gem-c-translation-nav__list-item">
18
- <% if translation[:active] %>
19
- <span lang="<%= translation[:locale] %>"><%= translation[:text] %></span>
20
- <% else %>
21
- <%= link_to translation[:text], translation[:base_path],
22
- hreflang: translation[:locale],
23
- lang: translation[:locale],
24
- rel: "alternate",
25
- class: "gem-c-translation-nav__link #{brand_helper.color_class}",
26
- data: translation[:data_attributes]
27
- %>
28
- <% end %>
29
- </li>
30
- <% end %>
31
- </ul>
32
- </nav>
33
- <% end %>
@@ -1,6 +0,0 @@
1
- <% link_text = t("components.related_navigation.transition.link_text") %>
2
- <% link_path = t("components.related_navigation.transition.link_path") %>
3
- <div class="gem-c-contextual-sidebar__brexit-related-links govuk-!-margin-bottom-6" data-module="track-click" lang="en">
4
- <h2 class="gem-c-contextual-sidebar__brexit-heading"><%= t("components.related_navigation.transition.title") %></h2>
5
- <a href="<%= link_path %>" class="govuk-link" data-track-category="relatedLinkClicked" data-track-action="1.0 Transition" data-track-label="<%= link_path %>" data-track-options='{"dimension29":"<%= link_text %>"}'><%= link_text %></a>
6
- </div>
@@ -1,33 +0,0 @@
1
- name: Chevron Banner
2
- description: A branded banner for use on EU Exit campaign pages. This should not be used on non-campaign pages.
3
- accessibility_criteria: |
4
- The component must:
5
-
6
- - accept focus
7
- - be focusable with a keyboard
8
- - be usable with a keyboard
9
- - be usable with touch
10
- - indicate when they have focus
11
-
12
- shared_accessibility_criteria:
13
- - link
14
- examples:
15
- default:
16
- data:
17
- href: '/test-link'
18
- text: 'Gwiriwch beth sydd angen i chi wneud os nad oes cytundeb'
19
- with_hover_border:
20
- data:
21
- href: '/test-link'
22
- text: 'This is some text'
23
- hover_border: true
24
- context:
25
- dark_background: true
26
- with_data_attributes:
27
- data:
28
- href: '/test-link'
29
- text: 'This is some text'
30
- data_attributes:
31
- track-category: "startButtonClicked"
32
- track-action: "/test-link"
33
- track-label: "This is some text"
@@ -1,103 +0,0 @@
1
- # DO NOT MAKE CHANGES TO THIS FILE
2
- # It is a temporary copy of subscription_links.yml and will be deleted shortly
3
-
4
- name: Subscription links
5
- description: Links to ‘Get emails’ and ‘Subscribe to feed’
6
- body: |
7
- <strong>NOTE: This component includes a h2 heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
8
- accessibility_criteria: |
9
- Icons in subscription links must be presentational and ignored by screen readers.
10
-
11
- Toggle elements in the component must:
12
-
13
- - be usable with a keyboard
14
- - be usable with touch
15
- - be recognised by screen readers as a button
16
- - announce to screen readers whether they are expanded or collapsed
17
- - show hidden elements by default when Javascript is disabled
18
- shared_accessibility_criteria:
19
- - link
20
- examples:
21
- default:
22
- data:
23
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
24
- feed_link: '/foreign-travel-advice/singapore.atom'
25
- with_margin:
26
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom, although some margin is supplied by the links themselves (so that when they stack on mobile there is space between them).
27
- data:
28
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
29
- feed_link: '/foreign-travel-advice/singapore.atom'
30
- margin_bottom: 9
31
- with_only_email_signup_link:
32
- data:
33
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
34
- with_only_feed_link:
35
- data:
36
- feed_link: '/foreign-travel-advice/singapore.atom'
37
- with_custom_text:
38
- data:
39
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
40
- email_signup_link_text: 'Get notifications'
41
- feed_link: '/foreign-travel-advice/singapore.atom'
42
- feed_link_text: 'View feed'
43
- with_copyable_feed_link:
44
- description: |
45
- This option changes the feed link to a toggle control, which opens a hidden element containing an input prepopulated with the value passed to the component, usually a URL to an atom feed. This uses the [form input](/component-guide/input) component.
46
-
47
- Note that this option overrides the feed_link option, so if both are passed feed_link is ignored. Note that a value for email_signup_link can also be passed as normal.
48
- data:
49
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
50
- feed_link_box_value: 'https://www.gov.uk/government/organisations/attorney-generals-office.atom'
51
- with_branding:
52
- description: Organisation [colour branding](https://github.com/alphagov/govuk_publishing_components/blob/master/docs/component_branding.md) can be added to the component as shown.
53
- data:
54
- brand: 'attorney-generals-office'
55
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
56
- feed_link: '/foreign-travel-advice/singapore.atom'
57
- with_tracking:
58
- description: Data attributes can be passed for each link as shown.
59
- data:
60
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
61
- email_signup_link_data_attributes: {
62
- track_category: 'email_link_category',
63
- track_action: 1.1,
64
- track_label: 'email_link_label',
65
- track_options: {
66
- dimension28: 1,
67
- dimension29: 'dimension29EmailLink'
68
- }
69
- }
70
- feed_link_box_value: 'https://www.gov.uk/government/organisations/attorney-generals-office.atom'
71
- feed_link_data_attributes: {
72
- track_category: 'feed_link_category',
73
- track_action: 1.2,
74
- track_label: 'feed_link_label',
75
- track_options: {
76
- dimension28: 7,
77
- dimension29: 'dimension29feedLink'
78
- }
79
- }
80
- as_small_form:
81
- data:
82
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
83
- feed_link: '/foreign-travel-advice/singapore.atom'
84
- small_form: true
85
- without_heading:
86
- description: |
87
- By default the component includes an h2 heading. The component could be used anywhere on the page and could mean that it produces invalid markup or make the site unaccessible.
88
- data:
89
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
90
- feed_link: '/foreign-travel-advice/singapore.atom'
91
- hide_heading: true
92
- with_a_different_language:
93
- data:
94
- email_signup_link: '/foreign-travel-advice/singapore/email-signup'
95
- email_signup_link_text: 'Recevez des notifications'
96
- email_signup_link_text_locale: 'fr'
97
- feed_link: '/foreign-travel-advice/singapore.atom'
98
- feed_link_text: 'Flux RSS'
99
- feed_link_text_locale: 'fr'
100
- description: |
101
- The component is used on translated pages that don't have a translation for the text strings. This means that it could display the fallback English string if the translate method can't find an appropriate translation. This makes sure that the `lang` can be set to ensure that browsers understand which parts of the page are in each language.
102
-
103
- The `lang` attribute **must** be set to a [valid BCP47 string](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang#Language_tag_syntax). A valid code can be the two or three letter language code - for example, English is `en` or `eng`, Korean is `ko` or `kor` - but if in doubt please check.
@@ -1,139 +0,0 @@
1
- # DO NOT MAKE CHANGES TO THIS FILE
2
- # It is a temporary copy of translation_nav.yml and will be deleted shortly
3
-
4
- name: Translation navigation
5
- description: A list of links to available translations
6
- body: The active property indicates the current language.
7
- accessibility_criteria: |
8
- The component must:
9
-
10
- - be [a landmark with a navigation role](https://accessibility.blog.gov.uk/2016/05/27/using-navigation-landmarks/)
11
- - have an accessible name in the current language, eg "Translations"
12
-
13
- The translation links must:
14
-
15
- - [identify the language of the text](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html#meaning-other-lang-id-examples-head)
16
-
17
- [Watch a screen reader pronounce text differently based on lang attribute](https://bit.ly/screenreaderpronunciation)
18
- shared_accessibility_criteria:
19
- - link
20
- examples:
21
- default:
22
- data:
23
- translations:
24
- - locale: 'en'
25
- base_path: '/en'
26
- text: 'English'
27
- active: true
28
- - locale: 'hi'
29
- base_path: '/hi'
30
- text: 'हिंदी'
31
- multiple_translations:
32
- data:
33
- translations:
34
- - locale: 'en'
35
- base_path: '/en'
36
- text: 'English'
37
- active: true
38
- - locale: 'fr'
39
- base_path: '/fr'
40
- text: 'Français'
41
- - locale: 'hi'
42
- base_path: '/hi'
43
- text: 'हिंदी'
44
- - locale: 'ja'
45
- base_path: '/ja'
46
- text: '日本語'
47
- - locale: 'ur'
48
- base_path: '/ur'
49
- text: 'اردو'
50
- - locale: 'zh'
51
- base_path: '/zh'
52
- text: '中文'
53
- right_to_left:
54
- data:
55
- translations:
56
- - locale: 'en'
57
- base_path: '/en'
58
- text: 'English'
59
- - locale: 'ar'
60
- base_path: '/ar'
61
- text: 'العربية'
62
- active: true
63
- context:
64
- right_to_left: true
65
- with_branding:
66
- description: Organisation [colour branding](https://github.com/alphagov/govuk_publishing_components/blob/master/docs/component_branding.md) can be added to the component as shown.
67
- data:
68
- brand: 'wales-office'
69
- translations:
70
- - locale: 'en'
71
- base_path: '/en'
72
- text: 'English'
73
- active: true
74
- - locale: 'cy'
75
- base_path: '/cy'
76
- text: 'Cymraeg'
77
- with_no_top_margin:
78
- data:
79
- no_margin_top: true
80
- translations:
81
- - locale: 'en'
82
- base_path: '/en'
83
- text: 'English'
84
- active: true
85
- - locale: 'cy'
86
- base_path: '/cy'
87
- text: 'Cymraeg'
88
- with_tracking:
89
- description: Data attributes can be passed for each link as shown.
90
- data:
91
- translations:
92
- - locale: 'en'
93
- base_path: '/en'
94
- text: 'English'
95
- active: true
96
- data_attributes:
97
- track_category: 'categoryEnglish'
98
- track_action: 1.1
99
- track_label: 'labelEnglish'
100
- track_options:
101
- dimension28: 1
102
- dimension29: 'dimension29English'
103
- - locale: 'cy'
104
- base_path: '/cy'
105
- text: 'Cymraeg'
106
- data_attributes:
107
- track_category: 'categoryWelsh'
108
- track_action: 1.2
109
- track_label: 'labelWelsh'
110
- track_options:
111
- dimension28: 1
112
- dimension29: 'dimension29Welsh'
113
- inverse:
114
- data:
115
- inverse: true
116
- translations:
117
- - locale: 'en'
118
- base_path: '/en'
119
- text: 'English'
120
- active: true
121
- data_attributes:
122
- track_category: 'categoryEnglish'
123
- track_action: 1.1
124
- track_label: 'labelEnglish'
125
- track_options:
126
- dimension28: 1
127
- dimension29: 'dimension29English'
128
- - locale: 'cy'
129
- base_path: '/cy'
130
- text: 'Cymraeg'
131
- data_attributes:
132
- track_category: 'categoryWelsh'
133
- track_action: 1.2
134
- track_label: 'labelWelsh'
135
- track_options:
136
- dimension28: 1
137
- dimension29: 'dimension29Welsh'
138
- context:
139
- dark_background: true