govuk_publishing_components 24.11.1 → 24.13.3
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/scroll-tracker.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +50 -31
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +0 -35
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_show-password.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +8 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +6 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -0
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +10 -3
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +16 -6
- data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +14 -14
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +15 -2
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +3 -8
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +11 -2
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +13 -13
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +11 -7
- data/app/views/govuk_publishing_components/components/_search.html.erb +5 -2
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +4 -4
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +9 -9
- data/app/views/govuk_publishing_components/components/_success_alert.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +9 -4
- data/app/views/govuk_publishing_components/components/docs/government_navigation.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +18 -15
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +5 -5
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +1 -1
- data/config/locales/ar.yml +33 -0
- data/config/locales/az.yml +33 -0
- data/config/locales/be.yml +33 -0
- data/config/locales/bg.yml +33 -0
- data/config/locales/bn.yml +33 -0
- data/config/locales/cs.yml +33 -0
- data/config/locales/cy.yml +34 -1
- data/config/locales/da.yml +33 -0
- data/config/locales/de.yml +33 -0
- data/config/locales/dr.yml +33 -0
- data/config/locales/el.yml +33 -0
- data/config/locales/en.yml +45 -9
- data/config/locales/es-419.yml +33 -0
- data/config/locales/es.yml +33 -0
- data/config/locales/et.yml +33 -0
- data/config/locales/fa.yml +33 -0
- data/config/locales/fi.yml +33 -0
- data/config/locales/fr.yml +33 -0
- data/config/locales/gd.yml +33 -0
- data/config/locales/gu.yml +33 -0
- data/config/locales/he.yml +33 -0
- data/config/locales/hi.yml +33 -0
- data/config/locales/hr.yml +33 -0
- data/config/locales/hu.yml +33 -0
- data/config/locales/hy.yml +33 -0
- data/config/locales/id.yml +33 -0
- data/config/locales/is.yml +33 -0
- data/config/locales/it.yml +33 -0
- data/config/locales/ja.yml +33 -0
- data/config/locales/ka.yml +33 -0
- data/config/locales/kk.yml +33 -0
- data/config/locales/ko.yml +33 -0
- data/config/locales/lt.yml +33 -0
- data/config/locales/lv.yml +33 -0
- data/config/locales/ms.yml +33 -0
- data/config/locales/mt.yml +33 -0
- data/config/locales/nl.yml +33 -0
- data/config/locales/no.yml +33 -0
- data/config/locales/pa-pk.yml +33 -0
- data/config/locales/pa.yml +33 -0
- data/config/locales/pl.yml +33 -0
- data/config/locales/ps.yml +33 -0
- data/config/locales/pt.yml +33 -0
- data/config/locales/ro.yml +33 -0
- data/config/locales/ru.yml +33 -0
- data/config/locales/si.yml +33 -0
- data/config/locales/sk.yml +33 -0
- data/config/locales/sl.yml +33 -0
- data/config/locales/so.yml +33 -0
- data/config/locales/sq.yml +33 -0
- data/config/locales/sr.yml +33 -0
- data/config/locales/sv.yml +33 -0
- data/config/locales/sw.yml +33 -0
- data/config/locales/ta.yml +33 -0
- data/config/locales/th.yml +33 -0
- data/config/locales/tk.yml +33 -0
- data/config/locales/tr.yml +33 -0
- data/config/locales/uk.yml +33 -0
- data/config/locales/ur.yml +33 -0
- data/config/locales/uz.yml +33 -0
- data/config/locales/vi.yml +33 -0
- data/config/locales/zh-hk.yml +33 -0
- data/config/locales/zh-tw.yml +33 -0
- data/config/locales/zh.yml +33 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +33 -0
- data/lib/govuk_publishing_components/presenters/content_item.rb +1 -3
- data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +0 -3
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +8 -7
@@ -32,6 +32,7 @@
|
|
32
32
|
|
33
33
|
link_classes = %w(govuk-link gem-c-action-link__link)
|
34
34
|
link_classes << shared_helper.classes if classes
|
35
|
+
link_classes << "govuk-link--inverse" if light_text
|
35
36
|
%>
|
36
37
|
<% if text.present? %>
|
37
38
|
<div class="<%= css_classes.join(' ') %>">
|
@@ -55,7 +56,7 @@
|
|
55
56
|
<span class="gem-c-action-link__subtext-wrapper">
|
56
57
|
<% if subtext_href %>
|
57
58
|
<%= content_tag(:span, subtext, class: "gem-c-action-link__subtext") do %>
|
58
|
-
<%= link_to subtext, subtext_href, class:
|
59
|
+
<%= link_to subtext, subtext_href, class: link_classes, data: data %>
|
59
60
|
<% end %>
|
60
61
|
<% else %>
|
61
62
|
<%= content_tag(:span, subtext, class: "gem-c-action-link__subtext") %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
if attachment.number_of_pages
|
29
29
|
attributes << tag.span(
|
30
|
-
|
30
|
+
t("components.attachment.page", count: attachment.number_of_pages),
|
31
31
|
class: "gem-c-attachment__attribute",
|
32
32
|
)
|
33
33
|
end
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<% end %>
|
60
60
|
|
61
61
|
<% if attachment.reference.present? %>
|
62
|
-
<%= tag.p "
|
62
|
+
<%= tag.p t("components.attachment.reference", reference: attachment.reference), class: "gem-c-attachment__metadata gem-c-attachment__metadata--compact" %>
|
63
63
|
<% end %>
|
64
64
|
|
65
65
|
<% if attachment.unnumbered_reference.present? %>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
<% end %>
|
72
72
|
|
73
73
|
<% if attachment.is_official_document && !hide_order_copy_link %>
|
74
|
-
<%= tag.p link_to("
|
74
|
+
<%= tag.p link_to(t("components.attachment.order_a_copy"), "https://www.gov.uk/guidance/how-to-buy-printed-copies-of-official-documents", class: "govuk-link govuk-link--no-visited-state", target: "_blank"),
|
75
75
|
class: "gem-c-attachment__metadata" %>
|
76
76
|
<% end %>
|
77
77
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%= render "govuk_publishing_components/components/textarea", { id: id, character_count: true }.merge(textarea.symbolize_keys) %>
|
19
19
|
|
20
20
|
<span id="<%= id %>-info" class="govuk-hint govuk-character-count__message" aria-live="polite">
|
21
|
-
|
21
|
+
<%= t("components.character_count", number: maxlength || maxwords, type: maxwords ? t("components.character_count.type.words") : t("components.character_count.type.characters")) %>
|
22
22
|
</span>
|
23
23
|
<% end %>
|
24
24
|
<% end %>
|
@@ -1,12 +1,19 @@
|
|
1
1
|
<%-
|
2
2
|
cl_helper = GovukPublishingComponents::Presenters::ContentsListHelper.new(local_assigns)
|
3
|
+
underline_links ||= false
|
3
4
|
aria_label ||= t("components.contents_list.contents")
|
4
5
|
format_numbers ||= false
|
5
6
|
brand ||= false
|
6
7
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
7
8
|
title_fallback = t("components.contents_list.contents", locale: I18n.locale, fallback: false, default: "en")
|
8
|
-
classes =
|
9
|
+
classes = %w[gem-c-contents-list]
|
9
10
|
classes << brand_helper.brand_class
|
11
|
+
link_classes = %w[
|
12
|
+
gem-c-contents-list__link
|
13
|
+
govuk-link
|
14
|
+
]
|
15
|
+
link_classes << brand_helper.color_class
|
16
|
+
link_classes << "govuk-link--no-underline" unless underline_links
|
10
17
|
-%>
|
11
18
|
<% if cl_helper.contents.any? %>
|
12
19
|
<%= content_tag(
|
@@ -31,7 +38,7 @@
|
|
31
38
|
<li class="<%= cl_helper.list_item_classes(contents_item, false) %>" <%= "aria-current=true" if contents_item[:active] %>>
|
32
39
|
<% link_text = format_numbers ? cl_helper.wrap_numbers_with_spans(contents_item[:text]) : contents_item[:text] %>
|
33
40
|
<%= link_to_if !contents_item[:active], link_text, contents_item[:href],
|
34
|
-
class:
|
41
|
+
class: link_classes,
|
35
42
|
data: {
|
36
43
|
track_category: 'contentsClicked',
|
37
44
|
track_action: "content_item #{position}",
|
@@ -47,7 +54,7 @@
|
|
47
54
|
<% contents_item[:items].each.with_index(1) do |nested_contents_item, nested_position| %>
|
48
55
|
<li class="<%= cl_helper.list_item_classes(nested_contents_item, true) %>" <%= "aria-current=true" if nested_contents_item[:active] %>>
|
49
56
|
<%= link_to_if !nested_contents_item[:active], nested_contents_item[:text], nested_contents_item[:href],
|
50
|
-
class:
|
57
|
+
class: link_classes,
|
51
58
|
data: {
|
52
59
|
track_category: 'contentsClicked',
|
53
60
|
track_action: "nested_content_item #{position}:#{nested_position}",
|
@@ -18,13 +18,13 @@
|
|
18
18
|
<% if navigation.content_tagged_to_other_step_by_steps? %>
|
19
19
|
<%# Rendering step by step related items because there are a few but not too many of them %>
|
20
20
|
<%= render 'govuk_publishing_components/components/step_by_step_nav_related', {
|
21
|
-
pretitle: "
|
21
|
+
pretitle: t("components.contextual_sidebar.pretitle"),
|
22
22
|
links: navigation.step_nav_helper.also_part_of_step_nav,
|
23
23
|
always_display_as_list: true
|
24
24
|
} %>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<% if navigation.show_brexit_cta? || navigation.show_brexit_related_links? %>
|
28
|
-
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
|
28
|
+
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
|
29
29
|
<% end %>
|
30
30
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
id ||= 'global-cookie-message'
|
3
|
-
title ||= "
|
4
|
-
text ||=
|
3
|
+
title ||= t("components.cookie_banner.title")
|
4
|
+
text ||= t("components.cookie_banner.text")
|
5
5
|
if text.kind_of?(Array)
|
6
6
|
newtext = ""
|
7
7
|
text.each do |t|
|
@@ -14,7 +14,17 @@
|
|
14
14
|
text = raw(text)
|
15
15
|
|
16
16
|
cookie_preferences_href ||= "/help/cookies"
|
17
|
-
confirmation_message ||= raw("
|
17
|
+
confirmation_message ||= raw(t("components.cookie_banner.confirmation_message",
|
18
|
+
link: link_to(
|
19
|
+
t("components.cookie_banner.confirmation_message_link"),
|
20
|
+
cookie_preferences_href,
|
21
|
+
class: "govuk-link",
|
22
|
+
data: {
|
23
|
+
module: "gem-track-click",
|
24
|
+
'track-category': "cookieBanner",
|
25
|
+
'track-action': "Cookie banner settings clicked from confirmation",
|
26
|
+
},
|
27
|
+
)))
|
18
28
|
services_cookies ||= nil
|
19
29
|
css_classes = %w(gem-c-cookie-banner govuk-clearfix)
|
20
30
|
css_classes << "gem-c-cookie-banner--services" if services_cookies
|
@@ -50,7 +60,7 @@
|
|
50
60
|
<div class="govuk-button-group">
|
51
61
|
<%= render "govuk_publishing_components/components/button", {
|
52
62
|
name: "cookies",
|
53
|
-
text: "
|
63
|
+
text: t("components.cookie_banner.buttons.accept_cookies"),
|
54
64
|
data_attributes: {
|
55
65
|
module: "gem-track-click",
|
56
66
|
"accept-cookies": "true",
|
@@ -61,7 +71,7 @@
|
|
61
71
|
} %>
|
62
72
|
<%= render "govuk_publishing_components/components/button", {
|
63
73
|
name: "cookies",
|
64
|
-
text: "
|
74
|
+
text: t("components.cookie_banner.buttons.reject_cookies"),
|
65
75
|
data_attributes: {
|
66
76
|
module: "gem-track-click",
|
67
77
|
"reject-cookies": "true",
|
@@ -77,7 +87,7 @@
|
|
77
87
|
<div class="gem-c-cookie-banner__confirmation govuk-width-container" tabindex="-1" hidden>
|
78
88
|
<p class="gem-c-cookie-banner__confirmation-message" role="alert"><%= confirmation_message %></p>
|
79
89
|
<div class="govuk-button-group">
|
80
|
-
<button class="gem-c-cookie-banner__hide-button govuk-button" data-hide-cookie-banner="true" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Hide cookie banner"
|
90
|
+
<button class="gem-c-cookie-banner__hide-button govuk-button" data-hide-cookie-banner="true" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Hide cookie banner"><%= t("components.cookie_banner.hide") %></button>
|
81
91
|
</div>
|
82
92
|
</div>
|
83
93
|
</div>
|
@@ -5,38 +5,38 @@
|
|
5
5
|
<nav id="proposition-menu" class="no-proposition-name gem-c-government-navigation" aria-label="Departments and policy navigation">
|
6
6
|
<ul id="proposition-links">
|
7
7
|
<li>
|
8
|
-
<a class="<%= 'active' if active == 'departments' %>" href="/government/organisations">
|
9
|
-
<%= t("components.government_navigation.departments"
|
8
|
+
<a class="<%= 'active' if active == 'departments' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/government/organisations">
|
9
|
+
<%= t("components.government_navigation.departments") %>
|
10
10
|
</a>
|
11
11
|
</li>
|
12
12
|
<li>
|
13
|
-
<a class="<%= 'active' if active == 'worldwide' %>" href="/government/world">
|
14
|
-
<%= t("components.government_navigation.worldwide"
|
13
|
+
<a class="<%= 'active' if active == 'worldwide' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/government/world">
|
14
|
+
<%= t("components.government_navigation.worldwide") %>
|
15
15
|
</a>
|
16
16
|
</li>
|
17
17
|
<li>
|
18
|
-
<a class="<%= 'active' if active == 'how-government-works' %>" href="/government/how-government-works">
|
19
|
-
<%= t("components.government_navigation.how-government-works"
|
18
|
+
<a class="<%= 'active' if active == 'how-government-works' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/government/how-government-works">
|
19
|
+
<%= t("components.government_navigation.how-government-works") %>
|
20
20
|
</a>
|
21
21
|
</li>
|
22
22
|
<li>
|
23
|
-
<a class="<%= 'active' if active == 'get-involved' %>" href="/government/get-involved">
|
24
|
-
<%= t("components.government_navigation.get-involved"
|
23
|
+
<a class="<%= 'active' if active == 'get-involved' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/government/get-involved">
|
24
|
+
<%= t("components.government_navigation.get-involved") %>
|
25
25
|
</a>
|
26
26
|
</li>
|
27
27
|
<li class="clear-child">
|
28
|
-
<a class="<%= 'active' if active == 'consultations' %>" href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">
|
29
|
-
<%= t("components.government_navigation.consultations"
|
28
|
+
<a class="<%= 'active' if active == 'consultations' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">
|
29
|
+
<%= t("components.government_navigation.consultations") %>
|
30
30
|
</a>
|
31
31
|
</li>
|
32
32
|
<li>
|
33
|
-
<a class="<%= 'active' if active == 'statistics' %>" href="/search/research-and-statistics">
|
34
|
-
<%= t("components.government_navigation.statistics"
|
33
|
+
<a class="<%= 'active' if active == 'statistics' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/search/research-and-statistics">
|
34
|
+
<%= t("components.government_navigation.statistics") %>
|
35
35
|
</a>
|
36
36
|
</li>
|
37
37
|
<li>
|
38
|
-
<a class="<%= 'active' if active == 'announcements' %>" href="/news-and-communications">
|
39
|
-
<%= t("components.government_navigation.news_and_communications"
|
38
|
+
<a class="<%= 'active' if active == 'announcements' %> govuk-link govuk-link--no-underline govuk-link--inverse" href="/news-and-communications">
|
39
|
+
<%= t("components.government_navigation.news_and_communications") %>
|
40
40
|
</a>
|
41
41
|
</li>
|
42
42
|
</ul>
|
@@ -10,6 +10,19 @@
|
|
10
10
|
font_size ||= card_helper.large ? 'm' : 's'
|
11
11
|
heading_class = %w[gem-c-image-card__title]
|
12
12
|
heading_class << shared_helper.get_heading_size(font_size, 's')
|
13
|
+
|
14
|
+
heading_link_classes = %w[
|
15
|
+
gem-c-image-card__title-link
|
16
|
+
govuk-link
|
17
|
+
govuk-link--no-underline
|
18
|
+
]
|
19
|
+
heading_link_classes << brand_helper.color_class
|
20
|
+
extra_link_classes = %w[
|
21
|
+
gem-c-image-card__list-item-link
|
22
|
+
govuk-link
|
23
|
+
]
|
24
|
+
extra_link_classes << brand_helper.color_class
|
25
|
+
|
13
26
|
%>
|
14
27
|
<% if card_helper.href || card_helper.extra_links.any? %>
|
15
28
|
<div class="<%= classes %> <%= brand_helper.brand_class %>"
|
@@ -21,7 +34,7 @@
|
|
21
34
|
<%= content_tag(shared_helper.get_heading_level, class: heading_class) do %>
|
22
35
|
<% if card_helper.href %>
|
23
36
|
<%= link_to card_helper.heading_text, card_helper.href,
|
24
|
-
class:
|
37
|
+
class: heading_link_classes,
|
25
38
|
data: card_helper.href_data_attributes
|
26
39
|
%>
|
27
40
|
<% else %>
|
@@ -37,7 +50,7 @@
|
|
37
50
|
<% card_helper.extra_links.each do |link| %>
|
38
51
|
<li class="gem-c-image-card__list-item">
|
39
52
|
<%= link_to link[:text], link[:href],
|
40
|
-
class:
|
53
|
+
class: extra_link_classes,
|
41
54
|
data: link[:data_attributes]
|
42
55
|
%>
|
43
56
|
</li>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<div class="govuk-footer__meta">
|
60
60
|
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
61
61
|
<% if meta.any? %>
|
62
|
-
<h2 class="govuk-visually-hidden"
|
62
|
+
<h2 class="govuk-visually-hidden"><%= t("components.layout_footer.support_links") %></h2>
|
63
63
|
<ul class="govuk-footer__inline-list govuk-!-display-none-print">
|
64
64
|
<% meta[:items].each do |item| %>
|
65
65
|
<li class="govuk-footer__inline-list-item">
|
@@ -79,16 +79,11 @@
|
|
79
79
|
/>
|
80
80
|
</svg>
|
81
81
|
<span class="govuk-footer__licence-description">
|
82
|
-
|
83
|
-
<a
|
84
|
-
class="govuk-footer__link"
|
85
|
-
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
|
86
|
-
rel="license"
|
87
|
-
>Open Government Licence v3.0</a>, except where otherwise stated
|
82
|
+
<%= t("components.layout_footer.licence_html") %>
|
88
83
|
</span>
|
89
84
|
</div>
|
90
85
|
<div class="govuk-footer__meta-item">
|
91
|
-
|
86
|
+
<%= t("components.layout_footer.copyright_html") %>
|
92
87
|
</div>
|
93
88
|
</div>
|
94
89
|
</div>
|
@@ -4,6 +4,7 @@
|
|
4
4
|
global_bar ||= nil
|
5
5
|
html_lang ||= "en"
|
6
6
|
layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
|
7
|
+
logo_link ||= "/"
|
7
8
|
navigation_items ||= []
|
8
9
|
omit_header ||= false
|
9
10
|
show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
|
@@ -71,6 +72,7 @@
|
|
71
72
|
<% unless omit_header %>
|
72
73
|
<%= render "govuk_publishing_components/components/layout_header", {
|
73
74
|
search: show_search,
|
75
|
+
logo_link: logo_link,
|
74
76
|
navigation_items: navigation_items,
|
75
77
|
|
76
78
|
# The (blue) bottom border needs to be underneath the emergency banner -
|
@@ -8,6 +8,7 @@
|
|
8
8
|
search ||= false
|
9
9
|
search_left ||= false
|
10
10
|
width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
|
11
|
+
logo_link ||= "/"
|
11
12
|
|
12
13
|
header_classes = %w[gem-c-layout-header govuk-header]
|
13
14
|
header_classes << "gem-c-layout-header--#{environment}" if environment
|
@@ -20,7 +21,11 @@
|
|
20
21
|
<% if search_left %>
|
21
22
|
<div class="govuk-grid-row">
|
22
23
|
<div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
|
23
|
-
<%= render "govuk_publishing_components/components/layout_header/header_logo",
|
24
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", {
|
25
|
+
environment: environment,
|
26
|
+
logo_link: logo_link,
|
27
|
+
product_name: product_name,
|
28
|
+
} %>
|
24
29
|
</div>
|
25
30
|
</div>
|
26
31
|
<div class="govuk-grid-row">
|
@@ -36,7 +41,11 @@
|
|
36
41
|
<% else %>
|
37
42
|
<div class="govuk-grid-row">
|
38
43
|
<div class="gem-c-layout-header__logo govuk-grid-column-two-thirds">
|
39
|
-
<%= render "govuk_publishing_components/components/layout_header/header_logo",
|
44
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", {
|
45
|
+
environment: environment,
|
46
|
+
logo_link: logo_link,
|
47
|
+
product_name: product_name,
|
48
|
+
} %>
|
40
49
|
</div>
|
41
50
|
<% if navigation_items.any? %>
|
42
51
|
<div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
|
@@ -18,27 +18,27 @@
|
|
18
18
|
<%= content_tag :div, class: classes, data: { module: "gem-toggle" } do %>
|
19
19
|
<dl data-module="gem-track-click">
|
20
20
|
<% if from.any? %>
|
21
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.from"
|
21
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.from") %>:</dt>
|
22
22
|
<dd class="gem-c-metadata__definition">
|
23
23
|
<%= render 'govuk_publishing_components/components/metadata/sentence', items: from, toggle_id: "from-#{SecureRandom.hex(4)}" %>
|
24
24
|
</dd>
|
25
25
|
<% end %>
|
26
26
|
<% if part_of.any? %>
|
27
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.part_of"
|
27
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.part_of") %>:</dt>
|
28
28
|
<dd class="gem-c-metadata__definition">
|
29
29
|
<%= render 'govuk_publishing_components/components/metadata/sentence', items: part_of, toggle_id: "part-of-#{SecureRandom.hex(4)}" %>
|
30
30
|
</dd>
|
31
31
|
<% end %>
|
32
32
|
<% if local_assigns.include?(:history) %>
|
33
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.history"
|
33
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.history") %>:</dt>
|
34
34
|
<dd class="gem-c-metadata__definition"><%= history %></dd>
|
35
35
|
<% end %>
|
36
36
|
<% if local_assigns.include?(:first_published) && first_published %>
|
37
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.published"
|
37
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.published") %></dt>
|
38
38
|
<dd class="gem-c-metadata__definition"><%= first_published %></dd>
|
39
39
|
<% end %>
|
40
40
|
<% if local_assigns.include?(:last_updated) && last_updated %>
|
41
|
-
<dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated"
|
41
|
+
<dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated") %></dt>
|
42
42
|
<dd class="gem-c-metadata__definition">
|
43
43
|
<%= last_updated %>
|
44
44
|
<% if local_assigns.include?(:see_updates_link) %>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
data-track-category="content-history"
|
47
47
|
data-track-action="see-all-updates-link-clicked"
|
48
48
|
data-track-label="history">
|
49
|
-
<%= t("components.metadata.see_all_updates"
|
49
|
+
<%= t("components.metadata.see_all_updates") %>
|
50
50
|
</a>
|
51
51
|
<% end %>
|
52
52
|
</dd>
|
@@ -18,6 +18,6 @@
|
|
18
18
|
</svg>
|
19
19
|
<% end %>
|
20
20
|
<%= tag.div yield, class: "gem-c-modal-dialogue__content" %>
|
21
|
-
<%= tag.button "×", class: "gem-c-modal-dialogue__close-button", aria: { label: "
|
21
|
+
<%= tag.button "×", class: "gem-c-modal-dialogue__close-button", aria: { label: t("components.modal_dialogue.close_modal") } %>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
@@ -6,16 +6,13 @@
|
|
6
6
|
heading_level ||= false
|
7
7
|
inline ||= false
|
8
8
|
|
9
|
-
# Check if `heading_level` is
|
10
|
-
|
11
|
-
use_heading = heading_level.is_a?(Integer) ?
|
12
|
-
(heading_level >= 1 && heading_level <= 6) :
|
13
|
-
false
|
9
|
+
# Check if `heading_level` is an appropriate number:
|
10
|
+
use_heading = [*1..6].include?(heading_level)
|
14
11
|
|
15
|
-
# Set the wrapping element to be a heading or a `div
|
16
|
-
wrapping_element = use_heading ? "h#{heading_level}" : "div"
|
12
|
+
# Set the wrapping element to be a heading or a `div`:
|
13
|
+
wrapping_element = (use_heading ? "h#{heading_level}" : "div").to_sym
|
17
14
|
|
18
|
-
wrapper_classes = %w
|
15
|
+
wrapper_classes = %w[gem-c-organisation-logo]
|
19
16
|
wrapper_classes << brand_helper.brand_class
|
20
17
|
|
21
18
|
container_classes = [
|
@@ -24,10 +21,13 @@
|
|
24
21
|
]
|
25
22
|
container_classes << "gem-c-organisation-logo__container--inline" if inline
|
26
23
|
%>
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
|
25
|
+
<%= content_tag(wrapping_element, {
|
26
|
+
class: wrapper_classes,
|
27
|
+
data: {
|
28
|
+
module: ("gem-track-click" if organisation[:data_attributes])
|
29
|
+
}
|
30
|
+
}) do %>
|
31
31
|
<% if organisation[:url] %>
|
32
32
|
<%= link_to organisation[:url],
|
33
33
|
class: container_classes.join(" "),
|
@@ -39,4 +39,4 @@
|
|
39
39
|
<%= logo_helper.logo_content %>
|
40
40
|
</div>
|
41
41
|
<% end %>
|
42
|
-
|
42
|
+
<% end %>
|