govuk_publishing_components 28.7.1 → 28.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/page-content.js +3 -3
  3. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +1 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +102 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +4 -0
  11. data/app/models/govuk_publishing_components/component_docs.rb +4 -1
  12. data/app/views/govuk_publishing_components/components/_attachment.html.erb +3 -1
  13. data/app/views/govuk_publishing_components/components/_cards.html.erb +62 -0
  14. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +4 -0
  15. data/app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb +27 -0
  16. data/app/views/govuk_publishing_components/components/docs/attachment.yml +11 -0
  17. data/app/views/govuk_publishing_components/components/docs/cards.yml +139 -0
  18. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +18 -0
  19. data/config/locales/ar.yml +4 -0
  20. data/config/locales/az.yml +4 -0
  21. data/config/locales/be.yml +4 -0
  22. data/config/locales/bg.yml +4 -0
  23. data/config/locales/bn.yml +4 -0
  24. data/config/locales/cs.yml +4 -0
  25. data/config/locales/cy.yml +4 -0
  26. data/config/locales/da.yml +4 -0
  27. data/config/locales/de.yml +4 -0
  28. data/config/locales/dr.yml +4 -0
  29. data/config/locales/el.yml +4 -0
  30. data/config/locales/en.yml +4 -0
  31. data/config/locales/es-419.yml +4 -0
  32. data/config/locales/es.yml +4 -0
  33. data/config/locales/et.yml +4 -0
  34. data/config/locales/fa.yml +4 -0
  35. data/config/locales/fi.yml +4 -0
  36. data/config/locales/fr.yml +4 -0
  37. data/config/locales/gd.yml +4 -0
  38. data/config/locales/gu.yml +4 -0
  39. data/config/locales/he.yml +4 -0
  40. data/config/locales/hi.yml +4 -0
  41. data/config/locales/hr.yml +4 -0
  42. data/config/locales/hu.yml +4 -0
  43. data/config/locales/hy.yml +4 -0
  44. data/config/locales/id.yml +4 -0
  45. data/config/locales/is.yml +4 -0
  46. data/config/locales/it.yml +4 -0
  47. data/config/locales/ja.yml +4 -0
  48. data/config/locales/ka.yml +4 -0
  49. data/config/locales/kk.yml +4 -0
  50. data/config/locales/ko.yml +4 -0
  51. data/config/locales/lt.yml +4 -0
  52. data/config/locales/lv.yml +4 -0
  53. data/config/locales/ms.yml +4 -0
  54. data/config/locales/mt.yml +4 -0
  55. data/config/locales/nl.yml +4 -0
  56. data/config/locales/no.yml +4 -0
  57. data/config/locales/pa-pk.yml +4 -0
  58. data/config/locales/pa.yml +4 -0
  59. data/config/locales/pl.yml +4 -0
  60. data/config/locales/ps.yml +4 -0
  61. data/config/locales/pt.yml +4 -0
  62. data/config/locales/ro.yml +4 -0
  63. data/config/locales/ru.yml +4 -0
  64. data/config/locales/si.yml +4 -0
  65. data/config/locales/sk.yml +4 -0
  66. data/config/locales/sl.yml +4 -0
  67. data/config/locales/so.yml +4 -0
  68. data/config/locales/sq.yml +4 -0
  69. data/config/locales/sr.yml +4 -0
  70. data/config/locales/sv.yml +4 -0
  71. data/config/locales/sw.yml +4 -0
  72. data/config/locales/ta.yml +4 -0
  73. data/config/locales/th.yml +4 -0
  74. data/config/locales/tk.yml +4 -0
  75. data/config/locales/tr.yml +4 -0
  76. data/config/locales/uk.yml +4 -0
  77. data/config/locales/ur.yml +4 -0
  78. data/config/locales/uz.yml +4 -0
  79. data/config/locales/vi.yml +4 -0
  80. data/config/locales/zh-hk.yml +4 -0
  81. data/config/locales/zh-tw.yml +4 -0
  82. data/config/locales/zh.yml +4 -0
  83. data/lib/govuk_publishing_components/presenters/attachment.rb +23 -0
  84. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +16 -0
  85. data/lib/govuk_publishing_components/version.rb +1 -1
  86. metadata +7 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ebad3c8838bc6fe453b4dbf3274f3289885e17c4ab87456140663f68ab48fbb
