govuk_publishing_components 24.13.2 → 24.13.3

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: 5a5f30a829f44913c30260a6dcaa8f09cb443897477370f95d64b977e0ba3e3b
4
- data.tar.gz: 7acbcf428ab0bcc171285ece6d46c19fbf1145b2c55e65de79f0ba6c51f2990a
3
+ metadata.gz: 8a35a738afbd13284b90e5ca985cb1be689e1a4fec384d36cf3618c3c9b6562c
4
+ data.tar.gz: f330967e05f6c5c5d41f47fb7b5205685197e483b67b0db08d27ad4efd60a796
5
5
  SHA512:
6
- metadata.gz: 05cc84e714cde48b7fd102495f024ab30284f171ea2fab94b6ef6a7aad9d0642dc78ab8c50b844be7b2eca1efa985e8a2aae4c6e5fa5f6e9f162e87db2d4c53c
7
- data.tar.gz: 4cdb13383ef1ce24a5e688e2a0d1b5bf9b349a18290e3e41537f2c7c75881d1ee472a4c795e4d3c300e5d274e46aba3618b49e9e8e2cfb1ceed018112e1ff864
6
+ metadata.gz: 3a3c2ab786bc602c21b2ecd225c9fe297e6dca33a146c0a135ae7f3bca839a8aecc988d061cf83d2ae607ed904c2827921fc7ecbe72a53c1a83f9660af6f1762
7
+ data.tar.gz: 925f4e55851084894c74b27bfd58a502e411bdbb552f0a44567724c4789bc05691d15b9c0dfd72878b62465f52dffcd0582664b844cd2c56fdae2a9d135e4de6
@@ -21,8 +21,14 @@
21
21
 
22
22
  if (targetClass.indexOf('js-visible') !== -1) {
23
23
  target.setAttribute('class', targetClass.replace(/(^|\s)js-visible(\s|$)/, ''))
24
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
25
+ window.GOVUK.analytics.trackEvent('headerClicked', 'searchClosed', { label: 'none' })
26
+ }
24
27
  } else {
25
28
  target.setAttribute('class', targetClass + ' js-visible')
29
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
30
+ window.GOVUK.analytics.trackEvent('headerClicked', 'searchOpened', { label: 'none' })
31
+ }
26
32
  }
27
33
  if (sourceClass.indexOf('js-visible') !== -1) {
28
34
  this.setAttribute('class', sourceClass.replace(/(^|\s)js-visible(\s|$)/, ''))
@@ -4,6 +4,7 @@
4
4
  global_bar ||= nil
5
5
  html_lang ||= "en"
6
6
  layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
7
+ logo_link ||= "/"
7
8
  navigation_items ||= []
8
9
  omit_header ||= false
9
10
  show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
@@ -71,6 +72,7 @@
71
72
  <% unless omit_header %>
72
73
  <%= render "govuk_publishing_components/components/layout_header", {
73
74
  search: show_search,
75
+ logo_link: logo_link,
74
76
  navigation_items: navigation_items,
75
77
 
76
78
  # The (blue) bottom border needs to be underneath the emergency banner -
@@ -8,6 +8,7 @@
8
8
  search ||= false
9
9
  search_left ||= false
10
10
  width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
11
+ logo_link ||= "/"
11
12
 
12
13
  header_classes = %w[gem-c-layout-header govuk-header]
13
14
  header_classes << "gem-c-layout-header--#{environment}" if environment
@@ -20,7 +21,11 @@
20
21
  <% if search_left %>
21
22
  <div class="govuk-grid-row">
22
23
  <div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
23
- <%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
24
+ <%= render "govuk_publishing_components/components/layout_header/header_logo", {
25
+ environment: environment,
26
+ logo_link: logo_link,
27
+ product_name: product_name,
28
+ } %>
24
29
  </div>
25
30
  </div>
26
31
  <div class="govuk-grid-row">
@@ -36,7 +41,11 @@
36
41
  <% else %>
37
42
  <div class="govuk-grid-row">
38
43
  <div class="gem-c-layout-header__logo govuk-grid-column-two-thirds">
39
- <%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
44
+ <%= render "govuk_publishing_components/components/layout_header/header_logo", {
45
+ environment: environment,
46
+ logo_link: logo_link,
47
+ product_name: product_name,
48
+ } %>
40
49
  </div>
41
50
  <% if navigation_items.any? %>
42
51
  <div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
@@ -10,6 +10,9 @@
10
10
  size ||= ""
11
11
  value ||= ""
12
12
 
13
+ data_attributes ||= {}
14
+ data_attributes[:module] = 'gem-track-click'
15
+
13
16
  classes = %w[gem-c-search govuk-!-display-none-print]
14
17
  classes << (shared_helper.get_margin_top)
15
18
  classes << (shared_helper.get_margin_bottom) if local_assigns[:margin_bottom]
@@ -40,9 +43,9 @@
40
43
  value: value,
41
44
  ) %>
42
45
  <div class="gem-c-search__item gem-c-search__submit-wrapper">
43
- <button class="gem-c-search__submit" type="submit">
46
+ <%= tag.button class: "gem-c-search__submit", type: "submit", data: data_attributes do %>
44
47
  <%= button_text %>
45
- </button>
48
+ <% end %>
46
49
  </div>
47
50
  </div>
48
51
  </div>
@@ -1,11 +1,11 @@
1
1
  <div class="govuk-header__logo gem-c-header__logo">
2
- <a href="/" class="govuk-header__link govuk-header__link--homepage" data-module="gem-track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
2
+ <a href="<%= logo_link %>" class="govuk-header__link govuk-header__link--homepage" data-module="gem-track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
3
3
  <span class="govuk-header__logotype">
4
- <svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 132 97" height="32" width="36">
4
+ <svg aria-hidden="true" focusable="false" class="gem-c-header__logotype-crown govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 132 97" height="32" width="36">
5
5
  <path fill="currentColor" fill-rule="evenodd"
6
6
  d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.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-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
7
7
  <%# Deliberate use of image tag as a fallback method https://lynn.ru/examples/svg/en.html %>
8
- <image src="<%= asset_path('govuk-logotype-crown.png') %>" class="govuk-header__logotype-crown-fallback-image"></image>
8
+ <image src="<%= asset_path('govuk-logotype-crown.png') %>" xlink:href="" display="none" class="govuk-header__logotype-crown-fallback-image" width="36" height="32"></image>
9
9
  </svg>
10
10
  <span class="govuk-header__logotype-text">
11
11
  GOV.UK
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.13.2".freeze
2
+ VERSION = "24.13.3".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: 24.13.2
4
+ version: 24.13.3
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-06-04 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config