govuk_publishing_components 21.60.3 → 21.63.2
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/components/checkboxes.js +102 -73
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +402 -340
- data/app/assets/javascripts/govuk_publishing_components/dependencies.js +0 -5
- data/app/assets/javascripts/govuk_publishing_components/ie.js +2 -0
- data/app/assets/javascripts/govuk_publishing_components/lib.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/toggle.js +126 -65
- data/app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js +4 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/json2.js +487 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/closest.js +23 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/polyfills/indexOf.js +9 -0
- data/app/assets/stylesheets/component_guide/application.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +3 -16
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +8 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +87 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +7 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +46 -0
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +8 -0
- data/app/models/govuk_publishing_components/component_example.rb +4 -0
- data/app/views/govuk_publishing_components/component_guide/component_doc/_component.html.erb +1 -0
- data/app/views/govuk_publishing_components/component_guide/example.html.erb +4 -1
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +18 -9
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +32 -21
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +76 -0
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +39 -51
- data/app/views/govuk_publishing_components/components/_panel.html.erb +13 -11
- data/app/views/govuk_publishing_components/components/_search.html.erb +14 -5
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +18 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +17 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +5 -1
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +29 -0
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +34 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +6 -0
- 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 +6 -6
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +8 -10
- data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +23 -0
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +17 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +9 -0
- data/config/initializers/assets.rb +8 -0
- data/config/locales/en.yml +18 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +5 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +1 -0
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +1 -1
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +380 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +0 -4
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +33 -33
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +14 -2
@@ -0,0 +1,76 @@
|
|
1
|
+
<%
|
2
|
+
title ||= "GOV.UK - The best place to find government services and information"
|
3
|
+
html_lang ||= "en"
|
4
|
+
full_width ||= false
|
5
|
+
omit_header ||= false
|
6
|
+
show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
|
7
|
+
layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
|
8
|
+
-%>
|
9
|
+
<!DOCTYPE html>
|
10
|
+
<!--[if lt IE 9]><html class="lte-ie8" lang="<%= html_lang %>"><![endif]-->
|
11
|
+
<!--[if gt IE 8]><!--><html lang="<%= html_lang %>"><!--<![endif]-->
|
12
|
+
<head>
|
13
|
+
<meta charset="utf-8" />
|
14
|
+
<title><%= title %></title>
|
15
|
+
|
16
|
+
<%= csrf_meta_tags %>
|
17
|
+
|
18
|
+
<%= stylesheet_link_tag "application", media: "all" %>
|
19
|
+
<%= stylesheet_link_tag "print", media: "print" %>
|
20
|
+
<!--[if lt IE 9]><%= javascript_include_tag "govuk_publishing_components/ie", integrity: true, crossorigin: "anonymous" %><![endif]-->
|
21
|
+
<link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon" />
|
22
|
+
<link rel="mask-icon" href="<%= asset_path 'govuk-mask-icon.svg' %>" color="#0b0c0c">
|
23
|
+
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path "govuk-apple-touch-icon-180x180.png" %>">
|
24
|
+
<link rel="apple-touch-icon" sizes="167x167" href="<%= asset_path "govuk-apple-touch-icon-167x167.png" %>">
|
25
|
+
<link rel="apple-touch-icon" sizes="152x152" href="<%= asset_path "govuk-apple-touch-icon-152x152.png" %>">
|
26
|
+
<link rel="apple-touch-icon" href="<%= asset_path "govuk-apple-touch-icon.png" %>">
|
27
|
+
|
28
|
+
<meta name="theme-color" content="#0b0c0c" />
|
29
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
30
|
+
<% # Ensure that older IE versions always render with the correct rendering engine %>
|
31
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
32
|
+
|
33
|
+
<% # The default og:image is added below :head so that scrapers see any custom metatags first, and this is just a fallback %>
|
34
|
+
<meta property="og:image" content="<%= asset_path "govuk-opengraph-image.png" %>">
|
35
|
+
|
36
|
+
<%= yield :head %>
|
37
|
+
</head>
|
38
|
+
<body class="gem-c-layout-for-public govuk-template__body">
|
39
|
+
<script>
|
40
|
+
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
|
41
|
+
</script>
|
42
|
+
<%= render "govuk_publishing_components/components/skip_link", {
|
43
|
+
href: "#content"
|
44
|
+
} %>
|
45
|
+
|
46
|
+
<%= render "govuk_publishing_components/components/cookie_banner" %>
|
47
|
+
|
48
|
+
<% unless omit_header %>
|
49
|
+
<%= render "govuk_publishing_components/components/layout_header", {
|
50
|
+
environment: "public",
|
51
|
+
search: show_search,
|
52
|
+
# layout-header will always have border-bottom, unless the layout is full width
|
53
|
+
remove_bottom_border: full_width,
|
54
|
+
} %>
|
55
|
+
<% end %>
|
56
|
+
<div class="<%= "govuk-width-container" unless full_width %>" id="content">
|
57
|
+
<%= yield :before_content %>
|
58
|
+
<main class="govuk-main-wrapper">
|
59
|
+
<%= yield %>
|
60
|
+
</main>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<div class="govuk-width-container">
|
64
|
+
<%= render "govuk_publishing_components/components/feedback" %>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<% unless local_assigns[:hide_footer_links] %>
|
68
|
+
<%= render "govuk_publishing_components/components/layout_footer", {
|
69
|
+
with_border: true,
|
70
|
+
navigation: layout_helper.footer_navigation,
|
71
|
+
meta: layout_helper.footer_meta,
|
72
|
+
} %>
|
73
|
+
<% end %>
|
74
|
+
<%= javascript_include_tag 'application' %>
|
75
|
+
</body>
|
76
|
+
</html>
|
@@ -1,61 +1,49 @@
|
|
1
1
|
<%
|
2
|
-
full_width ||= false
|
3
2
|
product_name ||= "Publishing"
|
4
3
|
public_environment = environment.eql?("public")
|
4
|
+
full_width ||= false
|
5
|
+
search ||= false
|
6
|
+
search_left ||= false
|
5
7
|
navigation_items ||= []
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
remove_bottom_border ||= false
|
9
|
+
search_left ||= false
|
10
|
+
width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
|
11
|
+
header_classes = %w(gem-c-layout-header govuk-header)
|
12
|
+
header_classes << "gem-c-layout-header--#{environment}"
|
13
|
+
header_classes << "gem-c-layout-header--no-bottom-border" if remove_bottom_border
|
14
|
+
header_classes << "gem-c-layout-header--search-left" if search_left
|
11
15
|
%>
|
12
|
-
<header class="gem-c-layout-header govuk-header gem-c-layout-header--<%= environment %>" role="banner" data-module="govuk-header">
|
13
|
-
<div class="govuk-header__container <%= width_class %>">
|
14
|
-
<div class="govuk-header__logo gem-c-header__logo">
|
15
|
-
<a href="/" class="govuk-header__link govuk-header__link--homepage">
|
16
|
-
<span class="govuk-header__logotype">
|
17
|
-
<svg role="presentation" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 132 97" height="32" width="36">
|
18
|
-
<path fill="currentColor" fill-rule="evenodd"
|
19
|
-
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
|
20
|
-
></path>
|
21
|
-
<image src="<%= asset_path('govuk-logotype-crown.png') %>" class="govuk-header__logotype-crown-fallback-image"></image>
|
22
|
-
</svg>
|
23
|
-
<span class="govuk-header__logotype-text">
|
24
|
-
GOV.UK
|
25
|
-
</span>
|
26
|
-
</span>
|
27
16
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
17
|
+
<header class="<%= header_classes.join(' ') %>" role="banner" data-module="govuk-header">
|
18
|
+
<div class="govuk-header__container <%= width_class %>">
|
19
|
+
<% if search_left %>
|
20
|
+
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
21
|
+
<div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
|
22
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", public_environment: public_environment, environment: environment, product_name: product_name %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
26
|
+
<div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop gem-c-layout-header__search">
|
27
|
+
<%= render "govuk_publishing_components/components/layout_header/search" %>
|
28
|
+
</div>
|
29
|
+
<div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
|
30
|
+
<%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% else %>
|
34
|
+
<div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
|
35
|
+
<div class="gem-c-layout-header__logo govuk-grid-column-two-thirds">
|
36
|
+
<%= render "govuk_publishing_components/components/layout_header/header_logo", public_environment: public_environment, environment: environment, product_name: product_name %>
|
37
|
+
</div>
|
38
|
+
<div class="govuk-header__content gem-c-header__content">
|
39
|
+
<%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
|
40
|
+
</div>
|
41
|
+
<% if search %>
|
42
|
+
<div class="govuk-grid-column-one-third gem-c-layout-header__search">
|
43
|
+
<%= render "govuk_publishing_components/components/layout_header/search" %>
|
44
|
+
</div>
|
54
45
|
<% end %>
|
55
|
-
</
|
56
|
-
</nav>
|
46
|
+
</div>
|
57
47
|
<% end %>
|
58
|
-
|
59
|
-
</div>
|
60
48
|
</div>
|
61
49
|
</header>
|
@@ -4,22 +4,24 @@
|
|
4
4
|
append ||= false
|
5
5
|
%>
|
6
6
|
<div class="gem-c-panel govuk-panel govuk-panel--confirmation">
|
7
|
-
<% if prepend %>
|
8
|
-
<div class="gem-c-panel__prepend">
|
9
|
-
<%= prepend %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
7
|
<h2 class="govuk-panel__title">
|
13
|
-
|
8
|
+
<% if prepend %>
|
9
|
+
<span class="gem-c-panel__prepend">
|
10
|
+
<%= prepend %>
|
11
|
+
</span>
|
12
|
+
<% end %>
|
13
|
+
<span class="govuk-panel__title-text">
|
14
|
+
<%= title %>
|
15
|
+
</span>
|
16
|
+
<% if append %>
|
17
|
+
<span class="gem-c-panel__append">
|
18
|
+
<%= append %>
|
19
|
+
</span>
|
20
|
+
<% end %>
|
14
21
|
</h2>
|
15
22
|
<% if description %>
|
16
23
|
<div class="govuk-panel__body">
|
17
24
|
<%= description %>
|
18
25
|
</div>
|
19
26
|
<% end %>
|
20
|
-
<% if append %>
|
21
|
-
<div class="gem-c-panel__append">
|
22
|
-
<%= append %>
|
23
|
-
</div>
|
24
|
-
<% end %>
|
25
27
|
</div>
|
@@ -1,9 +1,18 @@
|
|
1
1
|
<%
|
2
|
-
class_name = "gem-c-search--on-white"
|
3
|
-
class_name = "gem-c-search--on-govuk-blue" if local_assigns[:on_govuk_blue].eql?(true)
|
4
2
|
size ||= ""
|
5
|
-
|
6
|
-
|
3
|
+
no_border ||= false
|
4
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
5
|
+
classes = %w(gem-c-search)
|
6
|
+
classes << (shared_helper.get_margin_top)
|
7
|
+
classes << (shared_helper.get_margin_bottom) if local_assigns[:margin_bottom]
|
8
|
+
classes << "gem-c-search--large" if size == 'large'
|
9
|
+
classes << "gem-c-search--no-border" if no_border
|
10
|
+
if local_assigns[:on_govuk_blue].eql?(true)
|
11
|
+
classes << "gem-c-search--on-govuk-blue"
|
12
|
+
else
|
13
|
+
classes << "gem-c-search--on-white"
|
14
|
+
end
|
15
|
+
classes << "gem-c-search--separate-label" if local_assigns.include?(:inline_label)
|
7
16
|
|
8
17
|
value ||= ""
|
9
18
|
id ||= "search-main-" + SecureRandom.hex(4)
|
@@ -12,7 +21,7 @@
|
|
12
21
|
aria_controls ||= nil
|
13
22
|
%>
|
14
23
|
|
15
|
-
<div class="
|
24
|
+
<div class="<%= classes.join(' ') %>" data-module="gem-toggle-input-class-on-focus">
|
16
25
|
<label for="<%= id %>" class="gem-c-search__label">
|
17
26
|
<%= label_text %>
|
18
27
|
</label>
|
@@ -262,3 +262,21 @@ examples:
|
|
262
262
|
- link:
|
263
263
|
text: 'Criteria'
|
264
264
|
description: 'no url provided, just text'
|
265
|
+
with_locale_specified:
|
266
|
+
description: |
|
267
|
+
The component is used on translated pages that don’t have a translation for the document link text or the metadata. 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.
|
268
|
+
|
269
|
+
Locales can be set separately for the document link text and individual metadata items. To set link text locale, pass a locale attribute along with the link object. To set metadata locale, pass a locale attribute containing a parallel object to your metadata (depending on which metadata have translations and which need a lang attribute to specify that they are in a different language).
|
270
|
+
|
271
|
+
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.
|
272
|
+
data:
|
273
|
+
items:
|
274
|
+
- link:
|
275
|
+
text: 'Tryloywder Uwch Staff Ysgrifennydd Gwladol Cymru Ionawr-Mawrth 2020'
|
276
|
+
path: '/government/publications/office-of-the-secretary-of-state-for-wales-senior-staff-transparency-january-march-2020'
|
277
|
+
locale: 'cy'
|
278
|
+
metadata:
|
279
|
+
public_updated_at: 2016-06-27 10:29:44
|
280
|
+
document_type: 'Data tryloywder'
|
281
|
+
locale:
|
282
|
+
document_type: 'cy'
|
@@ -139,3 +139,20 @@ examples:
|
|
139
139
|
attributes:
|
140
140
|
lang: en
|
141
141
|
hreflang: en
|
142
|
+
with_border:
|
143
|
+
data:
|
144
|
+
with_border: true
|
145
|
+
meta:
|
146
|
+
items:
|
147
|
+
- href: '/help'
|
148
|
+
text: Help
|
149
|
+
- href: '/help/cookies'
|
150
|
+
text: Cookies
|
151
|
+
- href: '/contact'
|
152
|
+
text: Contact
|
153
|
+
- href: '/help/terms-conditions'
|
154
|
+
text: Terms and conditions
|
155
|
+
- href: '/cymraeg'
|
156
|
+
text: Rhestr o Wasanaethau Cymraeg
|
157
|
+
- href: '/government/organisations/government-digital-service'
|
158
|
+
text: Government Digital Service
|
@@ -10,7 +10,11 @@ body: |
|
|
10
10
|
display_preview: false
|
11
11
|
display_html: true
|
12
12
|
accessibility_criteria: |
|
13
|
-
|
13
|
+
The layout template must:
|
14
|
+
|
15
|
+
* have a `lang` attribute
|
16
|
+
* contain a [skip link](/component-guide/skip_link)
|
17
|
+
* have a sensible page `<title>`
|
14
18
|
examples:
|
15
19
|
default:
|
16
20
|
data:
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Public layout
|
2
|
+
description: A layout to be used by public-facing applications
|
3
|
+
body: |
|
4
|
+
Because it is an entire HTML document, this component can only be [previewed on a separate page](/public).
|
5
|
+
|
6
|
+
display_preview: false
|
7
|
+
display_html: true
|
8
|
+
accessibility_criteria: |
|
9
|
+
The layout template must:
|
10
|
+
|
11
|
+
* have a `lang` attribute
|
12
|
+
* contain a [skip link](/component-guide/skip_link)
|
13
|
+
* have a sensible page `<title>`
|
14
|
+
examples:
|
15
|
+
default:
|
16
|
+
data:
|
17
|
+
title: 'Example layout'
|
18
|
+
block: |
|
19
|
+
<h1>Page content goes here</h1>
|
20
|
+
full_width:
|
21
|
+
description: By default, the layout applies the `govuk-width-container` class to the main element. We can remove this class by setting `full_width` to `true`
|
22
|
+
data:
|
23
|
+
full_width: true
|
24
|
+
block: |
|
25
|
+
<h1>Page content goes here</h1>
|
26
|
+
omit_header:
|
27
|
+
description: This allows the header to be omitted which is currently used when rendering CSV previews from Whitehall
|
28
|
+
data:
|
29
|
+
omit_header: true
|
@@ -7,6 +7,10 @@ govuk_frontend_components:
|
|
7
7
|
- header
|
8
8
|
accessibility_excluded_rules:
|
9
9
|
- landmark-banner-is-top-level # The header element can not be top level in the examples
|
10
|
+
- duplicate-id-aria # IDs will be duplicated in component examples list
|
11
|
+
- form-field-multiple-labels # Form labels will be ambiguous in component examples list
|
12
|
+
- landmark-no-duplicate-banner # banners will be duplicated in component examples list
|
13
|
+
- landmark-unique # aria-label attributes will be duplicated in component examples list
|
10
14
|
examples:
|
11
15
|
default:
|
12
16
|
data:
|
@@ -36,12 +40,42 @@ examples:
|
|
36
40
|
- text: Hidden on desktop
|
37
41
|
href: "item-3"
|
38
42
|
show_only_in_collapsed_menu: true
|
43
|
+
with_left_search_and_navigation:
|
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
|
+
data:
|
46
|
+
search_left: true
|
47
|
+
environment: public
|
48
|
+
navigation_items:
|
49
|
+
- text: Departments
|
50
|
+
href: "item-1"
|
51
|
+
- text: Worldwide
|
52
|
+
href: "item-2"
|
53
|
+
- text: How government works
|
54
|
+
href: "item-3"
|
55
|
+
- text: Get involved
|
56
|
+
href: "item-4"
|
57
|
+
- text: Consultations
|
58
|
+
href: "item-4"
|
59
|
+
- text: Statistics
|
60
|
+
href: "item-5"
|
61
|
+
- text: News and communications
|
62
|
+
href: "item-6"
|
63
|
+
active: true
|
39
64
|
full_width:
|
40
65
|
description: |
|
41
66
|
This is difficult to preview because the preview windows are constrained, but the header will stretch to the size of its container.
|
42
67
|
data:
|
43
68
|
environment: production
|
44
69
|
full_width: true
|
70
|
+
no_bottom_border:
|
71
|
+
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
|
+
data:
|
73
|
+
remove_bottom_border: true
|
74
|
+
environment: 'public'
|
75
|
+
with_search_bar:
|
76
|
+
data:
|
77
|
+
environment: 'public'
|
78
|
+
search: true
|
45
79
|
|
46
80
|
accessibility_criteria: |
|
47
81
|
The component must:
|
@@ -24,6 +24,12 @@ examples:
|
|
24
24
|
stop_the_label_appearing_inline:
|
25
25
|
data:
|
26
26
|
inline_label: false
|
27
|
+
no_border:
|
28
|
+
description: Sometimes we don't need the grey border surrounding the input field, such as when the component is used on a black background
|
29
|
+
data:
|
30
|
+
no_border: true
|
31
|
+
context:
|
32
|
+
black_background: true
|
27
33
|
for_use_on_govuk_blue_background:
|
28
34
|
data:
|
29
35
|
on_govuk_blue: true
|
@@ -10,7 +10,7 @@
|
|
10
10
|
data-track-action="GOV.UK Close Form"
|
11
11
|
aria-controls="something-is-wrong"
|
12
12
|
aria-expanded="true"
|
13
|
-
role="button"
|
13
|
+
role="button"><%= t("components.feedback.close", default: "Close") %></a>
|
14
14
|
|
15
15
|
<div class="govuk-grid-row">
|
16
16
|
<div class="govuk-grid-column-two-thirds">
|
@@ -18,12 +18,12 @@
|
|
18
18
|
|
19
19
|
<input type="hidden" name="url" value="<%= url_without_pii %>">
|
20
20
|
|
21
|
-
<h3 class="gem-c-feedback__form-heading"
|
22
|
-
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph"
|
21
|
+
<h3 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk", default: "Help us improve GOV.UK") %></h3>
|
22
|
+
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph"><%= t("components.feedback.dont_include_personal_info", default: "Don’t include personal or financial information like your National Insurance number or credit card details.") %></p>
|
23
23
|
|
24
24
|
<%= render "govuk_publishing_components/components/input", {
|
25
25
|
label: {
|
26
|
-
text: "What were you doing?"
|
26
|
+
text: t("components.feedback.what_doing", default: "What were you doing?")
|
27
27
|
},
|
28
28
|
name: "what_doing",
|
29
29
|
describedby: "feedback_explanation"
|
@@ -31,13 +31,13 @@
|
|
31
31
|
|
32
32
|
<%= render "govuk_publishing_components/components/input", {
|
33
33
|
label: {
|
34
|
-
text: "What went wrong?"
|
34
|
+
text: t("components.feedback.what_wrong", default: "What went wrong?")
|
35
35
|
},
|
36
36
|
name: "what_wrong"
|
37
37
|
} %>
|
38
38
|
|
39
39
|
<%= render "govuk_publishing_components/components/button", {
|
40
|
-
text: "Send"
|
40
|
+
text: t("components.feedback.send", default: "Send")
|
41
41
|
} %>
|
42
42
|
</div>
|
43
43
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
data-track-action="ffFormClose"
|
11
11
|
aria-controls="page-is-not-useful"
|
12
12
|
aria-expanded="true"
|
13
|
-
role="button"
|
13
|
+
role="button"><%= t("components.feedback.close", default: "Close") %></a>
|
14
14
|
|
15
15
|
<div class="govuk-grid-row">
|
16
16
|
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
|
@@ -19,12 +19,12 @@
|
|
19
19
|
<input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
|
20
20
|
<input name="email_survey_signup[survey_source]" type="hidden" value="<%= path_without_pii %>">
|
21
21
|
|
22
|
-
<h3 class="gem-c-feedback__form-heading"
|
23
|
-
<p id="survey_explanation" class="gem-c-feedback__form-paragraph"
|
22
|
+
<h3 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk", default: "Help us improve GOV.UK") %></h3>
|
23
|
+
<p id="survey_explanation" class="gem-c-feedback__form-paragraph"><%= t("components.feedback.more_about_visit", default: "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.") %></p>
|
24
24
|
|
25
25
|
<%= render "govuk_publishing_components/components/input", {
|
26
26
|
label: {
|
27
|
-
text: "Email address"
|
27
|
+
text: t("components.feedback.email_address", default: "Email address")
|
28
28
|
},
|
29
29
|
name: "email_survey_signup[email_address]",
|
30
30
|
type: "email",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
describedby: "survey_explanation"
|
33
33
|
} %>
|
34
34
|
|
35
|
-
|
36
|
-
text: "Send me the survey",
|
35
|
+
<%= render "govuk_publishing_components/components/button", {
|
36
|
+
text: t("components.feedback.send_me_survey", default: "Send me the survey"),
|
37
37
|
} %>
|
38
38
|
</div>
|
39
39
|
</div>
|