govuk_publishing_components 27.9.0 → 27.9.1
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/layout-super-navigation-header.js +20 -40
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +434 -366
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-super-navigation-header.scss +2 -2
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +81 -55
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +12 -3
- data/config/locales/en.yml +2 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
@@ -1,3 +1,3 @@
|
|
1
|
-
.gem-c-super-navigation-
|
2
|
-
|
1
|
+
.gem-c-layout-super-navigation-header__content {
|
2
|
+
display: none;
|
3
3
|
}
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -18,7 +18,8 @@
|
|
18
18
|
<header role="banner" class="gem-c-layout-super-navigation-header">
|
19
19
|
<div class="gem-c-layout-super-navigation-header__container govuk-width-container govuk-clearfix">
|
20
20
|
<div class="gem-c-layout-super-navigation-header__header-logo">
|
21
|
-
<a
|
21
|
+
<a
|
22
|
+
class="govuk-header__link govuk-header__link--homepage"
|
22
23
|
data-module="gem-track-click"
|
23
24
|
data-track-action="logoLink"
|
24
25
|
data-track-category="headerClicked"
|
@@ -27,26 +28,30 @@
|
|
27
28
|
data-track-dimension-index="29"
|
28
29
|
href="<%= logo_link %>"
|
29
30
|
id="logo"
|
30
|
-
title="<%= logo_link_title %>"
|
31
|
+
title="<%= logo_link_title %>"
|
32
|
+
>
|
31
33
|
<span class="govuk-header__logotype">
|
32
|
-
|
34
|
+
<!--[if gt IE 8]><!-->
|
35
|
+
<svg
|
36
|
+
aria-hidden="true"
|
33
37
|
class="govuk-header__logotype-crown gem-c-layout-super-navigation-header__logotype-crown"
|
34
38
|
focusable="false"
|
35
39
|
height="30"
|
36
40
|
viewBox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
>
|
42
49
|
</path>
|
43
|
-
<image class="govuk-header__logotype-crown-fallback-image"
|
44
|
-
height="30"
|
45
|
-
src="<%= asset_path('govuk-logotype-crown.png') %>"
|
46
|
-
width="36"
|
47
|
-
xlink:href="">
|
48
|
-
</image>
|
49
50
|
</svg>
|
51
|
+
<!--<![endif]-->
|
52
|
+
<!--[if IE 8]>
|
53
|
+
<img src="<%= asset_path('govuk-logotype-crown.png') %>" alt="" class="govuk-header__logotype-crown-fallback-image" width="36" height="32">
|
54
|
+
<![endif]-->
|
50
55
|
<span class="govuk-header__logotype-text">
|
51
56
|
<%= logo_text %>
|
52
57
|
</span>
|
@@ -76,6 +81,13 @@
|
|
76
81
|
type="button"
|
77
82
|
>
|
78
83
|
Menu
|
84
|
+
<span
|
85
|
+
aria-hidden="true"
|
86
|
+
class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon"
|
87
|
+
focusable="false"
|
88
|
+
>
|
89
|
+
×
|
90
|
+
</span>
|
79
91
|
</button>
|
80
92
|
<ul id="super-navigation-menu" class="gem-c-layout-super-navigation-header__navigation-items">
|
81
93
|
<% navigation_links.each_with_index do | link, index | %>
|
@@ -89,34 +101,34 @@
|
|
89
101
|
tracking_label = link[:label].downcase.gsub(/\s+/, "")
|
90
102
|
%>
|
91
103
|
<%= tag.li class: li_classes do %>
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
</
|
104
|
+
<div class="gem-c-layout-super-navigation-header__navigation-toggle-wrapper govuk-clearfix">
|
105
|
+
<%= link_to link[:label], link[:href], {
|
106
|
+
class: "gem-c-layout-super-navigation-header__navigation-item-link",
|
107
|
+
data: {
|
108
|
+
module: "gem-track-click",
|
109
|
+
track_action: "#{tracking_label}Link",
|
110
|
+
track_category: "headerClicked",
|
111
|
+
track_label: link[:href],
|
112
|
+
track_dimension: link[:label],
|
113
|
+
track_dimension_index: "29",
|
114
|
+
}
|
115
|
+
} %>
|
116
|
+
<% if has_children %>
|
117
|
+
<button
|
118
|
+
aria-controls="super-navigation-menu__section-<%= unique_id %>"
|
119
|
+
aria-expanded="false"
|
120
|
+
aria-label="<%= show_menu_text %>"
|
121
|
+
class="gem-c-layout-super-navigation-header__navigation-second-toggle-button"
|
122
|
+
data-text-for-hide="<%= hide_menu_text %>"
|
123
|
+
data-text-for-show="<%= show_menu_text %>"
|
124
|
+
data-toggle-desktop-group="top"
|
125
|
+
data-toggle-mobile-group="second"
|
126
|
+
data-tracking-key="<%= tracking_label %>"
|
127
|
+
hidden
|
128
|
+
id="super-navigation-menu__section-<%= unique_id %>-toggle"
|
129
|
+
type="button"
|
130
|
+
><%= link[:label] %></button>
|
131
|
+
</div>
|
120
132
|
<div
|
121
133
|
hidden
|
122
134
|
class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
|
@@ -152,7 +164,7 @@
|
|
152
164
|
track_dimension_index: "29",
|
153
165
|
}
|
154
166
|
} %>
|
155
|
-
<%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
|
167
|
+
<%= tag.p item[:description], class: "govuk-body govuk-!-margin-0 govuk-!-margin-top-1" if has_description %>
|
156
168
|
</li>
|
157
169
|
<% end %>
|
158
170
|
</ul>
|
@@ -214,9 +226,17 @@
|
|
214
226
|
<%= search_text %>
|
215
227
|
</span>
|
216
228
|
<%=
|
217
|
-
render "govuk_publishing_components/components/search/search_icon",
|
218
|
-
classes: %
|
229
|
+
render "govuk_publishing_components/components/search/search_icon", {
|
230
|
+
classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon],
|
231
|
+
}
|
219
232
|
%>
|
233
|
+
<span
|
234
|
+
aria-hidden="true"
|
235
|
+
class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon"
|
236
|
+
focusable="false"
|
237
|
+
>
|
238
|
+
×
|
239
|
+
</span>
|
220
240
|
</button>
|
221
241
|
|
222
242
|
<div id="super-search-menu" class="gem-c-layout-super-navigation-header__search-items">
|
@@ -243,14 +263,16 @@
|
|
243
263
|
cy="10.0161"
|
244
264
|
r="8.51613"
|
245
265
|
stroke="currentColor"
|
246
|
-
stroke-width="3"
|
266
|
+
stroke-width="3"
|
267
|
+
/>
|
247
268
|
<line
|
248
269
|
x1="15.8668"
|
249
270
|
y1="16.3587"
|
250
271
|
x2="25.4475"
|
251
272
|
y2="25.9393"
|
252
273
|
stroke="currentColor"
|
253
|
-
stroke-width="3"
|
274
|
+
stroke-width="3"
|
275
|
+
/>
|
254
276
|
</svg>
|
255
277
|
</a>
|
256
278
|
</div>
|
@@ -288,16 +310,20 @@
|
|
288
310
|
<ul class="govuk-list">
|
289
311
|
<% popular_links.each do | popular_link | %>
|
290
312
|
<li class="gem-c-layout-super-navigation-header__popular-item">
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
data
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
313
|
+
<%= link_to popular_link[:label], popular_link[:href], {
|
314
|
+
class: [
|
315
|
+
"govuk-link",
|
316
|
+
"gem-c-layout-super-navigation-header__popular-link",
|
317
|
+
],
|
318
|
+
data: {
|
319
|
+
module: "gem-track-click",
|
320
|
+
track_action: "popularLink",
|
321
|
+
track_category: "headerClicked",
|
322
|
+
track_label: popular_link[:href],
|
323
|
+
track_dimension: popular_link[:label],
|
324
|
+
track_dimension_index: "29",
|
325
|
+
}
|
326
|
+
} %>
|
301
327
|
</li>
|
302
328
|
<% end %>
|
303
329
|
</ul>
|
data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml
CHANGED
@@ -16,12 +16,21 @@ accessibility_criteria: |
|
|
16
16
|
|
17
17
|
* have a role of banner at the root of the component (<header>) (ARIA 1.1)
|
18
18
|
accessibility_excluded_rules:
|
19
|
-
|
20
|
-
- landmark-
|
19
|
+
# The header element can not be top level in the examples.
|
20
|
+
- landmark-banner-is-top-level
|
21
|
+
# Banners will be duplicated in component examples list.
|
22
|
+
- duplicate-id
|
23
|
+
- duplicate-id-active
|
24
|
+
- duplicate-id-aria
|
25
|
+
- landmark-no-duplicate-banner
|
26
|
+
- landmark-unique
|
21
27
|
examples:
|
22
28
|
default:
|
23
29
|
with_custom_logo_link:
|
24
|
-
description:
|
30
|
+
description: |
|
31
|
+
The header logo links to root by default. This option allows us to override that in certain instances.
|
32
|
+
|
33
|
+
Remember to update the title, as the default is "Go to the GOV.UK homepage".
|
25
34
|
data:
|
26
35
|
logo_link: "https://www.example.com"
|
27
36
|
logo_link_title: "Go to example"
|
data/config/locales/en.yml
CHANGED
@@ -94,9 +94,9 @@ en:
|
|
94
94
|
account_layout:
|
95
95
|
feedback:
|
96
96
|
banners:
|
97
|
-
phase_intro:
|
97
|
+
phase_intro: This is a new service – your
|
98
98
|
phase_link: feedback
|
99
|
-
phase_outro: will help us improve
|
99
|
+
phase_outro: will help us to improve it.
|
100
100
|
navigation:
|
101
101
|
destroy_user_session: Sign out
|
102
102
|
menu_bar:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 27.9.
|
4
|
+
version: 27.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|