4
- data.tar.gz: 3a74ffb39a677727ac02521fb63549c7dd62f995c67b20555f0e07a9b89c2da3
3
+ metadata.gz: dd778ec8393d73593a0efed8121a361f120adcfcfb3afaa2636e988098ffc748
4
+ data.tar.gz: 6464e9b000c6042e360af3f3dbd64eb867cb4c64e0823e13388e375c9958df9c
5
5
  SHA512:
6
- metadata.gz: f50da8d0de71594b12f61e96b030dd956e5cfe6e71cd12ffdd02365720d3a33b1c981633415f805d09c357fddf69e90bb853662256c2ef21bcdab4b1497a24e0
7
- data.tar.gz: 8320ccc0808090c48328b117d18c6241341ebdb50c84e157868386992278d41d431c9a2a853f22330b07e6df6f0871cd73172cb1f8d7f5a71542c9a1b0ff820e
6
+ metadata.gz: fc2047a42108470a5c65cb207e721096e85c9d7ca06664102a4815b6bf2cf81e15be44827bda61760a9edbac45b08775004d7bf782ba2d1a4411ac58316525af
7
+ data.tar.gz: 15b4a62e81f1e8a62756b7f780635ee33edf8d1db5b6cf21fc6902cae9fa7ca7c85d191585b2bc59f7c6e1284ecdccfa4390b4e683516962c9072e6c6c71b9ff
@@ -14,7 +14,7 @@
14
14
  case isDocumentCollectionPage():
15
15
  return document.querySelectorAll('.document-collection .group-title').length
16
16
  case isMainstreamBrowsePage():
17
- return countVisible(document.querySelectorAll('#subsection ul')) || document.querySelectorAll('#section ul').length
17
+ return countVisible(document.querySelectorAll('#subsection ul')) || document.querySelectorAll('#section ul').length || document.querySelectorAll('#root ul').length
18
18
  case isTopicPage():
19
19
  return document.querySelectorAll('.topics-page nav.index-list').length
20
20
  case isPolicyAreaPage():
@@ -45,7 +45,7 @@
45
45
  case isDocumentCollectionPage():
46
46
  return document.querySelectorAll('.document-collection .group-document-list li a').length
47
47
  case isMainstreamBrowsePage():
48
- return countVisible(document.querySelectorAll('#subsection ul a')) || document.querySelectorAll('#section ul a').length
48
+ return countVisible(document.querySelectorAll('#subsection ul a')) || document.querySelectorAll('#section ul a').length || document.querySelectorAll('#root ul a').length
49
49
  case isTopicPage():
50
50
  return document.querySelectorAll('.topics-page .index-list ul a').length ||
51
51
  document.querySelectorAll('.topics-page .topics ul a').length
@@ -71,7 +71,7 @@
71
71
  function getMetaAttribute (selector) {
72
72
  var element = document.querySelector(selector)
73
73
  if (element) {
74
- return element.getAttribute('content')
74
+ return element.getAttribute('content').toLowerCase()
75
75
  }
76
76
  }
77
77
 
@@ -19,6 +19,7 @@ $govuk-new-link-styles: true;
19
19
  @import "components/big-number";
20
20
  @import "components/breadcrumbs";
21
21
  @import "components/button";
22
+ @import "components/cards";
22
23
  @import "components/character-count";
23
24
  @import "components/checkboxes";
24
25
  @import "components/contents-list";
@@ -5,6 +5,7 @@
5
5
 
6
6
  @import "components/print/accordion";
