govuk_publishing_components 43.1.1 → 43.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +2 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +8 -5
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +10 -3
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +7 -5
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_secondary-navigation.scss +94 -0
- data/app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss +27 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_secondary_navigation.html.erb +29 -0
- data/app/views/govuk_publishing_components/components/docs/secondary_navigation.yml +28 -0
- data/app/views/govuk_publishing_components/components/govuk_logo/_govuk_logo.html.erb +1 -5
- data/app/views/govuk_publishing_components/components/layout_for_public/_header_logo.html.erb +1 -3
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +5 -5
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e4cae4dbe308c9a7d6c09b6af0e5a2bd8e336704c65b65b36db523740774350
|
4
|
+
data.tar.gz: 6783d9392096dc776ab89670f28348a037de4c4312648a3459e6c7d59ca93e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06ca0b986701886935c7fa20f38e10c65719a7112b99a454a075924a013963d431f1915272140cbc97581ab08d7123de66fd2f1c9179cefe75155326e7d5a784
|
7
|
+
data.tar.gz: dba9a2166cbab782ce0dd4800716f142241ed81aa2afa0a1e5dff4f4f164273973fe62a642cce7c8ddd74ddb1b2c0e0de2e7bfd40a9e925a94b62ed0629c8354
|
@@ -295,7 +295,7 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
295
295
|
var PIIRemover = new window.GOVUK.analyticsGa4.PIIRemover()
|
296
296
|
searchTerm = searchTerm.replace(/\++|(%2B)+/gm, ' ') // Turn + characters or unicode + characters (%2B) into a space.
|
297
297
|
searchTerm = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(searchTerm)
|
298
|
-
searchTerm = PIIRemover.stripPIIWithOverride(searchTerm,
|
298
|
+
searchTerm = PIIRemover.stripPIIWithOverride(searchTerm, false, true)
|
299
299
|
searchTerm = searchTerm.toLowerCase()
|
300
300
|
return searchTerm
|
301
301
|
}
|
@@ -339,8 +339,7 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
339
339
|
var DEFAULT_LIST_TITLE = 'Smart answer results'
|
340
340
|
|
341
341
|
if (isSearchResult) {
|
342
|
-
|
343
|
-
var searchQuery = window.GOVUK.analyticsGa4.core.trackFunctions.standardiseSearchTerm(element.getAttribute('data-ga4-search-query')).substring(0, 100)
|
342
|
+
var searchQuery = window.GOVUK.analyticsGa4.core.trackFunctions.standardiseSearchTerm(element.getAttribute('data-ga4-search-query'))
|
344
343
|
var variant = element.getAttribute('data-ga4-ecommerce-variant')
|
345
344
|
DEFAULT_LIST_TITLE = 'Site search results'
|
346
345
|
}
|
@@ -11,6 +11,7 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
11
11
|
|
12
12
|
init: function (referrer) {
|
13
13
|
if (window.dataLayer) {
|
14
|
+
this.stripDates = !this.getSearchTerm()
|
14
15
|
var data = {
|
15
16
|
event: 'page_view',
|
16
17
|
page_view: {
|
@@ -33,7 +34,7 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
33
34
|
navigation_page_type: this.getMetaContent('navigation-page-type'),
|
34
35
|
navigation_list_type: this.getMetaContent('navigation-list-type'),
|
35
36
|
step_navs: this.getMetaContent('stepnavs'),
|
36
|
-
taxonomy_level1: this.getMetaContent('themes'),
|
37
|
+
taxonomy_level1: this.getMetaContent('taxonomy_level1') || this.getMetaContent('themes'),
|
37
38
|
taxonomy_main: this.getMetaContent('taxon-slug'),
|
38
39
|
taxonomy_main_id: this.getMetaContent('taxon-id'),
|
39
40
|
taxonomy_all: this.getMetaContent('taxon-slugs'),
|
@@ -48,8 +49,8 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
48
49
|
publishing_government: this.removeHyphensAndDowncase(this.getMetaContent('publishing-government') || this.getMetaContent('ga4-publishing-government')),
|
49
50
|
political_status: this.getMetaContent('political-status') || this.getMetaContent('ga4-political-status'),
|
50
51
|
primary_publishing_organisation: this.getMetaContent('primary-publishing-organisation'),
|
51
|
-
organisations: this.getMetaContent('analytics:organisations'),
|
52
|
-
world_locations: this.getMetaContent('analytics:world-locations'),
|
52
|
+
organisations: this.getMetaContent('organisations') || this.getMetaContent('analytics:organisations'),
|
53
|
+
world_locations: this.getMetaContent('world-locations') || this.getMetaContent('analytics:world-locations'),
|
53
54
|
|
54
55
|
/* The existence of a referrer parameter indicates that the page has been dynamically updated via an AJAX request
|
55
56
|
and therefore we can use it to set the dynamic property appropriately. This value is used by PA's to differentiate
|
@@ -78,7 +79,8 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
78
79
|
},
|
79
80
|
|
80
81
|
getLocation: function () {
|
81
|
-
|
82
|
+
// We don't want to remove dates on search pages.
|
83
|
+
return this.PIIRemover.stripPIIWithOverride(this.stripGaParam(document.location.href), this.stripDates, true)
|
82
84
|
},
|
83
85
|
|
84
86
|
getSearchTerm: function () {
|
@@ -110,8 +112,9 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
110
112
|
getQueryString: function () {
|
111
113
|
var queryString = window.GOVUK.analyticsGa4.core.trackFunctions.getSearch()
|
112
114
|
if (queryString) {
|
115
|
+
// We don't want to remove dates on search pages.
|
113
116
|
queryString = this.stripGaParam(queryString)
|
114
|
-
queryString = this.PIIRemover.stripPIIWithOverride(queryString,
|
117
|
+
queryString = this.PIIRemover.stripPIIWithOverride(queryString, this.stripDates, true)
|
115
118
|
queryString = queryString.substring(1) // removes the '?' character from the start.
|
116
119
|
return queryString
|
117
120
|
}
|
@@ -27,18 +27,23 @@
|
|
27
27
|
var UNLOCK_TOKEN_PATTERN = /unlock_token=[a-zA-Z0-9-]+/g
|
28
28
|
var STATE_PATTERN = /state=.[^&]+/g
|
29
29
|
|
30
|
+
// some users mistakenly use GOV.UK to search for the status of their applications.
|
31
|
+
// e.g. GWF123456789 and GB123456789000
|
32
|
+
var VISA_PATTERN_GWF = /GWF\d{9}/g
|
33
|
+
var VISA_PATTERN_GB = /GB\d{12}/g
|
34
|
+
|
30
35
|
function shouldStripDates () {
|
31
|
-
var metas = document.querySelectorAll('meta[name="govuk:
|
36
|
+
var metas = document.querySelectorAll('meta[name="govuk:ga4-strip-dates"]')
|
32
37
|
return metas.length > 0
|
33
38
|
}
|
34
39
|
|
35
40
|
function shouldStripPostcodes () {
|
36
|
-
var metas = document.querySelectorAll('meta[name="govuk:
|
41
|
+
var metas = document.querySelectorAll('meta[name="govuk:ga4-strip-postcodes"]')
|
37
42
|
return metas.length > 0
|
38
43
|
}
|
39
44
|
|
40
45
|
function queryStringParametersToStrip () {
|
41
|
-
var meta = document.querySelector('meta[name="govuk:
|
46
|
+
var meta = document.querySelector('meta[name="govuk:ga4-strip-query-string-parameters"]')
|
42
47
|
var value = false
|
43
48
|
if (meta) {
|
44
49
|
value = meta.getAttribute('content')
|
@@ -97,6 +102,8 @@
|
|
97
102
|
stripped = stripped.replace(RESET_PASSWORD_TOKEN_PATTERN, 'reset_password_token=[reset_password_token]')
|
98
103
|
stripped = stripped.replace(UNLOCK_TOKEN_PATTERN, 'unlock_token=[unlock_token]')
|
99
104
|
stripped = stripped.replace(STATE_PATTERN, 'state=[state]')
|
105
|
+
stripped = stripped.replace(VISA_PATTERN_GWF, '[gwf number]')
|
106
|
+
stripped = stripped.replace(VISA_PATTERN_GB, '[gb eori number]')
|
100
107
|
stripped = this.stripQueryStringParameters(stripped)
|
101
108
|
|
102
109
|
if (this.stripDatePII === true) {
|
@@ -202,12 +202,14 @@
|
|
202
202
|
|
203
203
|
window.GOVUK.deleteCookie = function (cookie) {
|
204
204
|
window.GOVUK.cookie(cookie, null)
|
205
|
+
window.GOVUK.expireCookie(cookie)
|
206
|
+
}
|
205
207
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
208
|
+
window.GOVUK.expireCookie = function (cookie, value = '') {
|
209
|
+
// We need to handle deleting cookies on the domain and the .domain
|
210
|
+
var thePast = new Date(0) // 0 = 0 seconds since UTC started (1970/01/01)
|
211
|
+
document.cookie = cookie + '=' + value + ';expires=' + thePast + ';'
|
212
|
+
document.cookie = cookie + '=' + value + ';expires=' + thePast + ';domain=' + window.location.hostname + ';path=/'
|
211
213
|
}
|
212
214
|
|
213
215
|
window.GOVUK.deleteUnconsentedCookies = function () {
|
@@ -107,7 +107,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
107
107
|
try {
|
108
108
|
documentReferrer = document.referrer || new URL(document.referrer).pathname
|
109
109
|
} catch (e) {
|
110
|
-
console.
|
110
|
+
console.warn('Error grabbing referrer for cookie settings', window.location, e)
|
111
111
|
}
|
112
112
|
return documentReferrer
|
113
113
|
}
|
@@ -67,6 +67,7 @@
|
|
67
67
|
@import "components/related-navigation";
|
68
68
|
@import "components/reorderable-list";
|
69
69
|
@import "components/search";
|
70
|
+
@import "components/secondary-navigation";
|
70
71
|
@import "components/select";
|
71
72
|
@import "components/share-links";
|
72
73
|
@import "components/signup-link";
|
@@ -290,6 +290,8 @@ $after-button-padding-left: govuk-spacing(4);
|
|
290
290
|
// after it has been toggled closed if the blue background has
|
291
291
|
// been enabled
|
292
292
|
.gem-c-layout-super-navigation-header__navigation-top-toggle-button.gem-c-layout-super-navigation-header__navigation-top-toggle-button--blue-background {
|
293
|
+
background-color: $govuk-brand-colour;
|
294
|
+
|
293
295
|
&:focus:not(:focus-visible) {
|
294
296
|
&::after {
|
295
297
|
background: none;
|
@@ -606,6 +608,10 @@ $after-button-padding-left: govuk-spacing(4);
|
|
606
608
|
// Styles for search toggle button.
|
607
609
|
.gem-c-layout-super-navigation-header__search-toggle-button {
|
608
610
|
background: none;
|
611
|
+
|
612
|
+
&.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
|
613
|
+
background: $govuk-brand-colour;
|
614
|
+
}
|
609
615
|
border: 0;
|
610
616
|
color: govuk-colour("white");
|
611
617
|
cursor: pointer;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
@import "govuk_publishing_components/individual_component_support";
|
2
|
+
|
3
|
+
.gem-c-secondary-navigation {
|
4
|
+
@include govuk-font(19);
|
5
|
+
@include govuk-responsive-margin(6, "bottom");
|
6
|
+
|
7
|
+
@include govuk-media-query($from: tablet) {
|
8
|
+
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
9
|
+
display: flex;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
.gem-c-secondary-navigation__list {
|
14
|
+
list-style: none;
|
15
|
+
margin-bottom: govuk-spacing(4);
|
16
|
+
padding: 0;
|
17
|
+
|
18
|
+
@include govuk-media-query($from: tablet) {
|
19
|
+
box-shadow: none;
|
20
|
+
display: flex;
|
21
|
+
margin: 0;
|
22
|
+
white-space: nowrap;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.gem-c-secondary-navigation__list-item {
|
27
|
+
box-shadow: inset 0 -1px 0 $govuk-border-colour;
|
28
|
+
|
29
|
+
@include govuk-media-query($from: tablet) {
|
30
|
+
display: flex;
|
31
|
+
margin-right: 20px;
|
32
|
+
|
33
|
+
&:last-child {
|
34
|
+
margin-right: 0;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
&:last-child {
|
39
|
+
box-shadow: none;
|
40
|
+
}
|
41
|
+
|
42
|
+
.gem-c-secondary-navigation__list-item-link,
|
43
|
+
.gem-c-secondary-navigation__list-item-link:link,
|
44
|
+
.gem-c-secondary-navigation__list-item-link:visited {
|
45
|
+
background-color: inherit;
|
46
|
+
border-left: 4px solid transparent;
|
47
|
+
color: govuk-colour("blue");
|
48
|
+
display: block;
|
49
|
+
padding: govuk-spacing(2);
|
50
|
+
text-decoration: none;
|
51
|
+
|
52
|
+
@include govuk-media-query($from: tablet) {
|
53
|
+
border-bottom: 4px solid transparent;
|
54
|
+
border-left: 0;
|
55
|
+
padding: govuk-spacing(2) 0;
|
56
|
+
padding-bottom: govuk-spacing(2) - 4px; // Compensate for 4px border
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
.gem-c-secondary-navigation__list-item-link:hover {
|
61
|
+
color: $govuk-link-hover-colour;
|
62
|
+
}
|
63
|
+
|
64
|
+
.gem-c-secondary-navigation__list-item-link:focus {
|
65
|
+
@include govuk-focused-text;
|
66
|
+
|
67
|
+
border-color: $govuk-focus-text-colour;
|
68
|
+
border-left-color: transparent;
|
69
|
+
position: relative;
|
70
|
+
|
71
|
+
@include govuk-media-query($from: tablet) {
|
72
|
+
box-shadow: none;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
.gem-c-secondary-navigation__list-item--current {
|
78
|
+
.gem-c-secondary-navigation__list-item-link:link,
|
79
|
+
.gem-c-secondary-navigation__list-item-link:visited {
|
80
|
+
border-color: govuk-colour("blue");
|
81
|
+
color: $govuk-text-colour;
|
82
|
+
}
|
83
|
+
|
84
|
+
.gem-c-secondary-navigation__list-item-link:focus {
|
85
|
+
@include govuk-focused-text;
|
86
|
+
|
87
|
+
border-color: $govuk-focus-text-colour;
|
88
|
+
border-left-color: transparent;
|
89
|
+
|
90
|
+
@include govuk-media-query($from: tablet) {
|
91
|
+
box-shadow: none;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// A helper class for removing column layouts when printing.
|
2
|
+
// This should be applied to row/column layouts, by adding the
|
3
|
+
// class to elements with a `govuk-grid-row` class. The columns
|
4
|
+
// will then print at the full width of the page.
|
5
|
+
// Note that only the immediate child columns will be affected.
|
6
|
+
// If a child column also contains a row/column layout of
|
7
|
+
// further elements, these will be unaffected and will retain
|
8
|
+
// their existing column layout. Use the class again on these
|
9
|
+
// nested grids to apply fullwidth column printing if required.
|
10
|
+
|
11
|
+
@include govuk-media-query($media-type: print) {
|
12
|
+
.gem-print-columns-none {
|
13
|
+
width: 100%;
|
14
|
+
|
15
|
+
> .govuk-width-container {
|
16
|
+
margin: 0;
|
17
|
+
max-width: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
> [class*="govuk-grid-column"] {
|
21
|
+
position: static !important; // stylelint-disable-line declaration-no-important
|
22
|
+
float: none;
|
23
|
+
clear: both;
|
24
|
+
width: 100%;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<%
|
2
2
|
add_gem_component_stylesheet("search")
|
3
|
+
add_gem_component_stylesheet("label")
|
3
4
|
|
4
5
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
5
6
|
heading_helper = GovukPublishingComponents::Presenters::HeadingHelper.new(local_assigns)
|
@@ -51,10 +52,8 @@
|
|
51
52
|
end
|
52
53
|
end
|
53
54
|
%>
|
54
|
-
|
55
55
|
<div class="<%= classes.join(" ") %>" data-module="gem-toggle-input-class-on-focus">
|
56
56
|
<% if wrap_label_in_a_heading %>
|
57
|
-
<% add_gem_component_stylesheet("label") %>
|
58
57
|
<%= content_tag(shared_helper.get_heading_level, class: "govuk-!-margin-0") do %>
|
59
58
|
<%= tag_label %>
|
60
59
|
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("secondary-navigation")
|
3
|
+
|
4
|
+
id ||= nil
|
5
|
+
items ||= []
|
6
|
+
|
7
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
+
component_helper.add_aria_attribute({label: aria_label})
|
9
|
+
component_helper.add_class('gem-c-secondary-navigation')
|
10
|
+
component_helper.set_id(id)
|
11
|
+
component_helper.add_role("navigation")
|
12
|
+
%>
|
13
|
+
|
14
|
+
<% if items.any? %>
|
15
|
+
<%= tag.nav(**component_helper.all_attributes) do %>
|
16
|
+
<%= tag.ul class: "gem-c-secondary-navigation__list" do %>
|
17
|
+
<% items.each do |item| %>
|
18
|
+
<%
|
19
|
+
item_classes = %w( gem-c-secondary-navigation__list-item )
|
20
|
+
item_classes << "gem-c-secondary-navigation__list-item--current" if item[:current]
|
21
|
+
item_aria_attributes = { current: "page" } if item[:current]
|
22
|
+
%>
|
23
|
+
<%= tag.li class: item_classes do %>
|
24
|
+
<%= link_to item[:label], item[:href], class: "govuk-link govuk-link--no-visited-state gem-c-secondary-navigation__list-item-link", data: item[:data_attributes], aria: item_aria_attributes %>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Secondary navigation
|
2
|
+
description: Displays a secondary navigation with the current page marked accordingly
|
3
|
+
accessibility_criteria: |
|
4
|
+
The component must:
|
5
|
+
* indicate that it is navigation landmark
|
6
|
+
* indicate if a navigation item links to the currently-displayed page
|
7
|
+
shared_accessibility_criteria:
|
8
|
+
- link
|
9
|
+
uses_component_wrapper_helper: true
|
10
|
+
examples:
|
11
|
+
default:
|
12
|
+
data:
|
13
|
+
id: "nav_1234"
|
14
|
+
aria_label: Document navigation
|
15
|
+
items:
|
16
|
+
- label: Tab 1
|
17
|
+
href: "#1"
|
18
|
+
current: true
|
19
|
+
data_attributes:
|
20
|
+
gtm: tab
|
21
|
+
- label: Tab 2
|
22
|
+
href: "#2"
|
23
|
+
data_attributes:
|
24
|
+
gtm: tab
|
25
|
+
- label: Tab 3
|
26
|
+
href: "#3"
|
27
|
+
data_attributes:
|
28
|
+
gtm: tab
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%
|
2
|
-
aria_label_text ||= "GOV.UK"
|
3
|
-
%>
|
4
|
-
|
5
1
|
<svg
|
6
2
|
focusable="false"
|
7
3
|
role="img"
|
@@ -10,7 +6,7 @@
|
|
10
6
|
viewBox="0 0 148 30"
|
11
7
|
height="30"
|
12
8
|
width="148"
|
13
|
-
aria-label
|
9
|
+
aria-label="GOV.UK"
|
14
10
|
>
|
15
11
|
<title>GOV.UK</title>
|
16
12
|
<path d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m10.8-3.7c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s0 2-1 2.4m3.3 4.8c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4M17 4.7l2.3 1.2V2.5l-2.3.7-.2-.2.9-3h-3.4l.9 3-.2.2c-.1.1-2.3-.7-2.3-.7v3.4L15 4.7c.1.1.1.2.2.2l-1.3 4c-.1.2-.1.4-.1.6 0 1.1.8 2 1.9 2.2h.7c1-.2 1.9-1.1 1.9-2.1 0-.2 0-.4-.1-.6l-1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-.5-.6-1.1-1.1-1.7-1.4-.7-.3-1.5-.5-2.4-.5s-1.7.2-2.4.5-1.3.8-1.7 1.4c-.5.6-.8 1.3-1.1 2.2-.2.8-.4 1.7-.4 2.7v.1c0 1 .1 1.9.4 2.7.2.8.6 1.6 1.1 2.2.5.6 1.1 1.1 1.7 1.4.6.3 1.4.5 2.4.5zM88.9 28 83 7h4.7l4 15.7h.1l4-15.7h4.7l-5.9 21h-5.7zm28.8-3.6c.6 0 1.2-.1 1.7-.3.5-.2 1-.4 1.4-.8.4-.4.7-.8.9-1.4.2-.6.3-1.2.3-2v-13h4.1v13.6c0 1.2-.2 2.2-.6 3.1s-1 1.7-1.8 2.4c-.7.7-1.6 1.2-2.7 1.5-1 .4-2.2.5-3.4.5-1.2 0-2.4-.2-3.4-.5-1-.4-1.9-.9-2.7-1.5-.8-.7-1.3-1.5-1.8-2.4-.4-.9-.6-2-.6-3.1V6.9h4.2v13c0 .8.1 1.4.3 2 .2.6.5 1 .9 1.4.4.4.8.6 1.4.8.6.2 1.1.3 1.8.3zm13-17.4h4.2v9.1l7.4-9.1h5.2l-7.2 8.4L148 28h-4.9l-5.5-9.4-2.7 3V28h-4.2V7zm-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z"></path>
|
data/app/views/govuk_publishing_components/components/layout_for_public/_header_logo.html.erb
CHANGED
@@ -7,9 +7,7 @@
|
|
7
7
|
%>
|
8
8
|
|
9
9
|
<% unless hide_logo_text %>
|
10
|
-
<%= render "govuk_publishing_components/components/govuk_logo/govuk_logo"
|
11
|
-
aria_label_text: logo_text,
|
12
|
-
} %>
|
10
|
+
<%= render "govuk_publishing_components/components/govuk_logo/govuk_logo" %>
|
13
11
|
<% else %>
|
14
12
|
<span class="govuk-visually-hidden">
|
15
13
|
<%= logo_text %>
|
@@ -41,8 +41,8 @@ module GovukPublishingComponents
|
|
41
41
|
meta_tags["govuk:section"] = content_item[:section] if content_item[:section]
|
42
42
|
meta_tags["govuk:withdrawn"] = "withdrawn" if content_item[:withdrawn_notice].present?
|
43
43
|
meta_tags["govuk:content-has-history"] = "true" if has_content_history?
|
44
|
-
meta_tags["govuk:
|
45
|
-
meta_tags["govuk:
|
44
|
+
meta_tags["govuk:ga4-strip-dates"] = "true" if should_strip_dates_pii?(content_item, local_assigns)
|
45
|
+
meta_tags["govuk:ga4-strip-postcodes"] = "true" if should_strip_postcode_pii?(content_item, local_assigns)
|
46
46
|
meta_tags["govuk:first-published-at"] = content_item[:first_published_at] if content_item[:first_published_at]
|
47
47
|
meta_tags["govuk:updated-at"] = content_item[:updated_at] if content_item[:updated_at]
|
48
48
|
meta_tags["govuk:public-updated-at"] = content_item[:public_updated_at] if content_item[:public_updated_at]
|
@@ -64,11 +64,11 @@ module GovukPublishingComponents
|
|
64
64
|
organisations += links[:organisations] || []
|
65
65
|
organisations += links[:worldwide_organisations] || []
|
66
66
|
organisations_content = organisations.map { |link| "<#{link[:analytics_identifier]}>" }.uniq.join
|
67
|
-
meta_tags["govuk:
|
67
|
+
meta_tags["govuk:organisations"] = organisations_content if organisations.any?
|
68
68
|
|
69
69
|
world_locations = links[:world_locations] || []
|
70
70
|
world_locations_content = world_locations.map { |link| "<#{link[:analytics_identifier]}>" }.join
|
71
|
-
meta_tags["govuk:
|
71
|
+
meta_tags["govuk:world-locations"] = world_locations_content if world_locations.any?
|
72
72
|
|
73
73
|
meta_tags
|
74
74
|
end
|
@@ -106,7 +106,7 @@ module GovukPublishingComponents
|
|
106
106
|
|
107
107
|
def add_taxonomy_tags(meta_tags)
|
108
108
|
themes = root_taxon_slugs(content_item)
|
109
|
-
meta_tags["govuk:
|
109
|
+
meta_tags["govuk:taxonomy_level1"] = themes.to_a.sort.join(", ") unless themes.empty?
|
110
110
|
|
111
111
|
taxons = if content_item[:document_type] == "taxon"
|
112
112
|
[content_item]
|
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: 43.
|
4
|
+
version: 43.2.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: 2024-09-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -542,6 +542,7 @@ files:
|
|
542
542
|
- app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss
|
543
543
|
- app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss
|
544
544
|
- app/assets/stylesheets/govuk_publishing_components/components/_search.scss
|
545
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_secondary-navigation.scss
|
545
546
|
- app/assets/stylesheets/govuk_publishing_components/components/_select.scss
|
546
547
|
- app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss
|
547
548
|
- app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss
|
@@ -593,6 +594,7 @@ files:
|
|
593
594
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_media-down.scss
|
594
595
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss
|
595
596
|
- app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss
|
597
|
+
- app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss
|
596
598
|
- app/controllers/govuk_publishing_components/application_controller.rb
|
597
599
|
- app/controllers/govuk_publishing_components/audit_controller.rb
|
598
600
|
- app/controllers/govuk_publishing_components/component_guide_controller.rb
|
@@ -684,6 +686,7 @@ files:
|
|
684
686
|
- app/views/govuk_publishing_components/components/_related_navigation.html.erb
|
685
687
|
- app/views/govuk_publishing_components/components/_reorderable_list.html.erb
|
686
688
|
- app/views/govuk_publishing_components/components/_search.html.erb
|
689
|
+
- app/views/govuk_publishing_components/components/_secondary_navigation.html.erb
|
687
690
|
- app/views/govuk_publishing_components/components/_select.html.erb
|
688
691
|
- app/views/govuk_publishing_components/components/_share_links.html.erb
|
689
692
|
- app/views/govuk_publishing_components/components/_signup_link.html.erb
|
@@ -776,6 +779,7 @@ files:
|
|
776
779
|
- app/views/govuk_publishing_components/components/docs/related_navigation.yml
|
777
780
|
- app/views/govuk_publishing_components/components/docs/reorderable_list.yml
|
778
781
|
- app/views/govuk_publishing_components/components/docs/search.yml
|
782
|
+
- app/views/govuk_publishing_components/components/docs/secondary_navigation.yml
|
779
783
|
- app/views/govuk_publishing_components/components/docs/select.yml
|
780
784
|
- app/views/govuk_publishing_components/components/docs/share_links.yml
|
781
785
|
- app/views/govuk_publishing_components/components/docs/signup_link.yml
|
@@ -1888,7 +1892,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1888
1892
|
- !ruby/object:Gem::Version
|
1889
1893
|
version: '0'
|
1890
1894
|
requirements: []
|
1891
|
-
rubygems_version: 3.5.
|
1895
|
+
rubygems_version: 3.5.19
|
1892
1896
|
signing_key:
|
1893
1897
|
specification_version: 4
|
1894
1898
|
summary: A gem to document components in GOV.UK frontend applications
|