govuk_publishing_components 21.67.1 → 23.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.png +0 -0
- data/app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.svg +4 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +16 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/analytics.js +85 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js +30 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js +120 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js +41 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/ecommerce.js +101 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/error-tracking.js +51 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js +56 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/google-analytics-universal-tracker.js +198 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/init.js.erb +50 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/mailto-link-tracker.js +38 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/page-content.js +129 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/pii.js +74 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/print-intent.js +39 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +513 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js +132 -0
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +15 -3
- data/app/assets/javascripts/govuk_publishing_components/lib/track-click.js +61 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +26 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +10 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +23 -18
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +95 -45
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +8 -13
- data/app/views/govuk_publishing_components/components/_govspeak.html.erb +8 -12
- data/app/views/govuk_publishing_components/components/_input.html.erb +17 -4
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +6 -5
- data/app/views/govuk_publishing_components/components/_panel.html.erb +5 -2
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +12 -4
- data/app/views/govuk_publishing_components/components/_search.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +20 -9
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +8 -0
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +0 -37
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -6
- data/app/views/govuk_publishing_components/components/docs/input.yml +7 -3
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -3
- data/app/views/govuk_publishing_components/components/docs/panel.yml +4 -0
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +5 -5
- data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +0 -1
- data/config/initializers/assets.rb +1 -0
- data/config/locales/en.yml +1 -1
- data/config/locales/et.yml +4 -0
- data/config/locales/fr.yml +4 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +24 -3
@@ -10,6 +10,7 @@
|
|
10
10
|
mobile_subtext ||= false
|
11
11
|
light_text ||= false
|
12
12
|
simple ||= false
|
13
|
+
simple_light ||= false
|
13
14
|
dark_icon ||= false
|
14
15
|
small_icon ||= false
|
15
16
|
nhs_icon ||= false
|
@@ -24,6 +25,7 @@
|
|
24
25
|
css_classes << "gem-c-action-link--transparent-icon" if transparent_icon
|
25
26
|
css_classes << "gem-c-action-link--nhs" if nhs_icon
|
26
27
|
css_classes << "gem-c-action-link--simple" if simple
|
28
|
+
css_classes << "gem-c-action-link--simple-light" if simple_light
|
27
29
|
css_classes << "gem-c-action-link--with-subtext" if subtext
|
28
30
|
css_classes << "gem-c-action-link--mobile-subtext" if mobile_subtext
|
29
31
|
css_classes << (shared_helper.get_margin_bottom)
|
@@ -1,13 +1,10 @@
|
|
1
1
|
<%-
|
2
2
|
cl_helper = GovukPublishingComponents::Presenters::ContentsListHelper.new(local_assigns)
|
3
|
-
aria_label ||= "
|
3
|
+
aria_label ||= t("components.contents_list.contents")
|
4
4
|
format_numbers ||= false
|
5
|
-
title_lang ||= false
|
6
|
-
title = local_assigns[:title].presence || t("components.contents_list.contents")
|
7
|
-
hide_title ||= false
|
8
5
|
brand ||= false
|
9
6
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
10
|
-
|
7
|
+
title_fallback = t("components.contents_list.contents", locale: I18n.locale, fallback: false, default: "en")
|
11
8
|
classes = cl_helper.classes
|
12
9
|
classes << brand_helper.brand_class
|
13
10
|
-%>
|
@@ -21,14 +18,12 @@
|
|
21
18
|
module: "track-click"
|
22
19
|
}
|
23
20
|
) do %>
|
24
|
-
|
25
|
-
|
26
|
-
:
|
27
|
-
|
28
|
-
|
29
|
-
)
|
30
|
-
<%= title %>
|
31
|
-
<% end %>
|
21
|
+
<%= content_tag(
|
22
|
+
:h2, {class: "gem-c-contents-list__title"}.merge(
|
23
|
+
title_fallback == "en" ? {:lang => "en",} : {}
|
24
|
+
)
|
25
|
+
) do %>
|
26
|
+
<%= t("components.contents_list.contents") %>
|
32
27
|
<% end %>
|
33
28
|
|
34
29
|
<ol class="gem-c-contents-list__list">
|
@@ -12,22 +12,18 @@
|
|
12
12
|
<% if content.html_safe? %>
|
13
13
|
<%= content %>
|
14
14
|
<% else %>
|
15
|
-
<%
|
16
|
-
You've passed in unsanitised HTML into the
|
17
|
-
`content`
|
15
|
+
<% raise "
|
16
|
+
You've passed in unsanitised HTML into the Govspeak component as the
|
17
|
+
`content` parameter.
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
If you're 100% sure there's no unsanitised user input in the string you
|
25
|
-
could also call `.html_safe` on the string or use the `raw` helper before
|
26
|
-
passing it in.
|
19
|
+
To fix this use a `do` block with the sanitize method - see
|
20
|
+
https://components.publishing.service.gov.uk/component-guide/govspeak/
|
21
|
+
for the updated documentation and
|
22
|
+
https://github.com/alphagov/govuk_publishing_components/pull/1632/
|
23
|
+
for further examples.
|
27
24
|
|
28
25
|
Called from #{caller_locations.find { |l| l.to_s.include?('.erb') }}
|
29
26
|
" %>
|
30
|
-
<%= raw content %>
|
31
27
|
<% end %>
|
32
28
|
<% elsif block_given? %>
|
33
29
|
<%= yield %>
|
@@ -1,4 +1,6 @@
|
|
1
1
|
<%
|
2
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
3
|
+
|
2
4
|
id ||= "input-#{SecureRandom.hex(4)}"
|
3
5
|
value ||= nil
|
4
6
|
type ||= "text"
|
@@ -22,6 +24,7 @@
|
|
22
24
|
error_id = "error-#{SecureRandom.hex(4)}"
|
23
25
|
search_icon ||= nil
|
24
26
|
heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
|
27
|
+
heading_level ||= nil
|
25
28
|
prefix ||= nil
|
26
29
|
suffix ||= nil
|
27
30
|
|
@@ -53,10 +56,20 @@
|
|
53
56
|
|
54
57
|
<%= content_tag :div, class: form_group_css_classes do %>
|
55
58
|
<% if label %>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
59
|
+
<% label_markup = capture do %>
|
60
|
+
<%= render "govuk_publishing_components/components/label", {
|
61
|
+
html_for: id,
|
62
|
+
heading_size: heading_size
|
63
|
+
}.merge(label.symbolize_keys) %>
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
<% if heading_level %>
|
67
|
+
<%= content_tag(shared_helper.get_heading_level, class: "govuk-label-wrapper") do %>
|
68
|
+
<%= label_markup %>
|
69
|
+
<% end %>
|
70
|
+
<% else %>
|
71
|
+
<%= label_markup %>
|
72
|
+
<% end %>
|
60
73
|
<% end %>
|
61
74
|
|
62
75
|
<% if hint %>
|
@@ -47,7 +47,6 @@
|
|
47
47
|
|
48
48
|
<% unless omit_header %>
|
49
49
|
<%= render "govuk_publishing_components/components/layout_header", {
|
50
|
-
environment: "public",
|
51
50
|
search: show_search,
|
52
51
|
# layout-header will always have border-bottom, unless the layout is full width
|
53
52
|
remove_bottom_border: full_width,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%
|
2
|
-
product_name ||=
|
3
|
-
|
2
|
+
product_name ||= nil
|
3
|
+
environment ||= nil
|
4
4
|
full_width ||= false
|
5
5
|
search ||= false
|
6
6
|
search_left ||= false
|
@@ -8,8 +8,9 @@
|
|
8
8
|
remove_bottom_border ||= false
|
9
9
|
search_left ||= false
|
10
10
|
width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
|
11
|
+
|
11
12
|
header_classes = %w(gem-c-layout-header govuk-header)
|
12
|
-
header_classes << "gem-c-layout-header--#{environment}"
|
13
|
+
header_classes << "gem-c-layout-header--#{environment}" if environment
|
13
14
|
header_classes << "gem-c-layout-header--no-bottom-border" if remove_bottom_border
|
14
15
|
header_classes << "gem-c-layout-header--search-left" if search_left
|
15
16
|
%>
|
@@ -19,7 +20,7 @@
|
|
19
20
|
<% if search_left %>
|
20
21
|
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
21
22
|
<div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
|
22
|
-
<%= render "govuk_publishing_components/components/layout_header/header_logo",
|
23
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
|
23
24
|
</div>
|
24
25
|
</div>
|
25
26
|
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
@@ -33,7 +34,7 @@
|
|
33
34
|
<% else %>
|
34
35
|
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
35
36
|
<div class="gem-c-layout-header__logo govuk-grid-column-two-thirds">
|
36
|
-
<%= render "govuk_publishing_components/components/layout_header/header_logo",
|
37
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", environment: environment, product_name: product_name %>
|
37
38
|
</div>
|
38
39
|
<div class="govuk-header__content gem-c-header__content">
|
39
40
|
<%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
|
@@ -2,9 +2,11 @@
|
|
2
2
|
description ||= false
|
3
3
|
prepend ||= false
|
4
4
|
append ||= false
|
5
|
+
|
6
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
5
7
|
%>
|
6
8
|
<div class="gem-c-panel govuk-panel govuk-panel--confirmation">
|
7
|
-
|
9
|
+
<%= content_tag(shared_helper.get_heading_level, class: "govuk-panel__title") do %>
|
8
10
|
<% if prepend %>
|
9
11
|
<span class="gem-c-panel__prepend">
|
10
12
|
<%= prepend %>
|
@@ -18,7 +20,8 @@
|
|
18
20
|
<%= append %>
|
19
21
|
</span>
|
20
22
|
<% end %>
|
21
|
-
|
23
|
+
<% end %>
|
24
|
+
|
22
25
|
<% if description %>
|
23
26
|
<div class="govuk-panel__body">
|
24
27
|
<%= description %>
|
@@ -2,15 +2,19 @@
|
|
2
2
|
text ||= t('components.print_link.text')
|
3
3
|
href ||= nil
|
4
4
|
data_attributes ||= {}
|
5
|
-
|
6
5
|
require_js ||= href.nil?
|
6
|
+
|
7
7
|
data_attributes[:module] = 'print-link' if require_js
|
8
|
+
|
9
|
+
classes = %w(govuk-link)
|
10
|
+
classes << "gem-c-print-link__button" if href.nil?
|
11
|
+
classes << "gem-c-print-link__link govuk-link--no-visited-state" if href.present?
|
8
12
|
%>
|
9
13
|
|
10
14
|
<% if require_js %>
|
11
15
|
<div class="gem-c-print-link" >
|
12
16
|
<%= content_tag(:button, text, {
|
13
|
-
class:
|
17
|
+
class: classes,
|
14
18
|
data: data_attributes
|
15
19
|
}) %>
|
16
20
|
</div>
|
@@ -19,9 +23,13 @@
|
|
19
23
|
<%= link_to(
|
20
24
|
text,
|
21
25
|
href,
|
22
|
-
class:
|
26
|
+
class: classes,
|
23
27
|
rel: "alternate",
|
24
|
-
data: data_attributes
|
28
|
+
data: data_attributes,
|
29
|
+
role: "button",
|
30
|
+
data: {
|
31
|
+
module: "button",
|
32
|
+
},
|
25
33
|
) %>
|
26
34
|
</div>
|
27
35
|
<% end %>
|
@@ -11,6 +11,7 @@
|
|
11
11
|
css_classes = %w( gem-c-subscription-links )
|
12
12
|
css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
|
13
13
|
css_classes << brand_helper.brand_class
|
14
|
+
css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
|
14
15
|
|
15
16
|
data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
|
16
17
|
|
@@ -30,9 +31,12 @@
|
|
30
31
|
>
|
31
32
|
<% if sl_helper.email_signup_link.present? %>
|
32
33
|
<li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>" >
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
<% email_link_text = capture do %>
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="15.75" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M19.687 0H1.312C.589 0 0 .587 0 1.313v13.124c0 .726.588 1.313 1.313 1.313h18.374c.725 0 1.313-.587 1.313-1.313V1.313C21 .587 20.412 0 19.687 0zm-2.625 2.625L10.5 7.875l-6.563-5.25h13.126zm1.313 10.5H2.625V3.937L10.5 10.5l7.875-6.563v9.188z"/></svg>
|
36
|
+
<%= sl_helper.email_signup_link_text %>
|
37
|
+
<% end %>
|
38
|
+
<%= link_to email_link_text, sl_helper.email_signup_link, {
|
39
|
+
class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
|
36
40
|
data: sl_helper.email_signup_link_data_attributes,
|
37
41
|
lang: email_signup_link_text_locale
|
38
42
|
} %>
|
@@ -41,21 +45,28 @@
|
|
41
45
|
|
42
46
|
<% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
|
43
47
|
<li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>">
|
44
|
-
|
45
|
-
|
48
|
+
<% feed_link_text = capture do %>
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z"/></svg>
|
50
|
+
<%= sl_helper.feed_link_text %>
|
51
|
+
<% end %>
|
52
|
+
<%= tag.button feed_link_text, {
|
53
|
+
class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
|
54
|
+
data: sl_helper.feed_link_data_attributes,
|
55
|
+
lang: feed_link_text_locale
|
56
|
+
} if sl_helper.feed_link_box_value %>
|
57
|
+
<%= link_to feed_link_text, sl_helper.feed_link,
|
46
58
|
{
|
47
|
-
class: "gem-c-subscription-
|
59
|
+
class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
|
48
60
|
data: sl_helper.feed_link_data_attributes,
|
49
61
|
lang: feed_link_text_locale
|
50
|
-
}
|
51
|
-
%>
|
62
|
+
} unless sl_helper.feed_link_box_value %>
|
52
63
|
</li>
|
53
64
|
<% end %>
|
54
65
|
</ul>
|
55
66
|
|
56
67
|
<% if sl_helper.feed_link_box_value %>
|
57
68
|
<div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
|
58
|
-
<
|
69
|
+
<h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
|
59
70
|
<div lang="en">
|
60
71
|
<%= render "govuk_publishing_components/components/input", {
|
61
72
|
label: {
|
@@ -83,6 +83,14 @@ examples:
|
|
83
83
|
text: Getting financial help and keeping your business safe
|
84
84
|
href: "/financial-help"
|
85
85
|
simple: true
|
86
|
+
simple_light_arrow:
|
87
|
+
data:
|
88
|
+
text: Getting financial help and keeping your business safe
|
89
|
+
href: "/financial-help"
|
90
|
+
light_text: true
|
91
|
+
simple_light: true
|
92
|
+
context:
|
93
|
+
dark_background: true
|
86
94
|
with_small_icon:
|
87
95
|
data:
|
88
96
|
text: Coronavirus (COVID-19)
|
@@ -203,40 +203,3 @@ examples:
|
|
203
203
|
text: 2. Numbers not parsed
|
204
204
|
- href: "#third-thing"
|
205
205
|
text: 3. Numbers are just text
|
206
|
-
without_a_title:
|
207
|
-
description: The component can be used to provide a list of links to other pages, in which case the 'Contents' title is inappropriate and can be removed.
|
208
|
-
data:
|
209
|
-
hide_title: true
|
210
|
-
contents:
|
211
|
-
- href: "#first-thing"
|
212
|
-
text: Community best practice
|
213
|
-
items:
|
214
|
-
- href: "#second-thing"
|
215
|
-
text: Guidance and regulation
|
216
|
-
- href: "#third-thing"
|
217
|
-
text: Consultations
|
218
|
-
with_a_custom_title:
|
219
|
-
description: Override the default title of "Contents" with a custom title
|
220
|
-
data:
|
221
|
-
title: "On this page"
|
222
|
-
contents:
|
223
|
-
- href: "#first-thing"
|
224
|
-
text: First thing
|
225
|
-
- href: "#second-thing"
|
226
|
-
text: Second thing
|
227
|
-
- href: "#third-thing"
|
228
|
-
text: Third thing
|
229
|
-
with_a_custom_title_locale:
|
230
|
-
description: |
|
231
|
-
This component is often used on translated pages that don’t have a translation for the title of the contents list. This means that it could display the fallback English string if the translate method can’t find an appropriate translation. This makes sure that the lang can be set to ensure that browsers understand which parts of the page are in each language.
|
232
|
-
|
233
|
-
The lang attribute must be set to a [valid BCP47 string](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang#Language_tag_syntax). A valid code can be the two or three letter language code - for example, English is en or eng, Korean is ko or kor - but if in doubt please check.
|
234
|
-
data:
|
235
|
-
title_lang: "cy"
|
236
|
-
contents:
|
237
|
-
- href: "#first-thing"
|
238
|
-
text: First thing
|
239
|
-
- href: "#second-thing"
|
240
|
-
text: Second thing
|
241
|
-
- href: "#third-thing"
|
242
|
-
text: Third thing
|
@@ -24,12 +24,7 @@ examples:
|
|
24
24
|
data:
|
25
25
|
block: |
|
26
26
|
<h2>This is a title</h2>
|
27
|
-
<p>This is some body text with <a href
|
28
|
-
with_content:
|
29
|
-
data:
|
30
|
-
content: |
|
31
|
-
<h2>This is a title</h2>
|
32
|
-
<p>This is some body text with <a href=#>a link</a></p>
|
27
|
+
<p>This is some body text with <a href="https://example.com">a link</a>.</p>
|
33
28
|
heading_levels:
|
34
29
|
data:
|
35
30
|
block: |
|
@@ -125,12 +125,16 @@ examples:
|
|
125
125
|
name: "search-box"
|
126
126
|
type: "search"
|
127
127
|
search_icon: true
|
128
|
-
|
129
|
-
description:
|
128
|
+
with_label_as_heading:
|
129
|
+
description: |
|
130
|
+
Wraps the label in a heading tag. Valid options are 1 to 6. To adjust the size of the label/heading, use the `heading_size` option. Valid options are 's', 'm', 'l' and 'xl'.
|
131
|
+
|
132
|
+
Based on the [heading/label pattern](https://design-system.service.gov.uk/patterns/question-pages/) in the Design System.
|
130
133
|
data:
|
131
134
|
label:
|
132
|
-
text: "
|
135
|
+
text: "This is a heading 1 and a label"
|
133
136
|
name: "name"
|
137
|
+
heading_level: 1
|
134
138
|
heading_size: "l"
|
135
139
|
with_prefix:
|
136
140
|
description: To help users understand how the input should look like. Often used for units of measurement.
|
@@ -44,7 +44,6 @@ examples:
|
|
44
44
|
description: This supports pages where the search appears on the left with multiple navigation links on the right, such as the [How government works](https://www.gov.uk/government/how-government-works) page
|
45
45
|
data:
|
46
46
|
search_left: true
|
47
|
-
environment: public
|
48
47
|
navigation_items:
|
49
48
|
- text: Departments
|
50
49
|
href: "item-1"
|
@@ -71,10 +70,8 @@ examples:
|
|
71
70
|
description: This is useful for pages where a large full-width banner is the first thing to appear on the page, for example, the [GOV.UK homepage](https://www.gov.uk)
|
72
71
|
data:
|
73
72
|
remove_bottom_border: true
|
74
|
-
environment: 'public'
|
75
73
|
with_search_bar:
|
76
74
|
data:
|
77
|
-
environment: 'public'
|
78
75
|
search: true
|
79
76
|
|
80
77
|
accessibility_criteria: |
|
@@ -6,18 +6,18 @@
|
|
6
6
|
<div class="gem-c-feedback__prompt-questions js-prompt-questions">
|
7
7
|
<h2 class="gem-c-feedback__prompt-question"><%= t("components.feedback.is_this_page_useful", default: "Is this page useful?") %></h2>
|
8
8
|
<!-- Maybe button exists only to try and capture clicks by bots -->
|
9
|
-
<button
|
9
|
+
<button data-track-category="yesNoFeedbackForm" data-track-action="ffMaybeClick" aria-expanded="false" style="display: none" hidden="hidden" aria-hidden="true">
|
10
10
|
<%= t("components.feedback.maybe", default: "Maybe") %>
|
11
11
|
</button>
|
12
12
|
|
13
13
|
<ul class="gem-c-feedback__option-list">
|
14
14
|
<li class="gem-c-feedback__option-list-item">
|
15
|
-
<button class="govuk-button
|
15
|
+
<button class="govuk-button gem-c-feedback__prompt-link js-page-is-useful" data-track-category="yesNoFeedbackForm" data-track-action="ffYesClick">
|
16
16
|
<%= t("components.feedback.yes", default: "Yes") %> <span class="govuk-visually-hidden"><%= t("components.feedback.is_useful", default: "this page is useful") %></span>
|
17
17
|
</button>
|
18
18
|
</li>
|
19
19
|
<li class="gem-c-feedback__option-list-item">
|
20
|
-
<button class="govuk-button
|
20
|
+
<button class="govuk-button gem-c-feedback__prompt-link js-toggle-form js-page-is-not-useful" data-track-category="yesNoFeedbackForm" data-track-action="ffNoClick" aria-controls="page-is-not-useful" aria-expanded="false">
|
21
21
|
<%= t("components.feedback.no", default: "No") %> <span class="govuk-visually-hidden"><%= t("components.feedback.is_not_useful", default: "this page is not useful") %></span>
|
22
22
|
</button>
|
23
23
|
</li>
|
@@ -27,8 +27,8 @@
|
|
27
27
|
<%= t("components.feedback.thank_you_for_feedback", default: "Thank you for your feedback") %>
|
28
28
|
</div>
|
29
29
|
<div class="gem-c-feedback__prompt-questions gem-c-feedback__prompt-questions--something-is-wrong js-prompt-questions">
|
30
|
-
<button class="govuk-button
|
31
|
-
<%= t("components.feedback.
|
30
|
+
<button class="govuk-button gem-c-feedback__prompt-link js-toggle-form js-something-is-wrong" data-track-category="Onsite Feedback" data-track-action="GOV-UK Open Form" aria-controls="something-is-wrong" aria-expanded="false">
|
31
|
+
<%= t("components.feedback.something_wrong", default: "There is something wrong with this page") %>
|
32
32
|
</button>
|
33
33
|
</div>
|
34
34
|
</div>
|