govuk_publishing_components 27.10.2 → 27.10.3
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/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +431 -363
- 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 +84 -54
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +12 -3
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 657e4c5dd25ccaf9fbcb4052fb9b48033884e4ea11a67853a774d4c94ff987c9
|
4
|
+
data.tar.gz: c315a4c225848b20d8a1db997a86844fc659cf26700a2297b74caf007bc2c96e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbbe3180641788a4f06261a5e5ef9a68fdae6f34a4d55d9585cf021aa22ab4ccd00b4da2afca6709eb78e06feb42896c8889e4ce8222268f37a98de565055f26
|
7
|
+
data.tar.gz: b172a6ff735e768886eac870678a6929cc5d288055756a3176b39b26255e50c6543b913728ee7bf1bc1f2333ebb9e1075b4f241cd675d98aa8e655b898776375
|
@@ -92,169 +92,72 @@
|
|
92
92
|
}
|
93
93
|
}
|
94
94
|
|
95
|
-
$
|
95
|
+
$icon-size: 20px;
|
96
|
+
$chevron-indent-spacing: 7px;
|
97
|
+
|
98
|
+
@mixin chevron($colour, $update: false) {
|
99
|
+
@if ($update == true) {
|
100
|
+
border-bottom-color: $colour;
|
101
|
+
border-right-color: $colour;
|
102
|
+
} @else {
|
103
|
+
border-bottom: 3px solid $colour;
|
104
|
+
border-right: 3px solid $colour;
|
105
|
+
content: " ";
|
106
|
+
display: inline-block;
|
107
|
+
height: 8px;
|
108
|
+
margin: 0 8px 0 2px;
|
109
|
+
transform: translateY(-35%) rotate(45deg);
|
110
|
+
vertical-align: middle;
|
111
|
+
width: 8px;
|
112
|
+
}
|
113
|
+
}
|
96
114
|
|
97
|
-
@mixin
|
98
|
-
|
99
|
-
|
115
|
+
@mixin make-selectable-area-bigger {
|
116
|
+
background: none;
|
117
|
+
bottom: 0;
|
100
118
|
content: " ";
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
vertical-align: middle;
|
106
|
-
width: 8px;
|
119
|
+
left: 0;
|
120
|
+
position: absolute;
|
121
|
+
right: 0;
|
122
|
+
top: 0;
|
107
123
|
}
|
108
124
|
|
109
|
-
|
125
|
+
@mixin pseudo-underline {
|
110
126
|
background: none;
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
&,
|
121
|
-
&:link,
|
122
|
-
&:visited {
|
123
|
-
color: $govuk-link-colour;
|
124
|
-
}
|
127
|
+
bottom: 0;
|
128
|
+
content: " ";
|
129
|
+
height: govuk-spacing(1);
|
130
|
+
left: govuk-spacing(4);
|
131
|
+
position: absolute;
|
132
|
+
right: govuk-spacing(4);
|
133
|
+
top: auto;
|
134
|
+
}
|
125
135
|
|
136
|
+
@mixin focus-and-focus-visible {
|
126
137
|
&:focus {
|
127
|
-
|
128
|
-
border-color: $govuk-focus-text-colour;
|
129
|
-
border-top-color: $govuk-focus-colour;
|
130
|
-
color: $govuk-focus-text-colour;
|
131
|
-
outline: 3px solid transparent;
|
132
|
-
box-shadow: none;
|
133
|
-
z-index: 1;
|
134
|
-
}
|
135
|
-
|
136
|
-
@include govuk-media-query($from: "tablet") {
|
137
|
-
padding: govuk-spacing(6);
|
138
|
-
}
|
139
|
-
|
140
|
-
@include govuk-media-query($from: "desktop") {
|
141
|
-
@include govuk-font($size: 16, $weight: false, $line-height: 20px);
|
142
|
-
color: govuk-colour("white");
|
143
|
-
display: inherit;
|
144
|
-
height: govuk-spacing(9);
|
145
|
-
padding: govuk-spacing(4);
|
146
|
-
|
147
|
-
&:after {
|
148
|
-
background: govuk-colour("black");
|
149
|
-
bottom: 0;
|
150
|
-
content: " ";
|
151
|
-
display: block;
|
152
|
-
height: govuk-spacing(1);
|
153
|
-
left: govuk-spacing(4);
|
154
|
-
position: absolute;
|
155
|
-
right: govuk-spacing(4);
|
156
|
-
}
|
157
|
-
|
158
|
-
&:hover {
|
159
|
-
background: govuk-colour("black");
|
160
|
-
color: govuk-colour("mid-grey");
|
161
|
-
|
162
|
-
&:after {
|
163
|
-
background-color: govuk-colour("mid-grey");
|
164
|
-
}
|
165
|
-
}
|
166
|
-
|
167
|
-
&:focus {
|
168
|
-
@include govuk-focused-text;
|
169
|
-
box-shadow: none;
|
170
|
-
|
171
|
-
&:after {
|
172
|
-
background-color: $govuk-focus-text-colour;
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
&,
|
177
|
-
&:visited {
|
178
|
-
color: govuk-colour("white");
|
179
|
-
}
|
138
|
+
@content;
|
180
139
|
}
|
181
|
-
}
|
182
|
-
|
183
|
-
%toggle-base {
|
184
|
-
@extend %top-level-navigation-link-base;
|
185
|
-
@include govuk-font($size: 16, $weight: false, $line-height: 20px);
|
186
|
-
border-radius: 0;
|
187
|
-
cursor: pointer;
|
188
|
-
padding: govuk-spacing(4);
|
189
|
-
right: 0;
|
190
|
-
top: 0;
|
191
140
|
|
192
|
-
|
193
|
-
|
141
|
+
&:focus-visible {
|
142
|
+
@content;
|
194
143
|
}
|
195
144
|
}
|
196
145
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
height: govuk-spacing(9);
|
201
|
-
|
202
|
-
&:focus {
|
203
|
-
border-color: $govuk-focus-colour;
|
146
|
+
@mixin focus-not-focus-visible {
|
147
|
+
& {
|
148
|
+
@content;
|
204
149
|
}
|
205
150
|
|
206
|
-
|
207
|
-
|
208
|
-
border-right-color: govuk-colour("black");
|
209
|
-
|
210
|
-
&,
|
211
|
-
&:hover {
|
212
|
-
background: govuk-colour("light-grey");
|
213
|
-
color: govuk-colour("light-grey");
|
214
|
-
}
|
215
|
-
|
216
|
-
&:focus {
|
217
|
-
color: $govuk-focus-colour;
|
218
|
-
background: $govuk-focus-colour;
|
219
|
-
}
|
220
|
-
|
221
|
-
&:before,
|
222
|
-
&:after {
|
223
|
-
$width: govuk-spacing(4);
|
224
|
-
$height: 4px;
|
225
|
-
|
226
|
-
border: none;
|
227
|
-
content: " ";
|
228
|
-
display: block;
|
229
|
-
margin: 0;
|
230
|
-
width: $width;
|
231
|
-
height: $height;
|
232
|
-
background: govuk-colour("black");
|
233
|
-
transform-origin: center;
|
234
|
-
position: absolute;
|
235
|
-
top: calc(50% - #{$height / 2});
|
236
|
-
left: calc(50% - #{$width / 2});
|
237
|
-
}
|
238
|
-
|
239
|
-
&:before {
|
240
|
-
transform: rotate(45deg);
|
241
|
-
}
|
242
|
-
|
243
|
-
&:after {
|
244
|
-
transform: rotate(-45deg);
|
245
|
-
}
|
151
|
+
&:focus:not(:focus-visible) {
|
152
|
+
@content;
|
246
153
|
}
|
247
154
|
}
|
248
155
|
|
249
|
-
%search-icon {
|
250
|
-
height: $search-icon-size;
|
251
|
-
pointer-events: none;
|
252
|
-
width: $search-icon-size;
|
253
|
-
}
|
254
|
-
|
255
156
|
// Header layout - black bar and logo.
|
256
157
|
.gem-c-layout-super-navigation-header {
|
257
158
|
background: govuk-colour("black");
|
159
|
+
border-top: 1px solid govuk-colour("black");
|
160
|
+
margin-top: -1px;
|
258
161
|
position: relative;
|
259
162
|
|
260
163
|
.lte-ie8 & {
|
@@ -276,8 +179,8 @@ $search-icon-size: 20px;
|
|
276
179
|
|
277
180
|
.gem-c-layout-super-navigation-header__header-logo {
|
278
181
|
height: govuk-spacing(6);
|
279
|
-
padding-top: govuk-spacing(3);
|
280
182
|
padding-bottom: govuk-spacing(3);
|
183
|
+
padding-top: govuk-spacing(3);
|
281
184
|
|
282
185
|
@include govuk-media-query($from: "desktop") {
|
283
186
|
display: block;
|
@@ -292,6 +195,10 @@ $search-icon-size: 20px;
|
|
292
195
|
}
|
293
196
|
}
|
294
197
|
|
198
|
+
.gem-c-layout-super-navigation-header__navigation-toggle-wrapper {
|
199
|
+
position: relative;
|
200
|
+
}
|
201
|
+
|
295
202
|
// Top level navigation and search.
|
296
203
|
.gem-c-layout-super-navigation-header__navigation-items,
|
297
204
|
.gem-c-layout-super-navigation-header__search-items {
|
@@ -314,6 +221,10 @@ $search-icon-size: 20px;
|
|
314
221
|
}
|
315
222
|
|
316
223
|
.gem-c-layout-super-navigation-header__navigation-items {
|
224
|
+
@include govuk-media-query($from: "desktop") {
|
225
|
+
display: inline-block;
|
226
|
+
}
|
227
|
+
|
317
228
|
.js-module-initialised & {
|
318
229
|
padding: 0 0 govuk-spacing(9) 0;
|
319
230
|
|
@@ -325,94 +236,276 @@ $search-icon-size: 20px;
|
|
325
236
|
|
326
237
|
.gem-c-layout-super-navigation-header__navigation-item,
|
327
238
|
.gem-c-layout-super-navigation-header__search-item {
|
328
|
-
|
329
|
-
|
239
|
+
display: block;
|
240
|
+
margin: 0 govuk-spacing(3);
|
241
|
+
position: relative;
|
242
|
+
|
243
|
+
@include govuk-media-query($from: "tablet") {
|
244
|
+
margin: 0 govuk-spacing(6);
|
245
|
+
}
|
330
246
|
|
331
247
|
@include govuk-media-query($from: "desktop") {
|
332
|
-
|
248
|
+
background: govuk-colour("black");
|
249
|
+
display: block;
|
333
250
|
float: left;
|
251
|
+
margin: 0;
|
334
252
|
padding: 0;
|
253
|
+
position: static;
|
335
254
|
}
|
336
255
|
}
|
337
256
|
|
338
257
|
.gem-c-layout-super-navigation-header__navigation-item {
|
339
|
-
|
340
|
-
background-color: $govuk-border-colour;
|
341
|
-
content: " ";
|
342
|
-
display: block;
|
343
|
-
height: 1px;
|
344
|
-
left: 0;
|
345
|
-
right: 0;
|
346
|
-
position: absolute;
|
347
|
-
}
|
258
|
+
border-bottom: 1px solid $govuk-border-colour;
|
348
259
|
|
349
260
|
@include govuk-media-query($from: "desktop") {
|
350
|
-
|
351
|
-
content: none;
|
352
|
-
}
|
261
|
+
border-bottom: 0;
|
353
262
|
}
|
354
263
|
}
|
355
264
|
|
356
|
-
// Top level navigation links.
|
357
|
-
.gem-c-layout-super-navigation-header__navigation-item-link
|
358
|
-
|
265
|
+
// Top level navigation links and search link.
|
266
|
+
.gem-c-layout-super-navigation-header__navigation-item-link,
|
267
|
+
.gem-c-layout-super-navigation-header__search-item-link,
|
268
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button {
|
269
|
+
@include govuk-link-common;
|
270
|
+
@include govuk-link-style-no-visited-state;
|
271
|
+
@include govuk-link-style-no-underline;
|
272
|
+
|
273
|
+
display: inline-block;
|
274
|
+
font-size: 19px;
|
275
|
+
font-size: govuk-px-to-rem(19px);
|
276
|
+
font-weight: bold;
|
277
|
+
margin: govuk-spacing(3) 0;
|
278
|
+
|
279
|
+
@include govuk-media-query($from: "desktop") {
|
280
|
+
display: block;
|
281
|
+
margin: 0;
|
282
|
+
}
|
283
|
+
|
284
|
+
&:hover {
|
285
|
+
@include govuk-link-hover-decoration;
|
286
|
+
}
|
359
287
|
|
360
288
|
&,
|
361
|
-
&:link,
|
289
|
+
&:link,
|
362
290
|
&:visited {
|
363
|
-
|
291
|
+
@include focus-and-focus-visible {
|
292
|
+
@include govuk-focused-text;
|
293
|
+
}
|
364
294
|
|
365
|
-
|
366
|
-
|
295
|
+
// Undoes the :focus styles *only* for browsers that support :focus-visible.
|
296
|
+
// See https://www.tpgi.com/focus-visible-and-backwards-compatibility/
|
297
|
+
&:focus:not(:focus-visible) {
|
298
|
+
background: none;
|
299
|
+
box-shadow: none;
|
300
|
+
color: $govuk-link-colour;
|
367
301
|
|
368
|
-
|
369
|
-
|
302
|
+
&:hover {
|
303
|
+
@include govuk-link-decoration;
|
304
|
+
@include govuk-link-hover-decoration;
|
305
|
+
color: $govuk-link-hover-colour;
|
370
306
|
}
|
371
307
|
}
|
372
308
|
|
373
|
-
&:
|
374
|
-
|
309
|
+
&:after {
|
310
|
+
@include make-selectable-area-bigger;
|
375
311
|
}
|
376
312
|
|
377
313
|
@include govuk-media-query($from: "desktop") {
|
378
|
-
|
314
|
+
float: left;
|
315
|
+
font-size: 16px;
|
316
|
+
font-size: govuk-px-to-rem(16px);
|
317
|
+
height: govuk-spacing(4);
|
318
|
+
padding: govuk-spacing(4);
|
319
|
+
position: relative;
|
320
|
+
|
321
|
+
&:before {
|
322
|
+
@include chevron(govuk-colour("white"), true);
|
323
|
+
}
|
324
|
+
|
325
|
+
&:hover {
|
326
|
+
color: govuk-colour("mid-grey");
|
327
|
+
|
328
|
+
&:after {
|
329
|
+
background: govuk-colour("mid-grey");
|
330
|
+
}
|
331
|
+
}
|
332
|
+
|
333
|
+
// stylelint-disable max-nesting-depth
|
334
|
+
@include focus-and-focus-visible {
|
335
|
+
box-shadow: none;
|
336
|
+
color: $govuk-focus-text-colour;
|
337
|
+
|
338
|
+
&:after {
|
339
|
+
background: $govuk-focus-text-colour;
|
340
|
+
}
|
341
|
+
}
|
342
|
+
|
343
|
+
@include focus-not-focus-visible {
|
344
|
+
&,
|
345
|
+
&:hover {
|
346
|
+
color: govuk-colour("white");
|
347
|
+
text-decoration: none;
|
348
|
+
}
|
349
|
+
}
|
350
|
+
// stylelint-enable max-nesting-depth
|
351
|
+
|
352
|
+
&:focus:not(:focus-visible) {
|
353
|
+
&:after {
|
354
|
+
background: none;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
&:after {
|
359
|
+
@include pseudo-underline;
|
360
|
+
}
|
379
361
|
}
|
380
362
|
}
|
381
363
|
|
382
|
-
|
383
|
-
|
384
|
-
&:link:focus {
|
385
|
-
color: $govuk-focus-text-colour;
|
364
|
+
&:after {
|
365
|
+
@include make-selectable-area-bigger;
|
386
366
|
}
|
367
|
+
}
|
387
368
|
|
369
|
+
.gem-c-layout-super-navigation-header__navigation-item-link {
|
388
370
|
.js-module-initialised & {
|
389
|
-
|
390
|
-
|
371
|
+
margin-left: govuk-spacing(4);
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
.gem-c-layout-super-navigation-header__navigation-second-toggle-button {
|
376
|
+
background: none;
|
377
|
+
border: 0;
|
378
|
+
color: $govuk-link-colour;
|
379
|
+
cursor: pointer;
|
380
|
+
padding: 0;
|
381
|
+
|
382
|
+
@include focus-not-focus-visible {
|
383
|
+
&:before {
|
384
|
+
@include chevron($govuk-link-colour);
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
@include focus-not-focus-visible {
|
389
|
+
&:hover {
|
390
|
+
&:before {
|
391
|
+
@include chevron($govuk-link-hover-colour, true);
|
392
|
+
}
|
393
|
+
}
|
394
|
+
}
|
395
|
+
|
396
|
+
&:focus {
|
397
|
+
&:before {
|
398
|
+
@include chevron($govuk-focus-text-colour, true);
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
@include govuk-media-query($from: "desktop") {
|
403
|
+
&:after {
|
404
|
+
@include pseudo-underline;
|
391
405
|
}
|
392
406
|
|
393
|
-
@include
|
394
|
-
|
407
|
+
@include focus-not-focus-visible {
|
408
|
+
color: govuk-colour("white");
|
409
|
+
float: left;
|
410
|
+
font-size: 16px;
|
411
|
+
font-size: govuk-px-to-rem(16px);
|
412
|
+
height: govuk-spacing(9);
|
413
|
+
padding: govuk-spacing(4);
|
414
|
+
position: relative;
|
415
|
+
text-decoration: none;
|
416
|
+
|
417
|
+
&:before {
|
418
|
+
@include chevron(govuk-colour("white"), true);
|
419
|
+
}
|
420
|
+
}
|
421
|
+
@include focus-not-focus-visible {
|
422
|
+
&:hover {
|
423
|
+
color: govuk-colour("mid-grey");
|
424
|
+
text-decoration: none;
|
425
|
+
|
426
|
+
&:after {
|
427
|
+
background: govuk-colour("mid-grey");
|
428
|
+
}
|
429
|
+
|
430
|
+
&:before {
|
431
|
+
@include chevron(govuk-colour("mid-grey"), true);
|
432
|
+
}
|
433
|
+
}
|
434
|
+
}
|
435
|
+
|
436
|
+
@include focus-and-focus-visible {
|
437
|
+
color: $govuk-focus-text-colour;
|
438
|
+
|
439
|
+
&:after {
|
440
|
+
background: $govuk-focus-text-colour;
|
441
|
+
}
|
442
|
+
|
443
|
+
&:before {
|
444
|
+
@include chevron($govuk-focus-text-colour, true);
|
445
|
+
}
|
446
|
+
}
|
447
|
+
}
|
448
|
+
|
449
|
+
&.gem-c-layout-super-navigation-header__open-button {
|
450
|
+
@include focus-not-focus-visible {
|
451
|
+
&:before {
|
452
|
+
transform: translateY(0) rotate(225deg);
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
@include govuk-media-query($from: "desktop") {
|
457
|
+
@include focus-not-focus-visible {
|
458
|
+
background: govuk-colour("light-grey");
|
459
|
+
color: $govuk-link-colour;
|
460
|
+
|
461
|
+
&:before {
|
462
|
+
@include chevron($govuk-link-colour, true);
|
463
|
+
}
|
464
|
+
|
465
|
+
&:after {
|
466
|
+
background-color: $govuk-link-colour;
|
467
|
+
}
|
468
|
+
}
|
469
|
+
|
470
|
+
@include focus-and-focus-visible {
|
471
|
+
background-color: $govuk-focus-colour;
|
472
|
+
color: $govuk-focus-text-colour;
|
473
|
+
|
474
|
+
&:before {
|
475
|
+
@include chevron($govuk-focus-text-colour, true);
|
476
|
+
}
|
477
|
+
|
478
|
+
&:after {
|
479
|
+
background: $govuk-focus-text-colour;
|
480
|
+
}
|
481
|
+
}
|
395
482
|
}
|
396
483
|
}
|
397
484
|
}
|
398
485
|
|
399
486
|
// Search link and dropdown.
|
400
487
|
.gem-c-layout-super-navigation-header__search-item-link {
|
401
|
-
|
488
|
+
&:link,
|
489
|
+
&:visited {
|
490
|
+
@include govuk-media-query($from: "desktop") {
|
491
|
+
background: $govuk-brand-colour;
|
402
492
|
|
403
|
-
|
404
|
-
|
405
|
-
margin-left: 0;
|
493
|
+
&:hover {
|
494
|
+
background: none;
|
406
495
|
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
496
|
+
&:before {
|
497
|
+
left: 0;
|
498
|
+
right: 0;
|
499
|
+
}
|
500
|
+
}
|
411
501
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
502
|
+
&:focus {
|
503
|
+
background: $govuk-focus-colour;
|
504
|
+
|
505
|
+
&:before {
|
506
|
+
content: none;
|
507
|
+
}
|
508
|
+
}
|
416
509
|
}
|
417
510
|
}
|
418
511
|
}
|
@@ -423,18 +516,17 @@ $search-icon-size: 20px;
|
|
423
516
|
}
|
424
517
|
}
|
425
518
|
|
426
|
-
.gem-c-layout-super-navigation-header__search-item-link-icon
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
display: block;
|
432
|
-
}
|
519
|
+
.gem-c-layout-super-navigation-header__search-item-link-icon,
|
520
|
+
.gem-c-layout-super-navigation-header__search-toggle-button-link-icon {
|
521
|
+
height: $icon-size;
|
522
|
+
pointer-events: none;
|
523
|
+
width: $icon-size;
|
433
524
|
}
|
434
525
|
|
435
|
-
.gem-c-layout-super-navigation-header__search-
|
436
|
-
@
|
437
|
-
|
526
|
+
.gem-c-layout-super-navigation-header__search-item-link-icon {
|
527
|
+
@include govuk-media-query($until: "desktop") {
|
528
|
+
@include govuk-visually-hidden;
|
529
|
+
}
|
438
530
|
}
|
439
531
|
|
440
532
|
// Search and popular content dropdown.
|
@@ -450,223 +542,189 @@ $search-icon-size: 20px;
|
|
450
542
|
|
451
543
|
// Styles for top level navigation toggle button.
|
452
544
|
.gem-c-layout-super-navigation-header__navigation-top-toggle-button {
|
453
|
-
@
|
454
|
-
|
545
|
+
@include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
|
546
|
+
background: govuk-colour("black");
|
547
|
+
border: 0;
|
548
|
+
border-left: 1px solid govuk-colour("white");
|
549
|
+
border-right: 1px solid govuk-colour("white");
|
550
|
+
box-sizing: border-box;
|
455
551
|
color: govuk-colour("white");
|
552
|
+
cursor: pointer;
|
553
|
+
height: govuk-spacing(9);
|
554
|
+
margin-right: -1px;
|
555
|
+
padding: govuk-spacing(4);
|
456
556
|
position: absolute;
|
457
|
-
right:
|
458
|
-
|
459
|
-
&.gem-c-layout-super-navigation-header__open-button {
|
460
|
-
border-top-color: govuk-colour("black");
|
461
|
-
}
|
557
|
+
right: (govuk-spacing(9) - govuk-spacing(3));
|
558
|
+
top: 0;
|
462
559
|
|
463
560
|
@include govuk-media-query($from: 360px) {
|
464
|
-
|
465
|
-
@include chevron("white");
|
466
|
-
}
|
467
|
-
}
|
561
|
+
right: govuk-spacing(9);
|
468
562
|
|
469
|
-
&:focus {
|
470
563
|
&:before {
|
471
|
-
|
564
|
+
@include chevron(govuk-colour("white"));
|
472
565
|
}
|
473
566
|
}
|
474
567
|
|
475
|
-
@include
|
476
|
-
|
477
|
-
|
568
|
+
@include focus-and-focus-visible {
|
569
|
+
@include govuk-focused-text;
|
570
|
+
border-color: $govuk-focus-colour;
|
571
|
+
box-shadow: none;
|
572
|
+
z-index: 10;
|
478
573
|
|
479
|
-
|
480
|
-
|
574
|
+
@include govuk-media-query($from: 360px) {
|
575
|
+
&:before {
|
576
|
+
@include chevron(govuk-colour("black"), true);
|
577
|
+
}
|
578
|
+
}
|
481
579
|
}
|
482
|
-
}
|
483
580
|
|
484
|
-
// styles for
|
485
|
-
.
|
486
|
-
@
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
right: (0 - govuk-spacing(3));
|
492
|
-
|
493
|
-
&:after {
|
494
|
-
background-color: $govuk-link-colour;
|
495
|
-
content: " ";
|
496
|
-
left: 0;
|
497
|
-
right: 0;
|
498
|
-
}
|
581
|
+
// Undoes the :focus styles *only* for browsers that support :focus-visible.
|
582
|
+
// See https://www.tpgi.com/focus-visible-and-backwards-compatibility/
|
583
|
+
@include focus-not-focus-visible {
|
584
|
+
background: none;
|
585
|
+
border-color: govuk-colour("white");
|
586
|
+
box-shadow: none;
|
587
|
+
color: govuk-colour("white");
|
499
588
|
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
border-top-color: $govuk-focus-colour;
|
589
|
+
@include govuk-media-query($from: 360px) {
|
590
|
+
&:before {
|
591
|
+
@include chevron(govuk-colour("white"), true);
|
592
|
+
}
|
505
593
|
}
|
506
594
|
}
|
507
595
|
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
height: govuk-spacing(9);
|
516
|
-
margin-left: govuk-spacing(3);
|
517
|
-
padding: govuk-spacing(4);
|
518
|
-
position: relative;
|
519
|
-
float: right;
|
520
|
-
|
521
|
-
&.gem-c-layout-super-navigation-header__open-button {
|
522
|
-
border-top-color: govuk-colour("black");
|
596
|
+
// Open button modifier
|
597
|
+
&.gem-c-layout-super-navigation-header__open-button {
|
598
|
+
@include focus-and-focus-visible {
|
599
|
+
@include govuk-focused-text;
|
600
|
+
border-color: $govuk-focus-colour;
|
601
|
+
box-shadow: none;
|
602
|
+
color: $govuk-focus-colour;
|
523
603
|
|
524
|
-
|
525
|
-
|
604
|
+
@include govuk-media-query($from: 360px) {
|
605
|
+
&:before {
|
606
|
+
@include chevron($govuk-focus-colour, true);
|
607
|
+
}
|
526
608
|
}
|
527
609
|
}
|
528
610
|
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
// One solution is to use `@media(hover: hover)`. This turns on the hover
|
533
|
-
// state only for devices that aren't touchscreen, but means that browsers
|
534
|
-
// that don't support this media query won't get a hover state at all.
|
535
|
-
//
|
536
|
-
// To get around this, we do the opposite - we turn off the hover state for
|
537
|
-
// for touchscreen devices.
|
538
|
-
@media (hover: none), (pointer: coarse) {
|
539
|
-
&:not(:focus):hover {
|
540
|
-
background-color: $govuk-link-colour;
|
541
|
-
color: govuk-colour("white");
|
611
|
+
@include focus-not-focus-visible {
|
612
|
+
background: govuk-colour("light-grey");
|
613
|
+
color: govuk-colour("light-grey");
|
542
614
|
|
543
|
-
|
544
|
-
|
615
|
+
@include govuk-media-query($from: 360px) {
|
616
|
+
&:before {
|
617
|
+
@include chevron(govuk-colour("light-grey"));
|
545
618
|
}
|
546
619
|
}
|
547
620
|
}
|
548
621
|
}
|
549
622
|
}
|
550
623
|
|
551
|
-
//
|
552
|
-
.gem-c-layout-super-navigation-
|
553
|
-
@
|
554
|
-
|
624
|
+
// Styles for search toggle button.
|
625
|
+
.gem-c-layout-super-navigation-header__search-toggle-button {
|
626
|
+
@include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
|
627
|
+
background: govuk-colour("black");
|
555
628
|
border: 0;
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
629
|
+
border-left: 1px solid govuk-colour("white");
|
630
|
+
color: govuk-colour("white");
|
631
|
+
cursor: pointer;
|
632
|
+
height: govuk-spacing(9);
|
633
|
+
padding: govuk-spacing(4);
|
634
|
+
position: absolute;
|
635
|
+
right: (0 - govuk-spacing(3));
|
636
|
+
top: 0;
|
637
|
+
width: govuk-spacing(9);
|
562
638
|
|
563
|
-
|
564
|
-
@include
|
639
|
+
@include focus-and-focus-visible {
|
640
|
+
@include govuk-focused-text;
|
641
|
+
border-color: $govuk-focus-colour;
|
642
|
+
box-shadow: none;
|
565
643
|
}
|
566
644
|
|
567
|
-
|
568
|
-
|
569
|
-
color:
|
570
|
-
|
571
|
-
|
572
|
-
color: govuk-colour("white");
|
573
|
-
}
|
645
|
+
&:focus:not(:focus-visible) {
|
646
|
+
background: none;
|
647
|
+
border-color: govuk-colour("white");
|
648
|
+
box-shadow: none;
|
649
|
+
color: govuk-colour("white");
|
574
650
|
}
|
575
651
|
|
576
|
-
@include govuk-media-query($from:
|
577
|
-
|
652
|
+
@include govuk-media-query($from: 360px) {
|
653
|
+
right: 0;
|
578
654
|
}
|
579
655
|
|
580
656
|
@include govuk-media-query($from: "desktop") {
|
581
|
-
@include
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
position: relative;
|
587
|
-
|
588
|
-
&:before {
|
589
|
-
border-color: govuk-colour("white");
|
657
|
+
@include focus-not-focus-visible {
|
658
|
+
background: $govuk-brand-colour;
|
659
|
+
border-bottom: govuk-spacing(1) solid $govuk-brand-colour;
|
660
|
+
border-left: none;
|
661
|
+
position: relative;
|
590
662
|
}
|
591
663
|
|
592
664
|
&:hover {
|
665
|
+
background: govuk-colour("black");
|
666
|
+
border-bottom-color: govuk-colour("mid-grey");
|
593
667
|
color: govuk-colour("mid-grey");
|
594
|
-
|
595
|
-
&:after {
|
596
|
-
background-color: govuk-colour("mid-grey");
|
597
|
-
}
|
598
|
-
|
599
|
-
&:before {
|
600
|
-
border-color: govuk-colour("mid-grey");
|
601
|
-
}
|
602
668
|
}
|
603
669
|
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
background-color: $govuk-focus-text-colour;
|
609
|
-
}
|
610
|
-
|
611
|
-
&:before {
|
612
|
-
border-color: $govuk-focus-text-colour;
|
613
|
-
}
|
670
|
+
@include focus-and-focus-visible {
|
671
|
+
@include govuk-focused-text;
|
672
|
+
border-bottom-color: $govuk-focus-colour;
|
673
|
+
box-shadow: none;
|
614
674
|
}
|
615
675
|
}
|
616
676
|
|
677
|
+
// Open button modifier
|
617
678
|
&.gem-c-layout-super-navigation-header__open-button {
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
@include govuk-media-query($from: "desktop") {
|
625
|
-
background-color: govuk-colour("light-grey");
|
626
|
-
color: $govuk-link-colour;
|
627
|
-
|
628
|
-
&:after {
|
629
|
-
background: $govuk-link-colour;
|
630
|
-
}
|
631
|
-
|
632
|
-
&:before {
|
633
|
-
border-color: $govuk-link-colour;
|
634
|
-
}
|
635
|
-
|
636
|
-
&:focus {
|
637
|
-
background-color: $govuk-focus-colour;
|
638
|
-
color: $govuk-focus-text-colour;
|
639
|
-
|
640
|
-
&:after {
|
641
|
-
background-color: $govuk-focus-text-colour;
|
642
|
-
}
|
679
|
+
@include focus-and-focus-visible {
|
680
|
+
@include govuk-focused-text;
|
681
|
+
border-color: $govuk-focus-colour;
|
682
|
+
box-shadow: none;
|
683
|
+
color: $govuk-focus-colour;
|
643
684
|
|
685
|
+
@include govuk-media-query($from: 360px) {
|
644
686
|
&:before {
|
645
|
-
|
687
|
+
@include chevron($govuk-focus-colour, true);
|
646
688
|
}
|
647
689
|
}
|
690
|
+
}
|
648
691
|
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
&:before {
|
654
|
-
border-color: $govuk-link-colour;
|
655
|
-
}
|
656
|
-
}
|
692
|
+
@include focus-not-focus-visible {
|
693
|
+
background: govuk-colour("light-grey");
|
694
|
+
border-bottom-color: govuk-colour("light-grey");
|
695
|
+
color: govuk-colour("light-grey");
|
657
696
|
}
|
658
697
|
}
|
659
698
|
}
|
660
699
|
|
700
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon {
|
701
|
+
color: $govuk-text-colour;
|
702
|
+
display: none;
|
703
|
+
font-size: 36px;
|
704
|
+
font-weight: normal;
|
705
|
+
left: 0;
|
706
|
+
line-height: 22px;
|
707
|
+
padding: govuk-spacing(4) 0;
|
708
|
+
pointer-events: none;
|
709
|
+
position: absolute;
|
710
|
+
right: 0;
|
711
|
+
text-align: center;
|
712
|
+
top: 0;
|
713
|
+
|
714
|
+
.gem-c-layout-super-navigation-header__open-button & {
|
715
|
+
display: block;
|
716
|
+
}
|
717
|
+
}
|
718
|
+
|
661
719
|
// Dropdown menu.
|
662
720
|
.gem-c-layout-super-navigation-header__navigation-dropdown-menu {
|
663
|
-
background: govuk-colour("
|
721
|
+
background: govuk-colour("light-grey");
|
664
722
|
|
665
723
|
@include govuk-media-query($from: "desktop") {
|
666
|
-
background: govuk-colour("light-grey");
|
667
724
|
left: 0;
|
668
725
|
position: absolute;
|
669
726
|
right: 0;
|
727
|
+
top: govuk-spacing(9);
|
670
728
|
}
|
671
729
|
}
|
672
730
|
|
@@ -682,7 +740,12 @@ $search-icon-size: 20px;
|
|
682
740
|
|
683
741
|
// Dropdown menu items.
|
684
742
|
.gem-c-layout-super-navigation-header__dropdown-list-item {
|
743
|
+
margin: 0 0 0 $chevron-indent-spacing;
|
744
|
+
padding: govuk-spacing(2) 0;
|
745
|
+
position: relative;
|
746
|
+
|
685
747
|
@include govuk-media-query($from: "desktop") {
|
748
|
+
margin: 0;
|
686
749
|
padding: govuk-spacing(2) 0;
|
687
750
|
}
|
688
751
|
}
|
@@ -720,11 +783,11 @@ $search-icon-size: 20px;
|
|
720
783
|
}
|
721
784
|
|
722
785
|
.gem-c-layout-super-navigation-header__navigation-second-item-link {
|
723
|
-
|
724
|
-
|
786
|
+
&:after {
|
787
|
+
@include make-selectable-area-bigger;
|
788
|
+
}
|
725
789
|
|
726
790
|
@include govuk-media-query($from: "desktop") {
|
727
|
-
display: inline;
|
728
791
|
font-weight: bold;
|
729
792
|
padding: 0;
|
730
793
|
}
|
@@ -732,8 +795,8 @@ $search-icon-size: 20px;
|
|
732
795
|
|
733
796
|
.gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
|
734
797
|
@include govuk-font($size: 19, $weight: bold);
|
735
|
-
margin-top: govuk-spacing(2);
|
736
798
|
margin-bottom: 0;
|
799
|
+
margin-top: govuk-spacing(2);
|
737
800
|
}
|
738
801
|
|
739
802
|
// Dropdown menu footer links.
|
@@ -754,11 +817,14 @@ $search-icon-size: 20px;
|
|
754
817
|
}
|
755
818
|
|
756
819
|
.gem-c-layout-super-navigation-header__navigation-second-footer-item {
|
820
|
+
padding: govuk-spacing(2) 0 govuk-spacing(2) $chevron-indent-spacing;
|
821
|
+
position: relative;
|
822
|
+
|
757
823
|
@include govuk-media-query($from: "desktop") {
|
758
824
|
box-sizing: border-box;
|
759
825
|
float: left;
|
760
|
-
width: 50%;
|
761
826
|
padding: 0 govuk-spacing(3);
|
827
|
+
width: 50%;
|
762
828
|
}
|
763
829
|
}
|
764
830
|
|
@@ -766,7 +832,10 @@ $search-icon-size: 20px;
|
|
766
832
|
@include govuk-font($size: 19, $weight: bold);
|
767
833
|
display: inline-block;
|
768
834
|
margin: govuk-spacing(1) 0;
|
769
|
-
|
835
|
+
|
836
|
+
&:after {
|
837
|
+
@include make-selectable-area-bigger;
|
838
|
+
}
|
770
839
|
|
771
840
|
@include govuk-media-query($from: "desktop") {
|
772
841
|
display: inline;
|
@@ -791,7 +860,6 @@ $search-icon-size: 20px;
|
|
791
860
|
left: 0;
|
792
861
|
position: absolute;
|
793
862
|
right: 0;
|
794
|
-
top: 60px;
|
795
863
|
}
|
796
864
|
}
|
797
865
|
}
|
@@ -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="0 0 132 97"
|
41
|
+
width="36"
|
37
42
|
xmlns="http://www.w3.org/2000/svg"
|
38
|
-
|
39
|
-
<path
|
43
|
+
>
|
44
|
+
<path
|
45
|
+
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"
|
46
|
+
fill="currentColor"
|
40
47
|
fill-rule="evenodd"
|
41
|
-
|
48
|
+
>
|
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,38 @@
|
|
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
|
-
|
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
|
+
<%= content_tag(:button, link[:label], {
|
117
|
+
aria: {
|
118
|
+
controls: "super-navigation-menu__section-#{unique_id}",
|
119
|
+
expanded: false,
|
120
|
+
label: show_menu_text,
|
121
|
+
},
|
122
|
+
class: "gem-c-layout-super-navigation-header__navigation-second-toggle-button",
|
123
|
+
data: {
|
124
|
+
text_for_hide: hide_menu_text,
|
125
|
+
text_for_show: show_menu_text,
|
126
|
+
toggle_desktop_group: "top",
|
127
|
+
toggle_mobile_group: "second",
|
128
|
+
tracking_key: tracking_label,
|
129
|
+
},
|
130
|
+
hidden: true,
|
131
|
+
id: "super-navigation-menu__section-#{unique_id}-toggle",
|
132
|
+
type: "button",
|
133
|
+
}) if has_children %>
|
134
|
+
</div>
|
103
135
|
<% if has_children %>
|
104
|
-
<button
|
105
|
-
aria-controls="super-navigation-menu__section-<%= unique_id %>"
|
106
|
-
aria-expanded="false"
|
107
|
-
aria-label="<%= show_menu_text %>"
|
108
|
-
class="gem-c-layout-super-navigation-header__navigation-second-toggle-button"
|
109
|
-
data-text-for-hide="<%= hide_menu_text %>"
|
110
|
-
data-text-for-show="<%= show_menu_text %>"
|
111
|
-
data-toggle-desktop-group="top"
|
112
|
-
data-toggle-mobile-group="second"
|
113
|
-
data-tracking-key="<%= tracking_label %>"
|
114
|
-
hidden
|
115
|
-
id="super-navigation-menu__section-<%= unique_id %>-toggle"
|
116
|
-
type="button"
|
117
|
-
>
|
118
|
-
<%= link[:label] %>
|
119
|
-
</button>
|
120
136
|
<div
|
121
137
|
hidden
|
122
138
|
class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
|
@@ -152,7 +168,7 @@
|
|
152
168
|
track_dimension_index: "29",
|
153
169
|
}
|
154
170
|
} %>
|
155
|
-
<%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
|
171
|
+
<%= tag.p item[:description], class: "govuk-body govuk-!-margin-0 govuk-!-margin-top-1" if has_description %>
|
156
172
|
</li>
|
157
173
|
<% end %>
|
158
174
|
</ul>
|
@@ -214,9 +230,17 @@
|
|
214
230
|
<%= search_text %>
|
215
231
|
</span>
|
216
232
|
<%=
|
217
|
-
render "govuk_publishing_components/components/search/search_icon",
|
218
|
-
classes: %
|
233
|
+
render "govuk_publishing_components/components/search/search_icon", {
|
234
|
+
classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon],
|
235
|
+
}
|
219
236
|
%>
|
237
|
+
<span
|
238
|
+
aria-hidden="true"
|
239
|
+
class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon"
|
240
|
+
focusable="false"
|
241
|
+
>
|
242
|
+
×
|
243
|
+
</span>
|
220
244
|
</button>
|
221
245
|
|
222
246
|
<div id="super-search-menu" class="gem-c-layout-super-navigation-header__search-items">
|
@@ -243,14 +267,16 @@
|
|
243
267
|
cy="10.0161"
|
244
268
|
r="8.51613"
|
245
269
|
stroke="currentColor"
|
246
|
-
stroke-width="3"
|
270
|
+
stroke-width="3"
|
271
|
+
/>
|
247
272
|
<line
|
248
273
|
x1="15.8668"
|
249
274
|
y1="16.3587"
|
250
275
|
x2="25.4475"
|
251
276
|
y2="25.9393"
|
252
277
|
stroke="currentColor"
|
253
|
-
stroke-width="3"
|
278
|
+
stroke-width="3"
|
279
|
+
/>
|
254
280
|
</svg>
|
255
281
|
</a>
|
256
282
|
</div>
|
@@ -288,16 +314,20 @@
|
|
288
314
|
<ul class="govuk-list">
|
289
315
|
<% popular_links.each do | popular_link | %>
|
290
316
|
<li class="gem-c-layout-super-navigation-header__popular-item">
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
data
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
317
|
+
<%= link_to popular_link[:label], popular_link[:href], {
|
318
|
+
class: [
|
319
|
+
"govuk-link",
|
320
|
+
"gem-c-layout-super-navigation-header__popular-link",
|
321
|
+
],
|
322
|
+
data: {
|
323
|
+
module: "gem-track-click",
|
324
|
+
track_action: "popularLink",
|
325
|
+
track_category: "headerClicked",
|
326
|
+
track_label: popular_link[:href],
|
327
|
+
track_dimension: popular_link[:label],
|
328
|
+
track_dimension_index: "29",
|
329
|
+
}
|
330
|
+
} %>
|
301
331
|
</li>
|
302
332
|
<% end %>
|
303
333
|
</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"
|