govuk_publishing_components 25.2.3 → 25.5.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/analytics/track-click.js +9 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +6 -4
- data/app/assets/javascripts/govuk_publishing_components/modules.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +52 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +2 -4
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +31 -9
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +9 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +59 -0
- data/app/views/govuk_publishing_components/components/layout_for_public/_account-feedback-footer.html.erb +18 -0
- data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +29 -0
- data/app/views/govuk_publishing_components/components/layout_for_public/_account-navigation.html.erb +30 -0
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +1 -0
- data/config/locales/en.yml +21 -0
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +3 -2
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +5 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/all.js +61 -3
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +1 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +10 -4
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +49 -34
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +61 -3
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +122 -41
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +12 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +37 -39
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +22 -10
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +11 -7
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +18 -18
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +5 -11
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +4 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/core/_template.scss +0 -1
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +6 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +9 -2
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +4 -0
- data/node_modules/govuk-frontend/govuk/template.njk +1 -1
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75bbe4fa0f6a066c890631953c88c20877539ad38d4d3c5bd643d58fb67448e4
|
4
|
+
data.tar.gz: 14d822a1adb2e3f6ad935f922e7175a4fd2f6cfd01f3c9e1a96df442924e8f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec49f4d9fbd7d37c802e1d7ac7e39559d4c7861483355225d9bde8d0df83b2656e77c07e3520ea52a09de678447eb3f1255dd3e3a96ddf33b07e46575058a7d5
|
7
|
+
data.tar.gz: 42721bc8eedaf12aee5c82a673201e4fb6bb4ef1d103a0a683a398b0a77e53d323ab0ba49ab21ef1dce9960b4148e10395c580f52652cd9315ab0762e1393b57
|
@@ -9,26 +9,33 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
9
9
|
GemTrackClick.prototype.start = function ($module) {
|
10
10
|
this.$module = $module[0]
|
11
11
|
this.$module.handleClick = this.handleClick.bind(this)
|
12
|
+
var trackLinksOnly = this.$module.hasAttribute('data-track-links-only')
|
12
13
|
|
13
14
|
var that = this
|
14
15
|
// add a listener to the whole element
|
15
16
|
this.$module.addEventListener('click', function (e) {
|
16
|
-
|
17
|
+
if (!trackLinksOnly) {
|
18
|
+
that.$module.handleClick(e.target)
|
19
|
+
} else if (trackLinksOnly && e.target.tagName === 'A') {
|
20
|
+
that.$module.handleClick(e.target)
|
21
|
+
}
|
17
22
|
})
|
18
23
|
}
|
19
24
|
|
20
25
|
GemTrackClick.prototype.handleClick = function (target) {
|
21
26
|
var options = { transport: 'beacon' }
|
27
|
+
var linkUrl
|
22
28
|
|
23
29
|
// if clicked element hasn't got the right attributes, look for a parent that matches
|
24
30
|
if (!target.hasAttribute('data-track-category') && !target.hasAttribute('data-track-action')) {
|
31
|
+
linkUrl = target.getAttribute('href')
|
25
32
|
target = target.closest('[data-track-category][data-track-action]')
|
26
33
|
}
|
27
34
|
|
28
35
|
if (target) {
|
29
36
|
var category = target.getAttribute('data-track-category')
|
30
37
|
var action = target.getAttribute('data-track-action')
|
31
|
-
var label = target.getAttribute('data-track-label')
|
38
|
+
var label = target.getAttribute('data-track-label') || linkUrl
|
32
39
|
var value = target.getAttribute('data-track-value')
|
33
40
|
var dimension = target.getAttribute('data-track-dimension')
|
34
41
|
var dimensionIndex = target.getAttribute('data-track-dimension-index')
|
@@ -47,16 +47,17 @@
|
|
47
47
|
var isSearchToggle = sourceClass.match('search-toggle')
|
48
48
|
var showText = this.getAttribute('data-show-text') || 'Show search'
|
49
49
|
var hideText = this.getAttribute('data-hide-text') || 'Hide search'
|
50
|
+
var buttonName = this.getAttribute('data-button-name') || 'menu'
|
50
51
|
|
51
52
|
if (targetClass.indexOf('js-visible') !== -1) {
|
52
53
|
target.setAttribute('class', targetClass.replace(/(^|\s)js-visible(\s|$)/, ''))
|
53
54
|
if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
|
54
|
-
window.GOVUK.analytics.trackEvent('headerClicked', '
|
55
|
+
window.GOVUK.analytics.trackEvent('headerClicked', buttonName + 'Closed', { label: 'none' })
|
55
56
|
}
|
56
57
|
} else {
|
57
58
|
target.setAttribute('class', targetClass + ' js-visible')
|
58
59
|
if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
|
59
|
-
window.GOVUK.analytics.trackEvent('headerClicked', '
|
60
|
+
window.GOVUK.analytics.trackEvent('headerClicked', buttonName + 'Opened', { label: 'none' })
|
60
61
|
}
|
61
62
|
}
|
62
63
|
if (sourceClass.indexOf('js-visible') !== -1) {
|
@@ -84,13 +85,14 @@
|
|
84
85
|
var element = $menuToggleButtons[j]
|
85
86
|
|
86
87
|
element.addEventListener('click', function (event) {
|
88
|
+
var buttonName = event.target.getAttribute('data-button-name') || 'menu'
|
87
89
|
var expanded = event.target.getAttribute('aria-expanded')
|
88
90
|
|
89
91
|
if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
|
90
92
|
if (expanded === 'true') {
|
91
|
-
window.GOVUK.analytics.trackEvent('headerClicked', '
|
93
|
+
window.GOVUK.analytics.trackEvent('headerClicked', buttonName + 'Closed', { label: 'none' })
|
92
94
|
} else {
|
93
|
-
window.GOVUK.analytics.trackEvent('headerClicked', '
|
95
|
+
window.GOVUK.analytics.trackEvent('headerClicked', buttonName + 'Opened', { label: 'none' })
|
94
96
|
}
|
95
97
|
}
|
96
98
|
})
|
@@ -11,3 +11,55 @@
|
|
11
11
|
margin-top: - govuk-spacing(2);
|
12
12
|
position: relative;
|
13
13
|
}
|
14
|
+
|
15
|
+
.gem-c-layout-for-public-account-menu {
|
16
|
+
margin: 0 0 govuk-spacing(6) 0;
|
17
|
+
padding: 0;
|
18
|
+
|
19
|
+
@include govuk-media-query($from: desktop) {
|
20
|
+
margin-right: govuk-spacing(4);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Used to determine width of blue location indicator in navigation mention
|
25
|
+
$current-indicator-width: 4px;
|
26
|
+
|
27
|
+
.gem-c-layout-for-public-account-menu__item {
|
28
|
+
list-style-type: none;
|
29
|
+
padding: 12px 0;
|
30
|
+
|
31
|
+
@include govuk-media-query($from: tablet) {
|
32
|
+
margin: 0 0 govuk-spacing(4);
|
33
|
+
padding: govuk-spacing(1) 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.gem-c-layout-for-public-account-menu__item--current {
|
38
|
+
margin-left: -(govuk-spacing(2) + $current-indicator-width);
|
39
|
+
padding-left: govuk-spacing(2);
|
40
|
+
border-left: $current-indicator-width solid govuk-colour("blue");
|
41
|
+
|
42
|
+
.gem-c-layout-for-public-account-menu__link {
|
43
|
+
text-decoration: none;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.gem-c-layout-for-public-account-menu__link {
|
48
|
+
@include govuk-font(19, $weight: "bold");
|
49
|
+
|
50
|
+
&:not(:focus):hover {
|
51
|
+
color: $govuk-link-colour;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.gem-c-layout-for-public-account-feedback-footer {
|
56
|
+
margin-bottom: govuk-spacing(4);
|
57
|
+
padding: govuk-spacing(3);
|
58
|
+
background: govuk-colour("light-grey");
|
59
|
+
|
60
|
+
@include govuk-media-query($from: tablet) {
|
61
|
+
padding: govuk-spacing(6);
|
62
|
+
margin-top: govuk-spacing(2);
|
63
|
+
margin-bottom: govuk-spacing(8);
|
64
|
+
}
|
65
|
+
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
.gem-c-step-nav-header {
|
2
|
+
@include govuk-font(24, $weight: bold);
|
2
3
|
@include govuk-text-colour;
|
4
|
+
|
3
5
|
position: relative;
|
4
6
|
padding: 10px;
|
5
7
|
background: govuk-colour("light-grey", $legacy: "grey-4");
|
@@ -15,7 +17,3 @@
|
|
15
17
|
@include govuk-font(19, $weight: bold);
|
16
18
|
display: block;
|
17
19
|
}
|
18
|
-
|
19
|
-
.gem-c-step-nav-header__title {
|
20
|
-
@include govuk-font(24, $weight: bold, $line-height: 1);
|
21
|
-
}
|
@@ -11,9 +11,16 @@
|
|
11
11
|
omit_header ||= false
|
12
12
|
product_name ||= nil
|
13
13
|
show_explore_header ||= false
|
14
|
+
draft_watermark ||= false
|
14
15
|
show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
|
15
16
|
title ||= "GOV.UK - The best place to find government services and information"
|
16
17
|
|
18
|
+
show_account_layout ||= false
|
19
|
+
account_nav_location ||= nil
|
20
|
+
omit_account_feedback_footer ||= false
|
21
|
+
omit_account_navigation ||= false
|
22
|
+
omit_account_phase_banner ||= false
|
23
|
+
|
17
24
|
# This is a hack - but it's the only way I can find to not have two blue bars on
|
18
25
|
# constrained width layouts.
|
19
26
|
#
|
@@ -33,6 +40,8 @@
|
|
33
40
|
# when a) there's content for the emergency or global banner *and* b) when using
|
34
41
|
# the contrained width layout.
|
35
42
|
blue_bar_dedupe = !full_width && global_bar.present?
|
43
|
+
body_css_classes = %w(gem-c-layout-for-public govuk-template__body)
|
44
|
+
body_css_classes << "draft" if draft_watermark
|
36
45
|
-%>
|
37
46
|
<!DOCTYPE html>
|
38
47
|
<!--[if lt IE 9]><html class="lte-ie8" lang="<%= html_lang %>"><![endif]-->
|
@@ -66,7 +75,7 @@
|
|
66
75
|
|
67
76
|
<%= yield :head %>
|
68
77
|
</head>
|
69
|
-
|
78
|
+
<%= tag.body class: body_css_classes do %>
|
70
79
|
<script>
|
71
80
|
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
|
72
81
|
</script>
|
@@ -74,7 +83,7 @@
|
|
74
83
|
href: "#content"
|
75
84
|
} %>
|
76
85
|
|
77
|
-
<%= render "govuk_publishing_components/components/cookie_banner" %>
|
86
|
+
<%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>
|
78
87
|
|
79
88
|
<% unless omit_header %>
|
80
89
|
<% if show_explore_header %>
|
@@ -107,14 +116,27 @@
|
|
107
116
|
<% end %>
|
108
117
|
<% end %>
|
109
118
|
|
110
|
-
|
111
|
-
<%=
|
112
|
-
|
119
|
+
<% if show_account_layout %>
|
120
|
+
<%= render "govuk_publishing_components/components/layout_for_public/account-layout", {
|
121
|
+
omit_account_phase_banner: omit_account_phase_banner,
|
122
|
+
omit_account_navigation: omit_account_navigation,
|
123
|
+
account_nav_location: account_nav_location,
|
124
|
+
} do %>
|
125
|
+
<%= yield :before_content %>
|
113
126
|
<%= yield %>
|
114
|
-
|
115
|
-
|
127
|
+
<% end %>
|
128
|
+
<% else %>
|
129
|
+
<div id="wrapper" class="<%= "govuk-width-container" unless full_width %>">
|
130
|
+
<%= yield :before_content %>
|
131
|
+
<main class="govuk-main-wrapper" id="content">
|
132
|
+
<%= yield %>
|
133
|
+
</main>
|
134
|
+
</div>
|
135
|
+
<% end %>
|
116
136
|
|
117
|
-
<%
|
137
|
+
<% if show_account_layout && !omit_account_feedback_footer %>
|
138
|
+
<%= render "govuk_publishing_components/components/layout_for_public/account-feedback-footer" %>
|
139
|
+
<% elsif !omit_feedback_form %>
|
118
140
|
<div class="govuk-width-container">
|
119
141
|
<%= render "govuk_publishing_components/components/feedback" %>
|
120
142
|
</div>
|
@@ -128,5 +150,5 @@
|
|
128
150
|
} %>
|
129
151
|
<% end %>
|
130
152
|
<%= javascript_include_tag 'application' %>
|
131
|
-
|
153
|
+
<% end %>
|
132
154
|
</html>
|
@@ -35,6 +35,15 @@ examples:
|
|
35
35
|
image_alt: "some meaningful alt text please"
|
36
36
|
heading_text: "I am not a heading"
|
37
37
|
heading_level: 0
|
38
|
+
with_lazy_loading:
|
39
|
+
description: The image can have an attribute of lazy loading. Defaults to auto if not passed.
|
40
|
+
data:
|
41
|
+
href: "/really-not-a-page"
|
42
|
+
image_src: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG"
|
43
|
+
image_alt: "some meaningful alt text please"
|
44
|
+
image_loading: "lazy"
|
45
|
+
heading_text: "I am not a heading"
|
46
|
+
heading_level: 0
|
38
47
|
with_different_link_size:
|
39
48
|
description: |
|
40
49
|
Set a different font size for the link. Uses the [GOV.UK Frontend heading sizes](https://design-system.service.gov.uk/styles/typography/#headings) but defaults to 19px for legacy reasons. Valid options are `xl`, `l`, `m` and `s`.
|
@@ -61,3 +61,62 @@ examples:
|
|
61
61
|
data:
|
62
62
|
emergency_banner: <div class="govuk-!-padding-top-3 govuk-!-padding-bottom-3">This is the emergency banner slot</div>
|
63
63
|
global_bar: <div class="govuk-!-padding-top-5 govuk-!-padding-bottom-3">This is the global bar slot</div>
|
64
|
+
with_account_layout_enabled:
|
65
|
+
description: Adds account layout wrapper around the content passed in to the component
|
66
|
+
data:
|
67
|
+
show_account_layout: true
|
68
|
+
block: |
|
69
|
+
<h2 class="govuk-heading-l">This is a title</h2>
|
70
|
+
<p class="govuk-body">This is some body text with <a href="https://example.com">a link</a>.
|
71
|
+
with_account_layout_but_without_account_feedback_footer:
|
72
|
+
description: The account layout renders with an account-specific feedback banner by default. This flag allows this banner to be omitted.
|
73
|
+
data:
|
74
|
+
show_account_layout: true
|
75
|
+
omit_account_feedback_footer: true
|
76
|
+
block: |
|
77
|
+
<h2 class="govuk-heading-l">This is a title</h2>
|
78
|
+
<p class="govuk-body">This is some body text with <a href="https://example.com">a link</a>.</p>
|
79
|
+
with_current_account_navigation:
|
80
|
+
description: "The account layout renders with an account-specific nav to help users navigate different areas of their account. This flag is here to allow control over which option in the nav is highlighted as `current`. Valid options are currently `your-account`, `manage`, and `security`."
|
81
|
+
data:
|
82
|
+
show_account_layout: true
|
83
|
+
account_nav_location: "manage"
|
84
|
+
block: |
|
85
|
+
<h2 class="govuk-heading-l">This is a title</h2>
|
86
|
+
<p class="govuk-body">This is a page under the "Manage your account" section, so we must highlight "Manage your account" in the account navigation.</p>
|
87
|
+
with_account_layout_but_without_account_navigation:
|
88
|
+
description: The account layout renders with account navigation by default, this hides it.
|
89
|
+
data:
|
90
|
+
show_account_layout: true
|
91
|
+
omit_account_navigation: true
|
92
|
+
block: |
|
93
|
+
<h2 class="govuk-heading-l">This is a title</h2>
|
94
|
+
<p class="govuk-body">This is some body text with <a href="https://example.com">a link</a>.</p>
|
95
|
+
with_account_layout_but_without_account_phase_banner:
|
96
|
+
description: The account layout renders with a phase banner by default, this hides it.
|
97
|
+
data:
|
98
|
+
show_account_layout: true
|
99
|
+
omit_account_phase_banner: true
|
100
|
+
block: |
|
101
|
+
<h2 class="govuk-heading-l">This is a title</h2>
|
102
|
+
<p class="govuk-body">This is some body text with <a href="https://example.com">a link</a>.</p>
|
103
|
+
with_custom_cookie_banner:
|
104
|
+
description: Passes content through to the [cookie banner component](/component-guide/cookie_banner/).
|
105
|
+
data:
|
106
|
+
cookie_banner_data:
|
107
|
+
title: Can we use cookies to collect information about how you use GOV.UK?
|
108
|
+
text: Cookies help us see where we can make improvements to GOV.UK.
|
109
|
+
confirmation_message: You have accepted cookies.
|
110
|
+
cookie_preferences_href: https://www.gov.uk/government/publications/govuk-accounts-trial-full-privacy-notice-and-accessibility-statement
|
111
|
+
services_cookies:
|
112
|
+
yes:
|
113
|
+
text: Yes
|
114
|
+
data_attributes:
|
115
|
+
track_category: cookieBanner
|
116
|
+
no:
|
117
|
+
text: No
|
118
|
+
data_attributes:
|
119
|
+
track-category: cookieBanner
|
120
|
+
cookie_preferences:
|
121
|
+
text: How GOV.UK accounts use cookies
|
122
|
+
href: https://www.gov.uk/government/publications/govuk-accounts-trial-full-privacy-notice-and-accessibility-statement
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= tag.div(class: "govuk-width-container") do %>
|
2
|
+
<%= tag.div(class: "gem-c-layout-for-public-account-feedback-footer") do %>
|
3
|
+
<%= render "govuk_publishing_components/components/heading", {
|
4
|
+
text: t("components.layout_for_public.account_layout.feedback.banners.title"),
|
5
|
+
heading_level: 2,
|
6
|
+
font_size: "m",
|
7
|
+
margin_bottom: 4,
|
8
|
+
} %>
|
9
|
+
|
10
|
+
<p class="govuk-body govuk-!-margin-bottom-0">
|
11
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_intro") %>
|
12
|
+
<a href="<%= "#{Plek.find('account-manager')}/feedback" %>" class="govuk-link">
|
13
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_link") %>
|
14
|
+
</a>
|
15
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.footer_outro") %>
|
16
|
+
</p>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="govuk-width-container">
|
2
|
+
<% message = capture do %>
|
3
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_intro") %>
|
4
|
+
<a class="govuk-link" href=<%= "#{Plek.find('account-manager')}/feedback" %>>
|
5
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_link") %>
|
6
|
+
</a>
|
7
|
+
<%= t("components.layout_for_public.account_layout.feedback.banners.phase_outro") %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<%= render "govuk_publishing_components/components/phase_banner", {
|
11
|
+
phase: "alpha",
|
12
|
+
message: message
|
13
|
+
} unless omit_account_phase_banner %>
|
14
|
+
|
15
|
+
<div class="govuk-grid-row govuk-main-wrapper">
|
16
|
+
<%= tag.div(class: 'govuk-grid-column-one-third') do %>
|
17
|
+
<%= render "govuk_publishing_components/components/layout_for_public/account-navigation", { page_is: account_nav_location} %>
|
18
|
+
<% end unless omit_account_navigation %>
|
19
|
+
|
20
|
+
<div class="govuk-grid-column-two-thirds">
|
21
|
+
<div id="wrapper">
|
22
|
+
<%= yield :before_content %>
|
23
|
+
<main role="main" id="content">
|
24
|
+
<%= yield %>
|
25
|
+
</main>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
data/app/views/govuk_publishing_components/components/layout_for_public/_account-navigation.html.erb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<% page_is ||= nil %>
|
2
|
+
|
3
|
+
<nav aria-label="Account management" class="gem-c-layout-for-public-account-nav">
|
4
|
+
<ul class="gem-c-layout-for-public-account-menu">
|
5
|
+
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "your-account" %>">
|
6
|
+
<%= link_to(
|
7
|
+
t("components.layout_for_public.account_layout.navigation.menu_bar.account.link_text"),
|
8
|
+
"#{Plek.find('account-manager')}",
|
9
|
+
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state',
|
10
|
+
'aria-current': page_is == "your-account" ? "page" : nil,
|
11
|
+
) %>
|
12
|
+
</li>
|
13
|
+
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "manage" %>">
|
14
|
+
<%= link_to(
|
15
|
+
t("components.layout_for_public.account_layout.navigation.menu_bar.manage.link_text"),
|
16
|
+
"#{Plek.find('account-manager')}/account/manage",
|
17
|
+
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state',
|
18
|
+
'aria-current': page_is == "manage" ? "page" : nil,
|
19
|
+
) %>
|
20
|
+
</li>
|
21
|
+
<li class="gem-c-layout-for-public-account-menu__item <%= "gem-c-layout-for-public-account-menu__item--current" if page_is == "security" %>">
|
22
|
+
<%= link_to(
|
23
|
+
t("components.layout_for_public.account_layout.navigation.menu_bar.security.link_text"),
|
24
|
+
"#{Plek.find('account-manager')}/account/security",
|
25
|
+
class: 'gem-c-layout-for-public-account-menu__link govuk-link govuk-link--no-visited-state',
|
26
|
+
'aria-current': page_is == "security" ? "page" : nil,
|
27
|
+
) %>
|
28
|
+
</li>
|
29
|
+
</ul>
|
30
|
+
</nav>
|
data/config/locales/en.yml
CHANGED
@@ -81,6 +81,27 @@ en:
|
|
81
81
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
82
82
|
licence_html: All content is available under the <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
|
83
83
|
support_links: Support links
|
84
|
+
layout_for_public:
|
85
|
+
account_layout:
|
86
|
+
feedback:
|
87
|
+
banners:
|
88
|
+
footer_intro: We’re trialling GOV.UK accounts.
|
89
|
+
footer_link: Give feedback
|
90
|
+
footer_outro: on your experience so we can make them better.
|
91
|
+
phase_intro: We’re trialling GOV.UK accounts - your
|
92
|
+
phase_link: feedback
|
93
|
+
phase_outro: will help us improve them.
|
94
|
+
title: Help improve GOV.UK accounts
|
95
|
+
navigation:
|
96
|
+
destroy_user_session: Sign out
|
97
|
+
menu_bar:
|
98
|
+
account:
|
99
|
+
link_text: Your account
|
100
|
+
manage:
|
101
|
+
link_text: Manage your account
|
102
|
+
security:
|
103
|
+
link_text: Security and privacy
|
104
|
+
user_root_path: Account
|
84
105
|
layout_header:
|
85
106
|
hide_button: Hide search
|
86
107
|
menu: Menu
|