govuk_publishing_components 24.15.0 → 24.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
- data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.svg +2 -2
- data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +21 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +20 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux.js +942 -787
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +8 -3
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +4 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +4 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +5 -0
- data/config/i18n-tasks.yml +4 -0
- data/config/locales/en.yml +10 -20
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +25 -6
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +17 -2
@@ -17,6 +17,7 @@
|
|
17
17
|
transparent_icon ||= false
|
18
18
|
data ||= nil
|
19
19
|
classes ||= nil
|
20
|
+
font_size ||= nil
|
20
21
|
|
21
22
|
css_classes = %w(gem-c-action-link)
|
22
23
|
css_classes << "gem-c-action-link--light-text" if light_text
|
@@ -33,6 +34,7 @@
|
|
33
34
|
link_classes = %w(govuk-link gem-c-action-link__link)
|
34
35
|
link_classes << shared_helper.classes if classes
|
35
36
|
link_classes << "govuk-link--inverse" if light_text
|
37
|
+
link_classes << shared_helper.get_heading_size(font_size, 'm') if font_size
|
36
38
|
%>
|
37
39
|
<% if text.present? %>
|
38
40
|
<div class="<%= css_classes.join(' ') %>">
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<%
|
2
|
+
omit_feedback_form ||= false
|
2
3
|
emergency_banner ||= nil
|
3
4
|
full_width ||= false
|
4
5
|
global_bar ||= nil
|
6
|
+
product_name ||= nil
|
5
7
|
html_lang ||= "en"
|
6
8
|
layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
|
7
9
|
logo_link ||= "/"
|
@@ -76,6 +78,7 @@
|
|
76
78
|
search: show_search,
|
77
79
|
logo_link: logo_link,
|
78
80
|
navigation_items: navigation_items,
|
81
|
+
product_name: product_name,
|
79
82
|
|
80
83
|
# The (blue) bottom border needs to be underneath the emergency banner -
|
81
84
|
# so it has been turned off and added in manually.
|
@@ -104,9 +107,11 @@
|
|
104
107
|
</main>
|
105
108
|
</div>
|
106
109
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
+
<% unless omit_feedback_form %>
|
111
|
+
<div class="govuk-width-container">
|
112
|
+
<%= render "govuk_publishing_components/components/feedback" %>
|
113
|
+
</div>
|
114
|
+
<% end %>
|
110
115
|
|
111
116
|
<% unless local_assigns[:hide_footer_links] %>
|
112
117
|
<%= render "govuk_publishing_components/components/layout_footer", {
|
@@ -101,6 +101,12 @@ examples:
|
|
101
101
|
text: Coronavirus (COVID-19)
|
102
102
|
href: "/my-test-page"
|
103
103
|
dark_icon: true
|
104
|
+
with_custom_font_size:
|
105
|
+
data:
|
106
|
+
text: Guidance for businesses
|
107
|
+
href: "/guidance-for-businesses"
|
108
|
+
dark_icon: true
|
109
|
+
font_size: m
|
104
110
|
with_nhs_icon:
|
105
111
|
data:
|
106
112
|
text: Something about the NHS
|
@@ -40,10 +40,14 @@ examples:
|
|
40
40
|
items:
|
41
41
|
- href: '/help'
|
42
42
|
text: Help
|
43
|
+
- href: '/help/privacy-notice'
|
44
|
+
text: Privacy
|
43
45
|
- href: '/help/cookies'
|
44
46
|
text: Cookies
|
45
47
|
- href: '/contact'
|
46
48
|
text: Contact
|
49
|
+
- href: '/help/accessibility-statement'
|
50
|
+
text: Accessibility statement
|
47
51
|
- href: '/help/terms-conditions'
|
48
52
|
text: Terms and conditions
|
49
53
|
- href: '/cymraeg'
|
@@ -27,6 +27,10 @@ examples:
|
|
27
27
|
description: This allows the header to be omitted which is currently used when rendering CSV previews from Whitehall
|
28
28
|
data:
|
29
29
|
omit_header: true
|
30
|
+
omit_feedback:
|
31
|
+
description: This allows the feedback form to be omitted
|
32
|
+
data:
|
33
|
+
omit_feedback_form: true
|
30
34
|
navigation:
|
31
35
|
description: Passes the navigation through to the [header component](/component-guide/layout_header/).
|
32
36
|
data:
|
data/config/locales/en.yml
CHANGED
@@ -12,20 +12,14 @@ en:
|
|
12
12
|
article_schema:
|
13
13
|
scoped_search_description: Search within %{title}
|
14
14
|
attachment:
|
15
|
-
opendocument_html: This file is in an <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation'
|
16
|
-
target=%{target} class='govuk-link'>OpenDocument</a> format
|
15
|
+
opendocument_html: This file is in an <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a> format
|
17
16
|
order_a_copy: Order a copy
|
18
17
|
page:
|
19
18
|
one: 1 page
|
20
|
-
other:
|
19
|
+
other: "%{count} pages"
|
21
20
|
reference: 'Ref: %{reference}'
|
22
21
|
request_format_cta: Request an accessible format.
|
23
|
-
request_format_details_html: If you use assistive technology (such as a screen
|
24
|
-
reader) and need a version of this document in a more accessible format, please
|
25
|
-
email <a href='mailto:%{alternative_format_contact_email}' target='_blank'
|
26
|
-
class='govuk-link'>%{alternative_format_contact_email}</a>. Please tell us
|
27
|
-
what format you need. It will help us if you say what assistive technology
|
28
|
-
you use.
|
22
|
+
request_format_details_html: If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email <a href='mailto:%{alternative_format_contact_email}' target='_blank' class='govuk-link'>%{alternative_format_contact_email}</a>. Please tell us what format you need. It will help us if you say what assistive technology you use.
|
29
23
|
request_format_text: This file may not be suitable for users of assistive technology.
|
30
24
|
back_link:
|
31
25
|
back: Back
|
@@ -44,28 +38,24 @@ en:
|
|
44
38
|
buttons:
|
45
39
|
accept_cookies: Accept additional cookies
|
46
40
|
reject_cookies: Reject additional cookies
|
47
|
-
hide: Hide this message
|
48
|
-
text:
|
49
|
-
- We use some essential cookies to make this website work.
|
50
|
-
- We’d like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.
|
51
|
-
- We also use cookies set by other sites to help us deliver content from their services.
|
52
41
|
confirmation_message: You can %{link} at any time.
|
53
42
|
confirmation_message_link: change your cookie settings
|
43
|
+
hide: Hide this message
|
44
|
+
text:
|
45
|
+
- We use some essential cookies to make this website work.
|
46
|
+
- We’d like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.
|
47
|
+
- We also use cookies set by other sites to help us deliver content from their services.
|
54
48
|
title: Cookies on GOV.UK
|
55
49
|
feedback:
|
56
50
|
close: Close
|
57
|
-
dont_include_personal_info: Don’t include personal or financial information
|
58
|
-
like your National Insurance number or credit card details.
|
51
|
+
dont_include_personal_info: Don’t include personal or financial information like your National Insurance number or credit card details.
|
59
52
|
email_address: Email address
|
60
53
|
help_us_improve_govuk: Help us improve GOV.UK
|
61
54
|
is_not_useful: this page is not useful
|
62
55
|
is_this_page_useful: Is this page useful?
|
63
56
|
is_useful: this page is useful
|
64
57
|
maybe: Maybe
|
65
|
-
more_about_visit: To help us improve GOV.UK, we’d like to know more about your
|
66
|
-
visit today. We’ll send you a link to a feedback form. It will take only 2
|
67
|
-
minutes to fill in. Don’t worry we won’t send you spam or share your email
|
68
|
-
address with anyone.
|
58
|
+
more_about_visit: To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone.
|
69
59
|
'no': 'No'
|
70
60
|
send: Send
|
71
61
|
send_me_survey: Send me the survey
|
@@ -39,8 +39,7 @@ module GovukPublishingComponents
|
|
39
39
|
tracking_category: "breadcrumbClicked",
|
40
40
|
tracking_action: tracking_action,
|
41
41
|
tracking_label: content_item["base_path"],
|
42
|
-
|
43
|
-
}
|
42
|
+
}.merge(custom_dimension_tracking)
|
44
43
|
end
|
45
44
|
|
46
45
|
private
|
@@ -80,16 +79,36 @@ module GovukPublishingComponents
|
|
80
79
|
[PRIORITY_TAXONS[:brexit_business], PRIORITY_TAXONS[:brexit_individuals]]
|
81
80
|
end
|
82
81
|
|
82
|
+
def brexit_taxons
|
83
|
+
brexit_child_taxons << PRIORITY_TAXONS[:brexit_taxon]
|
84
|
+
end
|
85
|
+
|
83
86
|
def preferred_priority_taxon
|
84
87
|
query_parameters["priority-taxon"] if query_parameters
|
85
88
|
end
|
86
89
|
|
87
90
|
def tracking_action
|
88
91
|
action = %w[superBreadcrumb]
|
89
|
-
action <<
|
90
|
-
action
|
91
|
-
|
92
|
-
|
92
|
+
action << page_name_for_tracking
|
93
|
+
action.compact.join(" ")
|
94
|
+
end
|
95
|
+
|
96
|
+
def custom_dimension_tracking
|
97
|
+
tracking = { tracking_dimension_enabled: false }
|
98
|
+
if brexit_taxons.include?(taxon["content_id"])
|
99
|
+
tracking[:tracking_dimension_enabled] = true
|
100
|
+
tracking[:tracking_dimension] = page_name_for_tracking
|
101
|
+
tracking[:tracking_dimension_index] = 111
|
102
|
+
end
|
103
|
+
tracking
|
104
|
+
end
|
105
|
+
|
106
|
+
def page_name_for_tracking
|
107
|
+
{
|
108
|
+
PRIORITY_TAXONS[:brexit_business] => "Brexitbusiness",
|
109
|
+
PRIORITY_TAXONS[:brexit_individuals] => "Brexitcitizen",
|
110
|
+
PRIORITY_TAXONS[:brexit_taxon] => "Brexitbusinessandcitizen",
|
111
|
+
}[taxon["content_id"]]
|
93
112
|
end
|
94
113
|
|
95
114
|
def tagged_to_both_brexit_child_taxons?
|
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.
|
4
|
+
version: 24.16.1
|
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-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: i18n-tasks
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: jasmine
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -804,6 +818,7 @@ files:
|
|
804
818
|
- app/views/govuk_publishing_components/components/metadata/_sentence.html.erb
|
805
819
|
- app/views/govuk_publishing_components/components/related_navigation/_section.html.erb
|
806
820
|
- app/views/layouts/govuk_publishing_components/application.html.erb
|
821
|
+
- config/i18n-tasks.yml
|
807
822
|
- config/initializers/assets.rb
|
808
823
|
- config/locales/ar.yml
|
809
824
|
- config/locales/az.yml
|