govuk_publishing_components 54.0.0 → 55.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/lib/sticky-element-container.js +117 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +5 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +6 -12
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +13 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-to-top-link.scss +15 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list-with-body.scss +58 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +46 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +57 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +0 -74
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +33 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +5 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_sticky-element-container.scss +23 -0
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +1 -1
- data/app/models/govuk_publishing_components/audit_applications.rb +1 -1
- data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
- data/app/models/govuk_publishing_components/audit_components.rb +1 -1
- data/app/models/govuk_publishing_components/component_doc.rb +1 -1
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_back_to_top_link.html.erb +19 -0
- data/app/views/govuk_publishing_components/components/_contents_list_with_body.html.erb +27 -0
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -6
- data/app/views/govuk_publishing_components/components/_figure.html.erb +28 -0
- data/app/views/govuk_publishing_components/components/_heading.html.erb +0 -1
- 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 +0 -6
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -3
- data/app/views/govuk_publishing_components/components/_published_dates.html.erb +50 -0
- data/app/views/govuk_publishing_components/components/_radio.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_search.html.erb +1 -4
- data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +27 -0
- data/app/views/govuk_publishing_components/components/docs/back_to_top_link.yml +19 -0
- data/app/views/govuk_publishing_components/components/docs/contents_list_with_body.yml +90 -0
- data/app/views/govuk_publishing_components/components/docs/figure.yml +43 -0
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +7 -4
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +0 -1
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -3
- data/app/views/govuk_publishing_components/components/docs/published_dates.yml +43 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +0 -9
- data/app/views/govuk_publishing_components/components/docs/summary_banner.yml +28 -0
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +0 -4
- data/config/locales/ar.yml +11 -4
- data/config/locales/az.yml +11 -4
- data/config/locales/be.yml +11 -4
- data/config/locales/bg.yml +11 -4
- data/config/locales/bn.yml +11 -4
- data/config/locales/cs.yml +11 -4
- data/config/locales/cy.yml +11 -4
- data/config/locales/da.yml +11 -4
- data/config/locales/de.yml +11 -4
- data/config/locales/dr.yml +11 -4
- data/config/locales/el.yml +11 -4
- data/config/locales/en.yml +17 -10
- data/config/locales/es-419.yml +12 -5
- data/config/locales/es.yml +12 -5
- data/config/locales/et.yml +11 -4
- data/config/locales/fa.yml +11 -4
- data/config/locales/fi.yml +11 -4
- data/config/locales/fr.yml +11 -4
- data/config/locales/gd.yml +11 -4
- data/config/locales/gu.yml +11 -4
- data/config/locales/he.yml +11 -4
- data/config/locales/hi.yml +11 -4
- data/config/locales/hr.yml +11 -4
- data/config/locales/hu.yml +11 -4
- data/config/locales/hy.yml +11 -4
- data/config/locales/id.yml +11 -4
- data/config/locales/is.yml +11 -4
- data/config/locales/it.yml +11 -4
- data/config/locales/ja.yml +11 -4
- data/config/locales/ka.yml +11 -4
- data/config/locales/kk.yml +11 -4
- data/config/locales/ko.yml +11 -4
- data/config/locales/lt.yml +11 -4
- data/config/locales/lv.yml +11 -4
- data/config/locales/ms.yml +11 -4
- data/config/locales/mt.yml +11 -4
- data/config/locales/ne.yml +224 -0
- data/config/locales/nl.yml +11 -4
- data/config/locales/no.yml +11 -4
- data/config/locales/pa-pk.yml +11 -4
- data/config/locales/pa.yml +11 -4
- data/config/locales/pl.yml +11 -4
- data/config/locales/ps.yml +11 -4
- data/config/locales/pt.yml +11 -4
- data/config/locales/ro.yml +11 -4
- data/config/locales/ru.yml +11 -4
- data/config/locales/si.yml +11 -4
- data/config/locales/sk.yml +11 -4
- data/config/locales/sl.yml +11 -4
- data/config/locales/so.yml +11 -4
- data/config/locales/sq.yml +11 -4
- data/config/locales/sr.yml +11 -4
- data/config/locales/sv.yml +11 -4
- data/config/locales/sw.yml +11 -4
- data/config/locales/ta.yml +11 -4
- data/config/locales/th.yml +11 -4
- data/config/locales/tk.yml +11 -4
- data/config/locales/tr.yml +11 -4
- data/config/locales/uk.yml +11 -4
- data/config/locales/ur.yml +11 -4
- data/config/locales/uz.yml +11 -4
- data/config/locales/vi.yml +11 -4
- data/config/locales/zh-hk.yml +11 -4
- data/config/locales/zh-tw.yml +11 -4
- data/config/locales/zh.yml +11 -4
- data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +35 -26
- data/lib/govuk_publishing_components/config.rb +3 -0
- data/lib/govuk_publishing_components/presenters/attachment_helper.rb +2 -6
- data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +14 -14
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_organisations.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_item.rb +1 -3
- data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +2 -2
- data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +3 -3
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -2
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +2 -2
- data/node_modules/axe-core/axe.js +63 -46
- data/node_modules/axe-core/axe.min.js +3 -3
- data/node_modules/axe-core/locales/_template.json +1 -1
- data/node_modules/axe-core/locales/de.json +19 -19
- data/node_modules/axe-core/locales/ko.json +4 -4
- data/node_modules/axe-core/package.json +4 -3
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +20 -9
- data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
- data/app/assets/images/govuk_publishing_components/action-link-arrow--light.png +0 -0
- 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.png +0 -0
- data/app/assets/images/govuk_publishing_components/action-link-arrow.png +0 -0
- data/app/assets/images/govuk_publishing_components/search-button.png +0 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +0 -29
@@ -290,7 +290,7 @@ module GovukPublishingComponents
|
|
290
290
|
results = []
|
291
291
|
|
292
292
|
@applications_data.each do |application|
|
293
|
-
next unless application[:application_found] &&
|
293
|
+
next unless application[:application_found] && application[:helper_references].present?
|
294
294
|
|
295
295
|
application[:helper_references].each do |key, value|
|
296
296
|
location = {
|
@@ -275,7 +275,7 @@ module GovukPublishingComponents
|
|
275
275
|
next unless File.file?(file)
|
276
276
|
|
277
277
|
helpers.each do |helper|
|
278
|
-
next
|
278
|
+
next if File.foreach(file).grep(helper[:match]).blank?
|
279
279
|
|
280
280
|
helper[:used_by] << {
|
281
281
|
name: component[:name],
|
@@ -8,6 +8,7 @@
|
|
8
8
|
attributes = []
|
9
9
|
url_data_attributes ||= {}
|
10
10
|
details_ga4_attributes ||= {}
|
11
|
+
local_assigns[:margin_bottom] ||= 6
|
11
12
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
12
13
|
|
13
14
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
@@ -126,6 +127,7 @@
|
|
126
127
|
<%= render "govuk_publishing_components/components/details", {
|
127
128
|
title: t("components.attachment.request_format_cta"),
|
128
129
|
ga4_attributes: details_ga4_attributes,
|
130
|
+
margin_bottom: 0,
|
129
131
|
} do %>
|
130
132
|
<%= t("components.attachment.request_format_details_html", alternative_format_contact_email: attachment.alternative_format_contact_email) %>
|
131
133
|
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("back-to-top-link")
|
3
|
+
|
4
|
+
text ||= t("components.back_to_top_link.contents", default: "Contents")
|
5
|
+
|
6
|
+
if href.blank? || text.blank?
|
7
|
+
raise ArgumentError, "The back_to_top_link component requires text and a href"
|
8
|
+
end
|
9
|
+
|
10
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
11
|
+
component_helper.add_class("govuk-link gem-c-back-to-top-link govuk-!-display-none-print")
|
12
|
+
%>
|
13
|
+
|
14
|
+
<%= link_to href, **component_helper.all_attributes do %>
|
15
|
+
<svg class="gem-c-back-to-top-link__icon" xmlns="http://www.w3.org/2000/svg" width="13" height="17" viewBox="0 0 13 17" aria-hidden="true" focusable="false">
|
16
|
+
<path fill="currentColor" d="M6.5 0L0 6.5 1.4 8l4-4v12.7h2V4l4.3 4L13 6.4z"/>
|
17
|
+
</svg>
|
18
|
+
<%= text %>
|
19
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% add_gem_component_stylesheet("contents-list-with-body") %>
|
2
|
+
<% block = yield %>
|
3
|
+
<% unless block.empty? %>
|
4
|
+
<%
|
5
|
+
contents ||= []
|
6
|
+
id ||= "contents"
|
7
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
+
component_helper.set_id(id)
|
9
|
+
component_helper.add_class("gem-c-contents-list-with-body")
|
10
|
+
component_helper.add_data_attribute({ module: "sticky-element-container" }) if contents.any?
|
11
|
+
%>
|
12
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
13
|
+
<% if contents.any? %>
|
14
|
+
<div class="gem-c-contents-list-with-body__list-container">
|
15
|
+
<%= render 'govuk_publishing_components/components/contents_list', contents: contents %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
<%= block %>
|
19
|
+
<% if contents.any? %>
|
20
|
+
<div data-sticky-element class="gem-c-contents-list-with-body__link-wrapper">
|
21
|
+
<div class="gem-c-contents-list-with-body__link-container">
|
22
|
+
<%= render 'govuk_publishing_components/components/back_to_top_link', href: "#contents" %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
@@ -2,13 +2,9 @@
|
|
2
2
|
add_gem_component_stylesheet("button")
|
3
3
|
add_gem_component_stylesheet("feedback")
|
4
4
|
|
5
|
-
def utf_encode(element)
|
6
|
-
element.is_a?(String) ? element.encode : element
|
7
|
-
end
|
8
|
-
|
9
5
|
email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
|
10
|
-
url_without_pii =
|
11
|
-
path_without_pii =
|
6
|
+
url_without_pii = request.original_url.gsub(email_regex, '[email]').encode
|
7
|
+
path_without_pii = request.fullpath.gsub(email_regex, '[email]').encode
|
12
8
|
|
13
9
|
disable_ga4 ||= false
|
14
10
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("figure")
|
3
|
+
alt ||= ""
|
4
|
+
caption ||= ""
|
5
|
+
credit ||= ""
|
6
|
+
local_assigns[:lang] ||= "en"
|
7
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
+
component_helper.add_class("gem-c-figure")
|
9
|
+
%>
|
10
|
+
<%= tag.figure(**component_helper.all_attributes) do %>
|
11
|
+
<% if src.present? %>
|
12
|
+
<img class="gem-c-figure__image" src="<%= src %>" alt="<%= alt %>">
|
13
|
+
<% end %>
|
14
|
+
<% if caption.present? || credit.present? %>
|
15
|
+
<figcaption class="gem-c-figure__figcaption">
|
16
|
+
<% if caption.present? %>
|
17
|
+
<p class="gem-c-figure__figcaption-text">
|
18
|
+
<%= caption %>
|
19
|
+
</p>
|
20
|
+
<% end %>
|
21
|
+
<% if credit.present? %>
|
22
|
+
<p class="gem-c-figure__figcaption-text">
|
23
|
+
<%= I18n.t("components.figure.image_credit", credit: credit) %>
|
24
|
+
</p>
|
25
|
+
<% end %>
|
26
|
+
</figcaption>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
@@ -21,7 +21,6 @@
|
|
21
21
|
product_name ||= nil
|
22
22
|
show_cross_service_header ||= false
|
23
23
|
draft_watermark ||= false
|
24
|
-
show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
|
25
24
|
title ||= "GOV.UK - The best place to find government services and information"
|
26
25
|
|
27
26
|
show_account_layout ||= false
|
@@ -7,7 +7,6 @@
|
|
7
7
|
navigation_items ||= []
|
8
8
|
product_name ||= nil
|
9
9
|
remove_bottom_border ||= false
|
10
|
-
search ||= false
|
11
10
|
width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
|
12
11
|
logo_link ||= "/"
|
13
12
|
|
@@ -34,11 +33,6 @@
|
|
34
33
|
<%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items, navigation_aria_label: navigation_aria_label %>
|
35
34
|
</div>
|
36
35
|
<% end %>
|
37
|
-
<% if search %>
|
38
|
-
<div class="govuk-grid-column-one-half gem-c-layout-header__search govuk-!-display-none-print">
|
39
|
-
<%= render "govuk_publishing_components/components/layout_header/search" %>
|
40
|
-
</div>
|
41
|
-
<% end %>
|
42
36
|
</div>
|
43
37
|
</div>
|
44
38
|
<% end %>
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -12,7 +12,6 @@
|
|
12
12
|
|
13
13
|
navigation_links_columns = t("components.layout_super_navigation_header.navigation_links_columns")
|
14
14
|
navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
|
15
|
-
navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
|
16
15
|
navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
|
17
16
|
search_text = t("components.layout_super_navigation_header.search_text")
|
18
17
|
|
@@ -13,9 +13,6 @@
|
|
13
13
|
inverse ||= false
|
14
14
|
inverse_compress ||= false
|
15
15
|
|
16
|
-
direction_class = ""
|
17
|
-
direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
|
18
|
-
|
19
16
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
20
17
|
component_helper.add_class("gem-c-metadata")
|
21
18
|
component_helper.add_class("direction-#{direction}") if local_assigns.include?(:direction)
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("published-dates")
|
3
|
+
|
4
|
+
published ||= false
|
5
|
+
history ||= []
|
6
|
+
history = Array(history)
|
7
|
+
last_updated ||= false
|
8
|
+
link_to_history ||= false
|
9
|
+
|
10
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
11
|
+
component_helper.add_class("gem-c-published-dates")
|
12
|
+
component_helper.add_class("gem-c-published-dates--history") if history.any?
|
13
|
+
component_helper.set_id("full-publication-update-history") if history.any?
|
14
|
+
component_helper.add_data_attribute({ module: "gem-toggle" }) if history.any?
|
15
|
+
component_helper.set_lang("en")
|
16
|
+
%>
|
17
|
+
<% if published || last_updated %>
|
18
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
19
|
+
<h2 class="govuk-visually-hidden"><%= t('components.published_dates.hidden_heading') %></h2>
|
20
|
+
<% if published %>
|
21
|
+
<%= t('components.published_dates.published', date: published) %>
|
22
|
+
<% end %>
|
23
|
+
<% if last_updated %>
|
24
|
+
<% if published %><br /><% end %><%= t('components.published_dates.last_updated', date: last_updated) %>
|
25
|
+
<% if link_to_history && history.empty? %>
|
26
|
+
— <a href="#history" class="gem-c-published-dates__history-link govuk-link"><%= t('components.published_dates.see_all_updates', locale: :en) %></a>
|
27
|
+
<% elsif history.any? %>
|
28
|
+
<a href="#full-history"
|
29
|
+
class="gem-c-published-dates__toggle govuk-link"
|
30
|
+
data-controls="full-history"
|
31
|
+
data-expanded="false"
|
32
|
+
data-toggled-text="- <%= t('components.published_dates.hide_all_updates', locale: :en) %>"
|
33
|
+
data-module="ga4-event-tracker"
|
34
|
+
data-ga4-event="<%= {event_name: "select_content", type: "content history", section: "Footer"}.to_json %>"
|
35
|
+
data-ga4-expandable
|
36
|
+
>+ <%= t('components.published_dates.show_all_updates', locale: :en) %></a>
|
37
|
+
<div class="gem-c-published-dates__change-history js-hidden" id="full-history">
|
38
|
+
<ol class="gem-c-published-dates__list">
|
39
|
+
<% history.each do |change| %>
|
40
|
+
<li class="gem-c-published-dates__change-item">
|
41
|
+
<time class="gem-c-published-dates__change-date timestamp" datetime="<%= change[:timestamp] %>"><%= change[:display_time] %></time>
|
42
|
+
<p class="gem-c-published-dates__change-note"><%= change[:note].strip %></p>
|
43
|
+
</li>
|
44
|
+
<% end %>
|
45
|
+
</ol>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
<% end %>
|
50
|
+
<% end %>
|
@@ -90,7 +90,6 @@
|
|
90
90
|
<%= tag.div t('components.radio.or'), class: "govuk-radios__divider" %>
|
91
91
|
<% else %>
|
92
92
|
<%
|
93
|
-
item_next = items[index + 1] unless index === items.size - 1
|
94
93
|
label_id = item[:id] ? item[:id] : "#{id_prefix}-#{index}"
|
95
94
|
label_hint_id = "label-hint-#{SecureRandom.hex(4)}" if item[:hint_text].present?
|
96
95
|
conditional_id = "conditional-#{SecureRandom.hex(4)}" if item[:conditional].present?
|
@@ -15,7 +15,6 @@
|
|
15
15
|
label_custom_class ||= nil
|
16
16
|
name ||= "q"
|
17
17
|
homepage ||= false
|
18
|
-
no_border ||= false
|
19
18
|
size ||= ""
|
20
19
|
value ||= ""
|
21
20
|
local_assigns[:margin_bottom] ||= 6
|
@@ -24,9 +23,7 @@
|
|
24
23
|
component_helper.add_data_attribute({ module: "gem-toggle-input-class-on-focus" })
|
25
24
|
component_helper.add_class("gem-c-search govuk-!-display-none-print")
|
26
25
|
component_helper.add_class("gem-c-search--large") if size == "large"
|
27
|
-
component_helper.add_class("gem-c-search--large-on-mobile") if size == "large-mobile"
|
28
26
|
component_helper.add_class("gem-c-search--homepage") if homepage
|
29
|
-
component_helper.add_class("gem-c-search--no-border") if no_border
|
30
27
|
component_helper.add_class("gem-c-search--on-govuk-blue") if local_assigns[:on_govuk_blue].eql?(true)
|
31
28
|
component_helper.add_class("gem-c-search--on-white") unless local_assigns[:on_govuk_blue].eql?(true)
|
32
29
|
component_helper.add_class("gem-c-search--separate-label") if local_assigns.include?(:inline_label) or local_assigns.include?(:label_size)
|
@@ -34,7 +31,7 @@
|
|
34
31
|
label_classes = []
|
35
32
|
if (shared_helper.valid_heading_size?(label_size))
|
36
33
|
label_classes << "govuk-label govuk-label--#{label_size}"
|
37
|
-
label_classes << "gem-c-search__label--white" if
|
34
|
+
label_classes << "gem-c-search__label--white" if homepage
|
38
35
|
else
|
39
36
|
label_classes << "gem-c-search__label"
|
40
37
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("summary-banner")
|
3
|
+
|
4
|
+
title ||= false
|
5
|
+
text ||= false
|
6
|
+
secondary_text ||= false
|
7
|
+
local_assigns[:margin_bottom] ||= 7
|
8
|
+
|
9
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
10
|
+
component_helper.add_class("gem-c-summary-banner")
|
11
|
+
component_helper.add_aria_attribute({ label: "Notice" })
|
12
|
+
component_helper.set_lang("en")
|
13
|
+
component_helper.add_data_attribute({ module: "ga4-link-tracker" })
|
14
|
+
component_helper.add_data_attribute({ ga4_track_links_only: "" })
|
15
|
+
component_helper.add_data_attribute({ ga4_link: { event_name: "navigation", type: "callout" } })
|
16
|
+
%>
|
17
|
+
<% if title.present? && text.present? %>
|
18
|
+
<%= tag.section(**component_helper.all_attributes) do %>
|
19
|
+
<h2 class="gem-c-summary-banner__title govuk-heading-m"><%= title %></h2>
|
20
|
+
<p class="gem-c-summary-banner__text">
|
21
|
+
<%= text %>
|
22
|
+
</p>
|
23
|
+
<% if secondary_text %>
|
24
|
+
<p class="gem-c-summary-banner__text"><%= secondary_text %></p>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: Back to top link
|
2
|
+
description: An anchor link intended to allow users to return to the top of the content.
|
3
|
+
shared_accessibility_criteria:
|
4
|
+
- link
|
5
|
+
uses_component_wrapper_helper: true
|
6
|
+
examples:
|
7
|
+
default:
|
8
|
+
data:
|
9
|
+
href: "#wrapper"
|
10
|
+
with_different_text:
|
11
|
+
description: By default, the component render with the text "Contents".
|
12
|
+
data:
|
13
|
+
href: "#wrapper"
|
14
|
+
text: "Back to top"
|
15
|
+
right_to_left:
|
16
|
+
data:
|
17
|
+
href: "#wrapper"
|
18
|
+
context:
|
19
|
+
right_to_left: true
|
@@ -0,0 +1,90 @@
|
|
1
|
+
name: Contents list with body
|
2
|
+
description: Combines contents-list and back-to-top components with block of body markup
|
3
|
+
body: |
|
4
|
+
Wraps the HTML/ERB block passed with a content list and back to top link.
|
5
|
+
|
6
|
+
Expects one argument:
|
7
|
+
|
8
|
+
* `contents` - The contents to build a contents list, if this item is empty the contents-list and back-to-top links are excluded but the block passed is still rendered.
|
9
|
+
|
10
|
+
accessibility_criteria: |
|
11
|
+
- The component must have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA.
|
12
|
+
- The component embeds contents-list and back-to-top-link components. Please see the relevant accessibility criteria:
|
13
|
+
|
14
|
+
* [back-to-top-link](/component-guide/back_to_top_link)
|
15
|
+
* [contents-list](/component-guide/contents_list)
|
16
|
+
shared_accessibility_criteria:
|
17
|
+
- link
|
18
|
+
uses_component_wrapper_helper: true
|
19
|
+
examples:
|
20
|
+
default:
|
21
|
+
data:
|
22
|
+
contents:
|
23
|
+
- href: "#reference-unless-undertakings-accepted"
|
24
|
+
text: Reference unless undertakings accepted
|
25
|
+
- href: "#notice-of-extension-of-the-preliminary-assessment-period"
|
26
|
+
text: Notice of extension of the preliminary assessment period
|
27
|
+
- href: "#invitation-to-comment-closes-13-november-2017"
|
28
|
+
text: "Invitation to comment: closes 13 November 2017"
|
29
|
+
- href: "#launch-of-merger-inquiry"
|
30
|
+
text: Launch of merger inquiry
|
31
|
+
block: |
|
32
|
+
<div class="govuk-govspeak direction-ltr">
|
33
|
+
<h2 id="statutory-timetable">Statutory timetable</h2>
|
34
|
+
<table>
|
35
|
+
<thead>
|
36
|
+
<tr>
|
37
|
+
<th>Phase 1 date</th>
|
38
|
+
<th>Action</th>
|
39
|
+
</tr>
|
40
|
+
</thead>
|
41
|
+
<tbody>
|
42
|
+
<tr>
|
43
|
+
<td>3 January 2018</td>
|
44
|
+
<td>Decision announced</td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td>30 October to 13 November 2017</td>
|
48
|
+
<td>Invitation to comment</td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td>27 October 2017</td>
|
52
|
+
<td>Launch of merger inquiry</td>
|
53
|
+
</tr>
|
54
|
+
</tbody>
|
55
|
+
</table>
|
56
|
+
|
57
|
+
<h2 id="phase-1">Phase 1</h2>
|
58
|
+
|
59
|
+
<h3 id="reference-unless-undertakings-accepted">Reference unless undertakings accepted</h3>
|
60
|
+
|
61
|
+
<p>3 January 2018: The CMA has decided, on the information currently available to it, that it is or may be the case that this merger may be expected to result in a substantial lessening of competition within a market or markets in the United Kingdom. This merger will be referred for a phase 2 investigation unless the parties offer acceptable undertakings to address these competition concerns. The full text of the decision will be available shortly.</p>
|
62
|
+
<ul>
|
63
|
+
<li>Press release: <a href="https://www.gov.uk/government/news/shoppers-could-face-higher-prices-due-to-soft-drink-merger">Shoppers could face higher prices due to soft drink merger</a> (3.1.18)</li>
|
64
|
+
</ul>
|
65
|
+
<h3 id="notice-of-extension-of-the-preliminary-assessment-period">Notice of extension of the preliminary assessment period</h3>
|
66
|
+
<ul>
|
67
|
+
<li>
|
68
|
+
<span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/5a311ebfe5274a4936ee7776/refresco-notice-of-termination-of-extension.pdf">Notice of termination of extension (Refresco) </a></span> (13.12.17)</li>
|
69
|
+
<li>
|
70
|
+
<span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/5a26693240f0b659d1fca8d0/refresco-extension-notice.pdf">Notice of extension (Refresco) </a></span> (5.12.17)</li>
|
71
|
+
</ul>
|
72
|
+
<h3 id="invitation-to-comment-closes-13-november-2017">Invitation to comment: closes 13 November 2017</h3>
|
73
|
+
<p>30 October 2017: The Competition and Markets Authority (CMA) is considering whether it is or may be the case that this transaction, if carried into effect, will result in the creation of a relevant merger situation under the merger provisions of the Enterprise Act 2002 and, if so, whether the creation of that situation may be expected to result in a substantial lessening of competition within any market or markets in the United Kingdom for goods or services.</p>
|
74
|
+
<h3 id="launch-of-merger-inquiry">Launch of merger inquiry</h3>
|
75
|
+
<p>27 October 2017: The CMA announced the launch of its merger inquiry by notice to the parties.</p>
|
76
|
+
<ul>
|
77
|
+
<li>
|
78
|
+
<span class="attachment-inline"><a href="https://assets.publishing.service.gov.uk/media/59f6f28d40f0b66bbc806ed1/notice_of_commencement_of_initial_period.pdf">Commencement of initial period notice</a></span> (30.10.17)</li>
|
79
|
+
</ul>
|
80
|
+
<h3 id="contact">Contact</h3>
|
81
|
+
<p>Please send written representations about any competition issues to:</p>
|
82
|
+
<div class="address"><div class="adr org fn"><p>
|
83
|
+
<br>Competition and Markets Authority
|
84
|
+
<br>Victoria House
|
85
|
+
<br>Southampton Row
|
86
|
+
<br>London
|
87
|
+
<br>WC1B 4AD
|
88
|
+
<br>
|
89
|
+
</p></div></div>
|
90
|
+
</div>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
name: Figure
|
2
|
+
description: A figure containing an image that never exceeds the component’s width
|
3
|
+
body: |
|
4
|
+
A figure should be used for images that are referenced within a page, but which can be moved around without affecting the flow of the page [(see guidance here)](https://developer.mozilla.org/en/docs/Web/HTML/Element/figure)
|
5
|
+
|
6
|
+
Examples:
|
7
|
+
|
8
|
+
- [Case Study containing an image](https://www.gov.uk/government/case-studies/2013-elections-in-swaziland)
|
9
|
+
accessibility_criteria: |
|
10
|
+
The figure must:
|
11
|
+
|
12
|
+
- provide an informative text description, as alt text or caption
|
13
|
+
|
14
|
+
uses_component_wrapper_helper: true
|
15
|
+
examples:
|
16
|
+
default:
|
17
|
+
data:
|
18
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
|
19
|
+
figure_with_alt_text:
|
20
|
+
data:
|
21
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
|
22
|
+
alt: 'An image of the lords chamber'
|
23
|
+
figure_with_caption:
|
24
|
+
data:
|
25
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
|
26
|
+
alt: 'An image of the lords chamber'
|
27
|
+
caption: 'The Lords Chamber'
|
28
|
+
right_to_left_with_caption:
|
29
|
+
data:
|
30
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/image_data/file/31637/s300_Visas_-_Website.jpg'
|
31
|
+
alt: 'تأشيرات'
|
32
|
+
caption: 'تأشيرات'
|
33
|
+
context:
|
34
|
+
right_to_left: true
|
35
|
+
figure_with_credit:
|
36
|
+
data:
|
37
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
|
38
|
+
credit: Wallis Crankled
|
39
|
+
figure_with_caption_and_credit:
|
40
|
+
data:
|
41
|
+
src: 'https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg'
|
42
|
+
caption: The Lords Chamber
|
43
|
+
credit: Wallis Crankled
|
@@ -775,13 +775,16 @@ examples:
|
|
775
775
|
<li>three</li>
|
776
776
|
</ul>
|
777
777
|
legislative_lists:
|
778
|
+
description: Example taken from [GOV.UK Immigration rules](https://www.gov.uk/guidance/immigration-rules/immigration-rules-introduction)
|
778
779
|
data:
|
779
780
|
block: |
|
780
|
-
<h2>ordered list:</h2>
|
781
781
|
<ol class="legislative-list">
|
782
|
-
<li>
|
783
|
-
|
784
|
-
|
782
|
+
<li>6.2. In these rules:
|
783
|
+
<ol>
|
784
|
+
<li>(a) references to primary and secondary legislation refers to that legislation as amended from time to time; and</li>
|
785
|
+
<li>(b) unless the contrary intention appears, the following definitions apply:</li>
|
786
|
+
</ol>
|
787
|
+
</li>
|
785
788
|
</ol>
|
786
789
|
nested_lists:
|
787
790
|
data:
|
@@ -63,9 +63,6 @@ examples:
|
|
63
63
|
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)
|
64
64
|
data:
|
65
65
|
remove_bottom_border: true
|
66
|
-
with_search_bar:
|
67
|
-
data:
|
68
|
-
search: true
|
69
66
|
with_custom_logo_link:
|
70
67
|
description: The header logo links to root by default. This option allows us to override that in certain instances.
|
71
68
|
data:
|
@@ -0,0 +1,43 @@
|
|
1
|
+
name: Published dates
|
2
|
+
description: Dates to reflect when content was published and updated
|
3
|
+
accessibility_criteria: |
|
4
|
+
The published dates component must:
|
5
|
+
|
6
|
+
- indicate to users that the full history section can be expanded and collapsed
|
7
|
+
- inform the user of the state of the full history section (expanded or collapsed)
|
8
|
+
- be usable with a keyboard
|
9
|
+
shared_accessibility_criteria:
|
10
|
+
- link
|
11
|
+
uses_component_wrapper_helper: true
|
12
|
+
examples:
|
13
|
+
default:
|
14
|
+
data:
|
15
|
+
published: 1st January 1990
|
16
|
+
just_last_updated_date:
|
17
|
+
data:
|
18
|
+
last_updated: 20th October 2016
|
19
|
+
with_last_updated_date:
|
20
|
+
data:
|
21
|
+
published: 1st January 1990
|
22
|
+
last_updated: 20th October 2016
|
23
|
+
link_to_page_history:
|
24
|
+
description: This will set up a link to a '#history' anchor on the page. This can be used to link to another instance of this component, see [Display Page History example](/component-guide/published_dates/display_page_history)
|
25
|
+
data:
|
26
|
+
published: 1st January 1990
|
27
|
+
last_updated: 20th October 2016
|
28
|
+
link_to_history: true
|
29
|
+
display_page_history:
|
30
|
+
description: This will set up an expandable section on the page, with a top border, to let users toggle the display of the page history.
|
31
|
+
data:
|
32
|
+
published: 1st January 1990
|
33
|
+
last_updated: 20th October 2016
|
34
|
+
history:
|
35
|
+
- display_time: 1st January 1990
|
36
|
+
note: First published
|
37
|
+
timestamp: 1990-01-01T15:42:37.000+00:00
|
38
|
+
- display_time: 20th July 1995
|
39
|
+
note: Updated to include information for 1994
|
40
|
+
timestamp: 1995-07-20T15:42:37.000+00:00
|
41
|
+
- display_time: 14th October 2000
|
42
|
+
note: Updated information on pupil premium reviews and what information schools need to publish on their websites.
|
43
|
+
timestamp: 2000-10-14T15:42:37.000+00:00
|
@@ -22,12 +22,6 @@ examples:
|
|
22
22
|
stop_the_label_appearing_inline:
|
23
23
|
data:
|
24
24
|
inline_label: false
|
25
|
-
no_border:
|
26
|
-
description: Sometimes we don't need the grey border surrounding the input field, such as when the component is used on a black background
|
27
|
-
data:
|
28
|
-
no_border: true
|
29
|
-
context:
|
30
|
-
black_background: true
|
31
25
|
for_use_on_govuk_blue_background:
|
32
26
|
data:
|
33
27
|
on_govuk_blue: true
|
@@ -54,9 +48,6 @@ examples:
|
|
54
48
|
large_version:
|
55
49
|
data:
|
56
50
|
size: "large"
|
57
|
-
large_version_on_mobile_only:
|
58
|
-
data:
|
59
|
-
size: "large-mobile"
|
60
51
|
change_field_name:
|
61
52
|
description: To be used if you need to change the default name 'q'
|
62
53
|
data:
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Summary banner
|
2
|
+
description: A page banner that is currently used on consultations and calls for evidence to display a summary or other important information.
|
3
|
+
body: |
|
4
|
+
This component requires title and text attribute values passed to it, otherwise it will not render. This reflects how the component is currently used. If the component needed to become more flexible and work for other use cases, please raise an issue or a pull request in the gem.
|
5
|
+
|
6
|
+
Real world examples:
|
7
|
+
|
8
|
+
- [consultation](https://www.gov.uk/government/consultations/environmental-assessment-levels-for-the-amine-based-carbon-capture-process)
|
9
|
+
- [call for evidence](https://www.gov.uk/government/calls-for-evidence/financial-services-growth-and-competitiveness-strategy)
|
10
|
+
accessibility_criteria: |
|
11
|
+
The banner must:
|
12
|
+
|
13
|
+
- be visually distinct from other content on the page
|
14
|
+
- have an accessible name that describes the banner as a notice
|
15
|
+
- have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
|
16
|
+
uses_component_wrapper_helper: true
|
17
|
+
examples:
|
18
|
+
default:
|
19
|
+
data:
|
20
|
+
title: Summary
|
21
|
+
text: This call for evidence will inform the development of the financial services sector plan, a key part of the government’s modern industrial strategy.
|
22
|
+
with_secondary_text:
|
23
|
+
description: This example shows how the consultation and call for evidence templates use the secondary text to display dates.
|
24
|
+
data:
|
25
|
+
title: Summary
|
26
|
+
text: This call for evidence will inform the development of the financial services sector plan, a key part of the government’s modern industrial strategy.
|
27
|
+
secondary_text: This consultation ran from<br><strong class="consultation-date"><time datetime="2024-11-05T11:00:00.000+00:00">11am on 5 November 2024</time> to
|
28
|
+
<time datetime="2024-12-03T17:00:00.000+00:00">5pm on 3 December 2024</time></strong>
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%
|
2
|
-
absolute_links_helper = GovukPublishingComponents::Presenters::AbsoluteLinksHelper.new()
|
3
|
-
%>
|
4
|
-
|
5
1
|
<div id="page-is-not-useful" class="gem-c-feedback__form gem-c-feedback__form--email gem-c-feedback__js-show js-feedback-form">
|
6
2
|
<div class="govuk-grid-row">
|
7
3
|
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
|