govuk_publishing_components 27.2.0 → 27.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9f597f228597fe521d156fd1e23b79623d4df60196700196c04a9a53740f0e2
4
- data.tar.gz: e224f01d29805ef734e0f89cbb6b6184e32c5fd0ed5b93675553af5016ee7d31
3
+ metadata.gz: d52dba0489e69f7b978320fb25718ed4a674702f4c89f4885780dddd2eeed5bf
4
+ data.tar.gz: 66604e208eb054325e982779c62dcfa1d4a463b02801d6d90564d51de90fd5eb
5
5
  SHA512:
6
- metadata.gz: 75262a07437872acef9278a928d494bb8a18eab1104a8020dccd9174f3e15f1c7a3396fcd18c7510b342a42efe604f22a48f1cb125f72095668dd7605e1a07a9
7
- data.tar.gz: f0303f076da669ee166fab9fc85054d665a3b447b0b4447465fe080492b3460072dc6eaa84e46b4f32f70c72ff616c5229c2373f04a7102795a40d5502ad2d85
6
+ metadata.gz: 8331252ae2695e7c8f82659a80bcebe413e4d0f8bfad357ac99a512ed0b7124a97c1ba61d9cc508992d10bb6d8f1d52bf105d8040f7e8d9e8c3530a3f7e7f39b
7
+ data.tar.gz: 420546b30c1401ba308f1f6c063a8ad1f2bb11f10245a144a1878d534efacb670cc8b965c801879552f23e0b4d4195332a0a1e13d61cb7fdcbb4b85d72330323
@@ -12,7 +12,7 @@
12
12
  %>
13
13
  <% if number %>
14
14
  <% big_number_value = capture do %>
15
- <%= tag.span class: classes do %>
15
+ <%= tag.span class: classes, data: href ? nil : data_attributes do %>
16
16
  <%= number %>
17
17
  <% end %>
18
18
 
@@ -87,7 +87,9 @@
87
87
 
88
88
  <% unless omit_header %>
89
89
  <% if show_explore_header %>
90
- <%= render "govuk_publishing_components/components/layout_super_navigation_header" %>
90
+ <%= render "govuk_publishing_components/components/layout_super_navigation_header", {
91
+ logo_link: logo_link,
92
+ } %>
91
93
  <% else %>
92
94
  <%= render "govuk_publishing_components/components/layout_header", {
93
95
  search: show_search,
@@ -1,20 +1,19 @@
1
1
  <%
2
- logo_link = "https://www.gov.uk/"
3
- logo_link_title = t("components.layout_super_navigation_header.logo_link_title")
4
- logo_text = t("components.layout_super_navigation_header.logo_text")
5
- navigation_links = t("components.layout_super_navigation_header.navigation_links")
6
- navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
7
- navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
8
- navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
9
- popular_links = t("components.layout_super_navigation_header.popular_links")
10
- popular_links_heading = t("components.layout_super_navigation_header.popular_links_heading")
11
- search_text = t("components.layout_super_navigation_header.search_text")
12
-
13
- hide_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "search")
14
- show_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "search")
15
- hide_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "navigation")
16
- show_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "navigation")
2
+ logo_link ||= "https://www.gov.uk/"
3
+ logo_link_title ||= t("components.layout_super_navigation_header.logo_link_title")
4
+ logo_text = t("components.layout_super_navigation_header.logo_text")
5
+ navigation_links = t("components.layout_super_navigation_header.navigation_links")
6
+ navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
7
+ navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
8
+ navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
9
+ popular_links = t("components.layout_super_navigation_header.popular_links")
10
+ popular_links_heading = t("components.layout_super_navigation_header.popular_links_heading")
11
+ search_text = t("components.layout_super_navigation_header.search_text")
17
12
 
13
+ hide_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "search")
14
+ show_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "search")
15
+ hide_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "navigation")
16
+ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "navigation")
18
17
  %>
19
18
  <header role="banner" class="gem-c-layout-super-navigation-header">
20
19
  <div class="gem-c-layout-super-navigation-header__container govuk-width-container govuk-clearfix">
@@ -35,7 +35,7 @@ examples:
35
35
  href: "/government/organisations#ministerial_departments"
36
36
  with_data_attributes:
37
37
  description: |
38
- These data attributes will only be present if a `href` attribute is present.
38
+ If a `href` attribute is present, data attributes will apply to the `span` containing the number value (see below).
39
39
 
40
40
  This will also not automatically apply a `gem-track-click` module attribute if the data attributes pertain to click tracking. Remember to apply this outside the component call in a surrounding element, if using.
41
41
  data:
@@ -48,3 +48,9 @@ examples:
48
48
  track-label: "/government/organisations#ministerial_departments"
49
49
  track-dimension: 23 Ministerial departments
50
50
  track-dimension-index: 29
51
+ with_data_attributes_but_no_link:
52
+ data:
53
+ number: 23
54
+ label: Ministerial departments
55
+ data_attributes:
56
+ department-count: true
@@ -20,3 +20,8 @@ accessibility_excluded_rules:
20
20
  - landmark-no-duplicate-banner # banners will be duplicated in component examples list
21
21
  examples:
22
22
  default:
23
+ with_custom_logo_link:
24
+ description: The header logo links to root by default. This option allows us to override that in certain instances. Remember to change the title, as the default is "Go to the GOV.UK homepage".
25
+ data:
26
+ logo_link: "https://www.example.com"
27
+ logo_link_title: "Go to example"
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.2.0".freeze
2
+ VERSION = "27.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 27.2.0
4
+ version: 27.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-22 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config