7
7
  @import "components/print/button";
8
+ @import "components/print/cards";
8
9
  @import "components/print/contents-list";
9
10
  @import "components/print/govspeak-html-publication";
10
11
  @import "components/print/govspeak";
@@ -58,8 +58,9 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
58
58
  }
59
59
 
60
60
  .gem-c-attachment__metadata {
61
- @include govuk-font($size: 14);
61
+ @include govuk-font($size: 19);
62
62
  margin: 0 0 govuk-spacing(3);
63
+ color: $govuk-secondary-text-colour;
63
64
 
64
65
  &:last-of-type {
65
66
  margin-bottom: 0;
@@ -0,0 +1,102 @@
1
+ @import "mixins/grid-helper";
2
+ @import "mixins/prefixed-transform";
3
+
4
+ .gem-c-cards__heading {
5
+ margin: 0 0 govuk-spacing(6) 0;
6
+ }
7
+
8
+ .gem-c-cards__list {
9
+ list-style: none;
10
+ padding: 0;
11
+ // Remove the outermost left and right margin from the internal margin of the list items.
12
+ margin: 0 govuk-spacing(-3);
13
+
14
+ display: grid;
15
+ grid-auto-flow: row;
16
+ // Use CSS grid to calculate the number of rows
17
+ grid-template-rows: auto;
18
+ // Use the tallest cell in the grid to set the height for all rows
19
+ grid-auto-rows: fractions(1);
20
+ grid-template-columns: fractions(1);
21
+
22
+ @include govuk-media-query($from: "tablet") {
23
+ grid-template-columns: fractions(2);
24
+ }
25
+
26
+ @include govuk-media-query($from: "desktop") {
27
+ // Note that browsers that don't support CSS grid display the component as one column on all
28
+ // breakpoints
29
+ grid-template-columns: fractions(3);
30
+
31
+ // For browsers that don't support CSS grid, constrain the width to 50% to improve usability
32
+ // especially for screen magnifier users
33
+ width: 50%;
34
+
35
+ // Reset the width for browsers that support CSS grid
36
+ @supports (display: grid) {
37
+ width: initial;
38
+ }
39
+ }
40
+ }
41
+
42
+ .gem-c-cards__list--two-column-desktop {
43
+ @include govuk-media-query($from: "desktop") {
44
+ grid-template-columns: fractions(2);
45
+ }
46
+ }
47
+
48
+ .gem-c-cards__list-item {
49
+ border-top: 1px solid $govuk-border-colour;
50
+ // We use grid to split the container into column widths, so manage the horizontal spacing with
51
+ // internal margins.
52
+ margin: 0 govuk-spacing(3);
53
+ padding: govuk-spacing(3) 0 govuk-spacing(6) 0;
54
+ position: relative;
55
+ }
56
+
57
+ .gem-c-cards__sub-heading {
58
+ margin: 0 govuk-spacing(6) govuk-spacing(2) 0;
59
+ }
60
+
61
+ .gem-c-cards__link {
62
+ // Make the entire list item area clickable
63
+ &:after {
64
+ bottom: 0;
65
+ content: "";
66
+ left: 0;
67
+ position: absolute;
68
+ right: 0;
69
+ top: 0;
70
+ }
71
+
72
+ &:before {
73
+ $dimension: 7px;
74
+ $width: 3px;
75
+
76
+ border-right: $width solid $govuk-brand-colour;
77
+ border-top: $width solid $govuk-brand-colour;
78
+ content: "";
79
+ height: $dimension;
80
+ position: absolute;
81
+ right: govuk-spacing(1);
82
+ top: govuk-spacing(4);
83
+ @include prefixed-transform($rotate: 45deg);
84
+ width: $dimension;
85
+ }
86
+
87
+ &:hover {
88
+ &:before {
89
+ border-color: $govuk-link-hover-colour;
90
+ }
91
+ }
92
+
93
+ &:focus {
94
+ &:before {
95
+ border-color: $govuk-focus-text-colour;
96
+ }
97
+ }
98
+ }
99
+
100
+ .gem-c-cards__description {
101
+ margin: 0;
102
+ }
@@ -19,6 +19,7 @@ $transition-campaign-red: #ff003b;
19
19
  }
20
20
 
21
21
  .gem-c-contextual-sidebar__cta {
22
+ border-top: 2px solid $govuk-brand-colour;
22
23
  margin-bottom: govuk-spacing(6);
23
24
  background-color: govuk-colour('light-grey', $legacy: 'grey-4');
24
25
  display: block;
@@ -66,7 +66,8 @@
66
66
 
67
67
  .gem-c-document-list__attribute {
68
68
  @include govuk-text-colour;
69
- @include govuk-font(14);
69
+ @include govuk-font(16);
70
+ color: $govuk-secondary-text-colour;
70
71
  display: inline-block;
71
72
  list-style: none;
72
73
  padding-right: govuk-spacing(4);
@@ -1,6 +1,7 @@
1
1
  .gem-c-related-navigation {
2
2
  @include govuk-text-colour;
3
3
  border-top: 2px solid govuk-colour("blue");
4
+ margin-bottom: govuk-spacing(9);
4
5
  }
5
6
 
6
7
  .gem-c-related-navigation__main-heading {
@@ -0,0 +1,4 @@
1
+ .gem-c-cards__sub-heading {
2
+ margin-top: govuk-spacing(6);
3
+ margin-bottom: govuk-spacing(1);
4
+ }
@@ -45,7 +45,10 @@ module GovukPublishingComponents
45
45
  end
46
46
 
47
47
  def parse_documentation(file)
48
- { id: File.basename(file, ".yml") }.merge(YAML.unsafe_load_file(file)).with_indifferent_access
48
+ # Psych 4's YAML.unsafe_load_file === Psych 3's YAML.load_file
49
+ # but until we drop support for Ruby 2.7 and Ruby 3.0, we need to support both major versions of Psych
50
+ yaml = YAML.respond_to?(:unsafe_load_file) ? YAML.unsafe_load_file(file) : YAML.load_file(file)
51
+ { id: File.basename(file, ".yml") }.merge(yaml).with_indifferent_access
49
52
  end
50
53
 
51
54
  def app_documentation_directory
@@ -83,7 +83,9 @@
83
83
  <% end %>
84
84
  <% end %>
85
85
 
86
- <% if attachment.alternative_format_contact_email %>
86
+ <% if attachment.display_accessible_format_request_form_link? %>
87
+ <%= link_to "Request an accessible format of this document", "/contact/govuk/request-accessible-format?content_id=#{attachment.owning_document_content_id}&attachment_id=#{attachment.attachment_id}", class: "govuk-link" %>
88
+ <% elsif attachment.alternative_format_contact_email %>
87
89
  <%= tag.p t("components.attachment.request_format_text"), class: "gem-c-attachment__metadata" %>
88
90
  <%= render "govuk_publishing_components/components/details", {
89
91
  title: t("components.attachment.request_format_cta")
@@ -0,0 +1,62 @@
1
+ <%
2
+ heading ||= nil
3
+ items ||= nil
4
+ sub_heading_level ||= 3
5
+ two_column_layout ||= false
6
+ local_assigns ||= nil
7
+
8
+ ul_classes = %w[gem-c-cards__list]
9
+ ul_classes << 'gem-c-cards__list--two-column-desktop' if two_column_layout
10
+
11
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
12
+ %>
13
+ <% if items.present? %>
14
+ <div class="gem-c-cards">
15
+ <% if heading %>
16
+ <%= content_tag(shared_helper.get_heading_level, class: "gem-c-cards__heading govuk-heading-m") do %>
17
+ <%= heading %>
18
+ <% end %>
19
+ <% end %>
20
+ <%= content_tag 'ul', class: ul_classes do %>
21
+ <%
22
+ items.each do |item|
23
+ link = item[:link]
24
+
25
+ if !link[:path].present?
26
+ raise ArgumentError, "The cards component requires a href for all the links"
27
+ end
28
+
29
+ data_attributes = nil
30
+ attributes = link[:tracking_attributes].presence
31
+
32
+ if attributes && attributes[:track_category] && attributes[:track_action]
33
+ data_attributes = {
34
+ track_action: attributes[:track_action],
35
+ track_category: attributes[:track_category],
36
+ track_dimension_index: attributes[:track_dimension_index],
37
+ track_dimension: link[:text],
38
+ track_label: link[:path],
39
+ }
40
+ end
41
+
42
+ link = capture do
43
+ link_to(link[:text], link[:path], {
44
+ class: "govuk-link gem-c-cards__link",
45
+ data: data_attributes,
46
+ })
47
+ end
48
+ %>
49
+
50
+ <li class="gem-c-cards__list-item">
51
+ <%= content_tag("h#{sub_heading_level}", class: "gem-c-cards__sub-heading govuk-heading-s") do %>
52
+ <%= link %>
53
+ <% end %>
54
+
55
+ <% if item[:description] %>
56
+ <p class="govuk-body gem-c-cards__description"><%= item[:description] %></p>
57
+ <% end %>
58
+ </li>
59
+ <% end %>
60
+ <% end %>
61
+ </div>
62
+ <% end %>
@@ -24,6 +24,10 @@
24
24
  } %>
25
25
  <% end %>
26
26
 
27
+ <% if navigation.show_ukraine_cta? %>
28
+ <%= render 'govuk_publishing_components/components/contextual_sidebar/ukraine_cta', content_item: content_item %>
29
+ <% end %>
30
+
27
31
  <% if navigation.show_brexit_cta? %>
28
32
  <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
29
33
  <% end %>
@@ -0,0 +1,27 @@
1
+ <% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
2
+ <%
3
+ title = t("components.related_navigation.ukraine.title")
4
+ link_text = t("components.related_navigation.ukraine.link_text")
5
+ link_path = t("components.related_navigation.ukraine.link_path")
6
+ lang = shared_helper.t_locale("components.related_navigation.ukraine.title")
7
+ %>
8
+
9
+ <% data_attributes = {
10
+ "module": "gem-track-click",
11
+ "track-category": "relatedLinkClicked",
12
+ "track-action": "1.0 Invasion of Ukraine",
13
+ "track-label": link_path,
14
+ "track-dimension": link_text,
15
+ "track-dimension-index": "29",
16
+ } %>
17
+
18
+ <%= tag.div class: "gem-c-contextual-sidebar__cta" do %>
19
+ <%= tag.h2 title, class: "gem-c-contextual-sidebar__heading govuk-heading-s" %>
20
+ <%= tag.p class: "gem-c-contextual-sidebar__text govuk-body" do %>
21
+ <%= link_to link_text,
22
+ link_path,
23
+ class: "govuk-link",
24
+ data: data_attributes,
25
+ lang: lang %>
26
+ <% end %>
27
+ <% end %>
@@ -76,6 +76,17 @@ examples:
76
76
  content_type: application/pdf
77
77
  file_size: 20000
78
78
  alternative_format_contact_email: defra.helpline@defra.gsi.gov.uk
79
+ with_link_to_request_accessible_format_form:
80
+ data:
81
+ attachment:
82
+ title: "Department for Transport information asset register"
83
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/747661/department-for-transport-information-asset-register.csv
84
+ filename: department-for-transport-information-asset-register.csv
85
+ content_type: application/pdf
86
+ file_size: 20000
87
+ owning_document_content_id: 456_abc
88
+ attachment_id: 123
89
+ alternative_format_contact_email: alternative.formats@education.gov.uk
79
90
  with_data_attributes:
80
91
  data:
81
92
  attachment:
@@ -0,0 +1,139 @@
1
+ name: Cards (experimental)
2
+ description: A grid of cards that have a link and a description
3
+ body: |
4
+ The component renders the cards as an unordered list element and visually presents it as a grid. It doesn't use the [GOV.UK Design System grid](https://design-system.service.gov.uk/styles/layout/#grid-system) but sets its own so that it can separately target desktop, tablet and mobile columns.
5
+
6
+ You can display the grid in three or two columns on desktop. Browsers that don't support CSS grid always display one column.
7
+
8
+ You must set a `href` for all the links.
9
+
10
+ This component is currently experimental. If you are using it, please feed back any research findings to the GOV.UK Explore team.
11
+ accessibility_criteria: |
12
+ The component must:
13
+
14
+ - use the correct heading level hierarchy eg. if the component heading uses a `<h2>`, the subheadings must use a `<h3>`
15
+
16
+ It is also good practise to include a heading above the list to tell users what the list contains
17
+ shared_accessibility_criteria:
18
+ - link
19
+ examples:
20
+ default:
21
+ data:
22
+ heading: Topics
23
+ items:
24
+ - link:
25
+ text: Benefits
26
+ path: http://www.gov.uk
27
+ description: Includes eligibility, appeals, tax credits and Universal Credit
28
+ - link:
29
+ text: Births, deaths, marriages and&nbsp;care
30
+ path: http://www.gov.uk
31
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
32
+ - link:
33
+ text: Business and self-employed
34
+ path: http://www.gov.uk
35
+ description: Tools and guidance for businesses
36
+ - link:
37
+ text: Childcare and parenting
38
+ path: http://www.gov.uk
39
+ description: Includes giving birth, fostering, adopting, benefits for children, childcare and schools
40
+ - link:
41
+ text: Citizenship and living in the&nbsp;UK
42
+ path: http://www.gov.uk
43
+ description: Voting, community participation, life in the UK, international projects
44
+ - link:
45
+ text: Crime, justice and the&nbsp;law
46
+ path: http://www.gov.uk
47
+ description: Legal processes, courts and the police
48
+ - link:
49
+ text: Disabled people
50
+ path: http://www.gov.uk
51
+ description: Includes carers, your rights, benefits and the Equality Act
52
+ - link:
53
+ text: Driving and transport
54
+ path: http://www.gov.uk
55
+ description: Includes vehicle tax, MOT and driving licences
56
+ - link:
57
+ text: Education and learning
58
+ path: http://www.gov.uk
59
+ description: Includes student loans, admissions and apprenticeships
60
+ - link:
61
+ text: Employing people
62
+ path: http://www.gov.uk
63
+ description: Includes pay, contracts, hiring and redundancies
64
+ - link:
65
+ text: Environment and countryside
66
+ path: http://www.gov.uk
67
+ description: Includes flooding, recycling and wildlife
68
+ - link:
69
+ text: Housing and local services
70
+ path: http://www.gov.uk
71
+ description: Owning or renting and council services
72
+ two_column_layout:
73
+ description: Override default three column layout on desktop by passing through `two_column_layout` parameter (defaults to `false`).
74
+ data:
75
+ two_column_layout: true
76
+ items:
77
+ - link:
78
+ text: Benefits
79
+ path: http://www.gov.uk
80
+ description: Includes eligibility, appeals, tax credits and Universal Credit
81
+ - link:
82
+ text: Births, deaths, marriages and&nbsp;care
83
+ path: http://www.gov.uk
84
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
85
+ - link:
86
+ text: Business and self-employed
87
+ path: http://www.gov.uk
88
+ description: Tools and guidance for businesses
89
+ - link:
90
+ text: Childcare and parenting
91
+ path: http://www.gov.uk
92
+ description: Includes giving birth, fostering, adopting, benefits for children, childcare and schools
93
+ - link:
94
+ text: Citizenship and living in the&nbsp;UK
95
+ path: http://www.gov.uk
96
+ description: Voting, community participation, life in the UK, international projects
97
+ - link:
98
+ text: Crime, justice and the&nbsp;law
99
+ path: http://www.gov.uk
100
+ description: Legal processes, courts and the police
101
+ - link:
102
+ text: Disabled people
103
+ path: http://www.gov.uk
104
+ description: Includes carers, your rights, benefits and the Equality Act
105
+ custom_heading_levels:
106
+ description: |
107
+ Override default heading level by passing through `heading_level` parameter (defaults to `<h2>`).
108
+
109
+ Override default subheading level by passing through `sub_heading_level` parameter (defaults to `<h3>`)
110
+ data:
111
+ heading: Topics
112
+ heading_level: 3
113
+ sub_heading_level: 4
114
+ items:
115
+ - link:
116
+ text: Benefits
117
+ path: http://www.gov.uk
118
+ description: Includes eligibility, appeals, tax credits and Universal Credit
119
+ with_tracking_attributes:
120
+ description: |
121
+ Tracking can be enabled on the cards component by passing a minimum of data_track_category and data_track_action. Other tracking attributes are optional. Note: tracking events do not currently fire within the component guide.
122
+ data:
123
+ items:
124
+ - link:
125
+ text: Benefits
126
+ path: http://www.gov.uk
127
+ tracking_attributes:
128
+ track_action: track_action
129
+ track_category: homepageClicked
130
+ track_dimension_index: 29
131
+ description: Includes eligibility, appeals, tax credits and Universal Credit
132
+ - link:
133
+ text: Births, deaths, marriages and&nbsp;care
134
+ path: http://www.gov.uk
135
+ tracking_attributes:
136
+ track_action: track_action
137
+ track_category: homepageClicked
138
+ track_dimension_index: 29
139
+ description: Parenting, civil partnerships, divorce and Lasting Power of Attorney
@@ -112,3 +112,21 @@ examples:
112
112
  - content_id: "2f8b848d-23c8-4f42-a41a-df1f81c64d0f"
113
113
  title: "Exporting"
114
114
  phase: "live"
115
+
116
+ with_ukraine_cta:
117
+ description: For documents tagged to the Ukraine topical event we show a custom 'Ukraine Invasion' call to action element.
118
+ data:
119
+ content_item:
120
+ title: "UK forces arrive to reinforce NATO’s eastern flank"
121
+ content_id: "a342fd46-d801-4c1e-9d8f-f41fba6da563"
122
+ locale: "en"
123
+ links:
124
+ ordered_related_items:
125
+ - title: Protecting the UK and promoting a Global Britain
126
+ base_path: "/government/collections/protecting-the-uk-and-promoting-a-global-britain"
127
+ locale: "en"
128
+ topical_events:
129
+ - content_id: "bfa79635-ffda-4b5d-8266-a9cd3a03649c"
130
+ title: "Russian invasion of Ukraine: UK government response"
131
+ base_path: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
132
+ locale: "en"
@@ -163,6 +163,10 @@ ar:
163
163
  link_path: "/brexit"
164
164
  link_text: تحقق مما تحتاج إلى القيام به
165
165
  title: برِيكْسِت
166
+ ukraine:
167
+ link_path:
168
+ link_text:
169
+ title:
166
170
  world_locations: المواقع العالمية
167
171
  search_box:
168
172
  input_title: بحث
@@ -159,6 +159,10 @@ az:
159
159
  link_path: "/brexit"
160
160
  link_text: Nələri etməli olduğunuzu yoxlayın
161
161
  title: Brexit
162
+ ukraine:
163
+ link_path:
164
+ link_text:
165
+ title:
162
166
  world_locations: Dünya üzrə yerləri
163
167
  search_box:
164
168
  input_title: Axtar
@@ -166,6 +166,10 @@ be:
166
166
  link_path: "/brexit"
167
167
  link_text: Праверце, што вам трэба зрабіць
168
168
  title: Брэкзiт
169
+ ukraine:
170
+ link_path:
171
+ link_text:
172
+ title:
169
173
  world_locations: Мы ў свеце
170
174
  search_box:
171
175
  input_title: Пошук
@@ -164,6 +164,10 @@ bg:
164
164
  link_path: "/brexit"
165
165
  link_text: Проверете какво трябва да направите
166
166
  title: Брекзит
167
+ ukraine:
168
+ link_path:
169
+ link_text:
170
+ title:
167
171
  world_locations: Местоположения по света
168
172
  search_box:
169
173
  input_title: Търсене
@@ -161,6 +161,10 @@ bn:
161
161
  link_path: "/brexit"
162
162
  link_text: আপনার যা করা প্রয়োজন তা দেখুন
163
163
  title: ব্রেক্সিট
164
+ ukraine:
165
+ link_path:
166
+ link_text:
167
+ title:
164
168
  world_locations: বিশ্বের অবস্থানসমূহ
165
169
  search_box:
166
170
  input_title: খুঁজুন
@@ -165,6 +165,10 @@ cs:
165
165
  link_path: "/brexit"
166
166
  link_text: Zkontrolujte, co je třeba udělat
167
167
  title: Brexit
168
+ ukraine:
169
+ link_path:
170
+ link_text:
171
+ title:
168
172
  world_locations: Místa ve světě
169
173
  search_box:
170
174
  input_title: Vyhledávání
@@ -164,6 +164,10 @@ cy:
164
164
  link_path: "/brexit.cy"
165
165
  link_text: Gwiriwch beth mae angen i chi wneud
166
166
  title: Brexit
167
+ ukraine:
168
+ link_path:
169
+ link_text:
170
+ title:
167
171
  world_locations: Lleoliadau byd-eang
168
172
  search_box:
169
173
  input_title: Chwilio
@@ -161,6 +161,10 @@ da:
161
161
  link_path: "/brexit"
162
162
  link_text: Tjek hvad du skal gøre
163
163
  title: Brexit
164
+ ukraine:
165
+ link_path:
166
+ link_text:
167
+ title:
164
168
  world_locations: Verden Placeringer
165
169
  search_box:
166
170
  input_title: Søge
@@ -164,6 +164,10 @@ de:
164
164
  link_path: "/brexit"
165
165
  link_text: Prüfen Sie, was Sie machen müssen
166
166
  title: Brexit
167
+ ukraine:
168
+ link_path:
169
+ link_text:
170
+ title:
167
171
  world_locations: Weltweite Standorte
168
172
  search_box:
169
173
  input_title: Suche
@@ -162,6 +162,10 @@ dr:
162
162
  link_path: "/brexit"
163
163
  link_text: بیبینید که چه کاری باید انجام دهید
164
164
  title: برکست
165
+ ukraine:
166
+ link_path:
167
+ link_text:
168
+ title:
165
169
  world_locations: موقعیت هایی جهان
166
170
  search_box:
167
171
  input_title: جستجو نمایید
@@ -160,6 +160,10 @@ el:
160
160
  link_path: "/brexit"
161
161
  link_text: Ελέγξτε τι πρέπει να κάνετε
162
162
  title: Brexit
163
+ ukraine:
164
+ link_path:
165
+ link_text:
166
+ title:
163
167
  world_locations: Παγκόσμιες τοποθεσίες
164
168
  search_box:
165
169
  input_title: Αναζήτηση
@@ -234,6 +234,10 @@ en:
234
234
  link_path: "/brexit"
235
235
  link_text: Check what you need to do
236
236
  title: Brexit
237
+ ukraine:
238
+ link_path: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
239
+ link_text: Find out about the UK’s response
240
+ title: Invasion of Ukraine
237
241
  world_locations: World locations
238
242
  search_box:
239
243
  input_title: Search