govuk_publishing_components 35.17.0 → 35.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +5 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +14 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +154 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +1 -0
- data/app/models/govuk_publishing_components/audit_applications.rb +4 -4
- data/app/models/govuk_publishing_components/audit_comparer.rb +5 -5
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_govspeak.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +11 -4
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +154 -76
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +3 -4
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +5 -0
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +29 -0
- data/app/views/govuk_publishing_components/components/layout_for_public/_layout_super_navigation_header_homepage.html.erb +11 -0
- data/lib/govuk_publishing_components/presenters/attachment_helper.rb +1 -1
- data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_item.rb +1 -1
- data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +6 -0
- data/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb +0 -2
- data/lib/govuk_publishing_components/presenters/devolved_nations_helper.rb +2 -2
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +6 -2
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +1 -1
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.js +679 -11
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/locales/ja.json +12 -12
- data/node_modules/axe-core/package.json +1 -1
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6d8b36d61c9301cb5d969679a14c93b6b43914a3a734d05e4ae5702b0fb0f79
|
4
|
+
data.tar.gz: 49e458e28c81c1368445b4e9948aa31614ec2a506f9f989083780a0ce6de885d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 107aa5aee8b2c2c8268342683df0405cc071ada39032d723fd21299a0af1abc6bec4bb5fb7d89879775780bccc32d27b1ac9eb375e28cda218d0016b8cb843d1
|
7
|
+
data.tar.gz: 994233cc78dcaa2ce4a604f3cb2d3be54582bfcfa40b6df323929a808d8d7d56e30e6c1403422a71968d399e27dc6141534f49af06f5713198db721b91d461a1
|
@@ -335,6 +335,11 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
335
335
|
}
|
336
336
|
} else {
|
337
337
|
for (var i = 0; i < items.length; i++) {
|
338
|
+
// GA4 limits us to 200 items, so we should limit the array to this size.
|
339
|
+
if (i === 200) {
|
340
|
+
break
|
341
|
+
}
|
342
|
+
|
338
343
|
var item = items[i]
|
339
344
|
var path = item.getAttribute('data-ga4-ecommerce-path')
|
340
345
|
|
@@ -9,6 +9,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
9
9
|
this.trackingTrigger = 'data-ga4-form' // elements with this attribute get tracked
|
10
10
|
this.includeTextInputValues = this.module.hasAttribute('data-ga4-form-include-text')
|
11
11
|
this.redacted = false
|
12
|
+
this.useFallbackValue = this.module.hasAttribute('data-ga4-form-no-answer-undefined') ? undefined : 'No answer given'
|
12
13
|
}
|
13
14
|
|
14
15
|
Ga4FormTracker.prototype.init = function () {
|
@@ -43,7 +44,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
43
44
|
|
44
45
|
var formInputs = this.getFormInputs()
|
45
46
|
var formData = this.getInputValues(formInputs)
|
46
|
-
data.text = data.text ||
|
47
|
+
data.text = data.text || this.combineGivenAnswers(formData) || this.useFallbackValue
|
47
48
|
|
48
49
|
if (data.action === 'search') {
|
49
50
|
data.text = data.text.toLowerCase()
|
@@ -20,6 +20,7 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
20
20
|
referrer: this.getReferrer(referrer),
|
21
21
|
title: this.getTitle(),
|
22
22
|
status_code: this.getStatusCode(),
|
23
|
+
viewport_size: this.getViewPort(),
|
23
24
|
|
24
25
|
ab_test: this.getMetaContent('ab-test'),
|
25
26
|
document_type: this.getMetaContent('format'),
|
@@ -89,6 +90,8 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
89
90
|
}
|
90
91
|
|
91
92
|
searchTerm = searchTerm[0].replace('keywords=', '')
|
93
|
+
searchTerm = searchTerm.replace(/\++/g, ' ')
|
94
|
+
searchTerm = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(searchTerm)
|
92
95
|
searchTerm = this.PIIRemover.stripPIIWithOverride(searchTerm, true, true)
|
93
96
|
return searchTerm
|
94
97
|
},
|
@@ -129,10 +132,20 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
129
132
|
}
|
130
133
|
},
|
131
134
|
|
135
|
+
getViewPort: function () {
|
136
|
+
var vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0)
|
137
|
+
var vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
|
138
|
+
return vw + 'x' + vh
|
139
|
+
},
|
140
|
+
|
132
141
|
getMetaContent: function (name) {
|
133
142
|
var tag = document.querySelector('meta[name="govuk:' + name + '"]')
|
134
143
|
if (tag) {
|
135
|
-
|
144
|
+
var contentAttribute = tag.getAttribute('content')
|
145
|
+
if (contentAttribute === '') {
|
146
|
+
return undefined
|
147
|
+
}
|
148
|
+
return contentAttribute
|
136
149
|
} else {
|
137
150
|
return this.nullValue
|
138
151
|
}
|
@@ -14,8 +14,8 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
|
|
14
14
|
@include govuk-clearfix;
|
15
15
|
position: relative;
|
16
16
|
|
17
|
-
.govuk-
|
18
|
-
|
17
|
+
.govuk-details {
|
18
|
+
margin: govuk-spacing(3) 0;
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
@@ -8,6 +8,10 @@ $search-width-or-height: $black-bar-height;
|
|
8
8
|
$pseudo-underline-height: 3px;
|
9
9
|
$button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
|
10
10
|
|
11
|
+
$large-navbar-height: 86px;
|
12
|
+
|
13
|
+
$pale-blue-colour: #d2e2f1;
|
14
|
+
|
11
15
|
$after-link-padding: govuk-spacing(4);
|
12
16
|
$after-button-padding-right: govuk-spacing(4);
|
13
17
|
$after-button-padding-left: govuk-spacing(4);
|
@@ -89,6 +93,11 @@ $after-button-padding-left: govuk-spacing(4);
|
|
89
93
|
}
|
90
94
|
}
|
91
95
|
|
96
|
+
.gem-c-layout-super-navigation-header--blue-background {
|
97
|
+
background: $govuk-brand-colour;
|
98
|
+
border-top: 1px solid $govuk-brand-colour;
|
99
|
+
}
|
100
|
+
|
92
101
|
.gem-c-layout-super-navigation-header__container {
|
93
102
|
position: relative;
|
94
103
|
}
|
@@ -128,7 +137,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
128
137
|
|
129
138
|
.gem-c-layout-super-navigation-header__navigation-item,
|
130
139
|
.gem-c-layout-super-navigation-header__search-item {
|
131
|
-
background: govuk-colour("black");
|
132
140
|
display: block;
|
133
141
|
float: left;
|
134
142
|
margin: 0;
|
@@ -205,6 +213,17 @@ $after-button-padding-left: govuk-spacing(4);
|
|
205
213
|
}
|
206
214
|
}
|
207
215
|
|
216
|
+
&.gem-c-layout-super-navigation-header__navigation-item-link--blue-background,
|
217
|
+
&.gem-c-layout-super-navigation-header__search-item-link--blue-background {
|
218
|
+
&:hover {
|
219
|
+
color: govuk-colour("white");
|
220
|
+
|
221
|
+
&::after {
|
222
|
+
background: govuk-colour("white");
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
208
227
|
@include focus-and-focus-visible {
|
209
228
|
.gem-c-layout-super-navigation-header__navigation-item-link-inner {
|
210
229
|
border-color: $govuk-focus-colour;
|
@@ -267,6 +286,17 @@ $after-button-padding-left: govuk-spacing(4);
|
|
267
286
|
}
|
268
287
|
}
|
269
288
|
|
289
|
+
// to stop the black underline appearing underneath the menu
|
290
|
+
// after it has been toggled closed if the blue background has
|
291
|
+
// been enabled
|
292
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button.gem-c-layout-super-navigation-header__navigation-top-toggle-button--blue-background {
|
293
|
+
&:focus:not(:focus-visible) {
|
294
|
+
&::after {
|
295
|
+
background: none;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
|
270
300
|
.gem-c-layout-super-navigation-header__navigation-item-link {
|
271
301
|
@include govuk-media-query($from: "desktop") {
|
272
302
|
padding: govuk-spacing(3) 0;
|
@@ -279,11 +309,15 @@ $after-button-padding-left: govuk-spacing(4);
|
|
279
309
|
}
|
280
310
|
|
281
311
|
.gem-c-layout-super-navigation-header__navigation-item-link-inner {
|
282
|
-
background-color: govuk-colour("black");
|
283
312
|
border-left: 1px solid $button-pipe-colour;
|
284
313
|
padding: govuk-spacing(1) $after-link-padding;
|
285
314
|
}
|
286
315
|
|
316
|
+
.gem-c-layout-super-navigation-header__navigation-item-link-inner--blue-background {
|
317
|
+
border-left: 0;
|
318
|
+
border-right: 1px solid $pale-blue-colour;
|
319
|
+
}
|
320
|
+
|
287
321
|
// Search link and dropdown.
|
288
322
|
.gem-c-layout-super-navigation-header__search-item-link {
|
289
323
|
padding: govuk-spacing(3);
|
@@ -297,8 +331,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
297
331
|
background: $govuk-brand-colour;
|
298
332
|
|
299
333
|
&:hover {
|
300
|
-
background: govuk-colour("black");
|
301
|
-
|
302
334
|
&::before {
|
303
335
|
left: 0;
|
304
336
|
right: 0;
|
@@ -321,10 +353,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
321
353
|
|
322
354
|
@include focus-not-focus-visible {
|
323
355
|
background: $govuk-link-colour;
|
324
|
-
|
325
|
-
&:hover {
|
326
|
-
background: govuk-colour("black");
|
327
|
-
}
|
328
356
|
}
|
329
357
|
|
330
358
|
@include focus-and-focus-visible {
|
@@ -347,6 +375,10 @@ $after-button-padding-left: govuk-spacing(4);
|
|
347
375
|
width: 21px;
|
348
376
|
}
|
349
377
|
|
378
|
+
.gem-c-layout-super-navigation-header__open-button .gem-c-layout-super-navigation-header__search-toggle-button-link-icon {
|
379
|
+
display: none;
|
380
|
+
}
|
381
|
+
|
350
382
|
// Search and popular content dropdown.
|
351
383
|
.gem-c-layout-super-navigation-header__search-and-popular {
|
352
384
|
display: none;
|
@@ -472,15 +504,23 @@ $after-button-padding-left: govuk-spacing(4);
|
|
472
504
|
.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
|
473
505
|
border-color: $button-pipe-colour;
|
474
506
|
|
507
|
+
&.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner--blue-background {
|
508
|
+
border-color: $pale-blue-colour;
|
509
|
+
}
|
510
|
+
|
475
511
|
@include govuk-media-query($from: 360px) {
|
476
512
|
&::before {
|
477
513
|
@include chevron(govuk-colour("white"), true);
|
478
514
|
}
|
479
515
|
}
|
480
516
|
}
|
517
|
+
|
481
518
|
// stylelint-enable max-nesting-depth
|
482
519
|
}
|
520
|
+
}
|
483
521
|
|
522
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button.gem-c-layout-super-navigation-header__navigation-top-toggle-button--blue-background,
|
523
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button {
|
484
524
|
// Open button modifier
|
485
525
|
&.gem-c-layout-super-navigation-header__open-button {
|
486
526
|
// stylelint-disable max-nesting-depth
|
@@ -528,6 +568,24 @@ $after-button-padding-left: govuk-spacing(4);
|
|
528
568
|
}
|
529
569
|
}
|
530
570
|
|
571
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button--blue-background {
|
572
|
+
@include focus-not-focus-visible {
|
573
|
+
&:hover {
|
574
|
+
&::after {
|
575
|
+
background: govuk-colour("white");
|
576
|
+
}
|
577
|
+
|
578
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
|
579
|
+
color: govuk-colour("white");
|
580
|
+
|
581
|
+
&::before {
|
582
|
+
border-color: govuk-colour("white");
|
583
|
+
}
|
584
|
+
}
|
585
|
+
}
|
586
|
+
}
|
587
|
+
}
|
588
|
+
|
531
589
|
.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
|
532
590
|
display: inline-block;
|
533
591
|
border-left: 1px solid govuk-colour("white");
|
@@ -542,6 +600,10 @@ $after-button-padding-left: govuk-spacing(4);
|
|
542
600
|
}
|
543
601
|
}
|
544
602
|
|
603
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner--no-left-border {
|
604
|
+
border-left: 0;
|
605
|
+
}
|
606
|
+
|
545
607
|
// Styles for search toggle button.
|
546
608
|
.gem-c-layout-super-navigation-header__search-toggle-button {
|
547
609
|
@include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
|
@@ -580,11 +642,32 @@ $after-button-padding-left: govuk-spacing(4);
|
|
580
642
|
}
|
581
643
|
|
582
644
|
&:hover {
|
583
|
-
background: govuk-colour("black");
|
584
645
|
border-bottom: $pseudo-underline-height solid govuk-colour("mid-grey");
|
585
646
|
color: govuk-colour("mid-grey");
|
586
647
|
}
|
587
648
|
|
649
|
+
&.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
|
650
|
+
&:hover {
|
651
|
+
border-bottom: $pseudo-underline-height solid govuk-colour("white");
|
652
|
+
color: govuk-colour("white");
|
653
|
+
}
|
654
|
+
|
655
|
+
// stylelint-disable max-nesting-depth
|
656
|
+
@include focus-not-focus-visible {
|
657
|
+
border-bottom: none;
|
658
|
+
}
|
659
|
+
// stylelint-enable max-nesting-depth
|
660
|
+
}
|
661
|
+
|
662
|
+
&:focus-visible {
|
663
|
+
&.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
|
664
|
+
&:hover {
|
665
|
+
border-bottom: $pseudo-underline-height solid $govuk-focus-colour;
|
666
|
+
color: govuk-colour("black");
|
667
|
+
}
|
668
|
+
}
|
669
|
+
}
|
670
|
+
|
588
671
|
@include focus-and-focus-visible {
|
589
672
|
@include govuk-focused-text;
|
590
673
|
border-bottom-color: $govuk-focus-colour;
|
@@ -594,6 +677,13 @@ $after-button-padding-left: govuk-spacing(4);
|
|
594
677
|
|
595
678
|
// Open button modifier
|
596
679
|
&.gem-c-layout-super-navigation-header__open-button {
|
680
|
+
&.gem-c-layout-super-navigation-header__search-toggle-button--blue-background {
|
681
|
+
&:hover {
|
682
|
+
border-bottom: $pseudo-underline-height solid govuk-colour("white");
|
683
|
+
color: govuk-colour("white");
|
684
|
+
}
|
685
|
+
}
|
686
|
+
|
597
687
|
@include focus-and-focus-visible {
|
598
688
|
@include govuk-focused-text;
|
599
689
|
border-color: $govuk-focus-colour;
|
@@ -625,9 +715,7 @@ $after-button-padding-left: govuk-spacing(4);
|
|
625
715
|
font-weight: normal;
|
626
716
|
left: 0;
|
627
717
|
line-height: 22px;
|
628
|
-
padding: govuk-spacing(3) 0;
|
629
718
|
pointer-events: none;
|
630
|
-
position: absolute;
|
631
719
|
right: 0;
|
632
720
|
text-align: center;
|
633
721
|
top: 0;
|
@@ -788,3 +876,58 @@ $after-button-padding-left: govuk-spacing(4);
|
|
788
876
|
display: none;
|
789
877
|
}
|
790
878
|
}
|
879
|
+
|
880
|
+
// Ensure the total space to the left of the logo for mobile screen sizes is 24px (margin is 15px)
|
881
|
+
@include govuk-media-query($until: tablet) {
|
882
|
+
.gem-c-layout-super-navigation-header__header-logo--large-navbar {
|
883
|
+
padding-left: 9px;
|
884
|
+
}
|
885
|
+
}
|
886
|
+
|
887
|
+
@include govuk-media-query($from: desktop) {
|
888
|
+
// can't use govuk-spacing here because the navbar height
|
889
|
+
// isn't a multiple of 5 :(
|
890
|
+
.gem-c-layout-super-navigation-header__navigation-item-link--large-navbar,
|
891
|
+
.gem-c-layout-super-navigation-header__search-item-link--large-navbar {
|
892
|
+
padding-top: 33px;
|
893
|
+
padding-bottom: 33px;
|
894
|
+
}
|
895
|
+
|
896
|
+
.gem-c-layout-super-navigation-header__logotype-crown--large-navbar {
|
897
|
+
height: 36px;
|
898
|
+
width: 49px;
|
899
|
+
}
|
900
|
+
|
901
|
+
.gem-c-header__link--large-navbar:focus {
|
902
|
+
box-shadow: 0 -4px 0 18px $govuk-focus-colour;
|
903
|
+
border-bottom: $govuk-focus-width solid govuk-colour("black");
|
904
|
+
padding-bottom: 10px;
|
905
|
+
}
|
906
|
+
|
907
|
+
.gem-c-header__link--large-navbar:hover {
|
908
|
+
padding-bottom: 10px;
|
909
|
+
}
|
910
|
+
|
911
|
+
.gem-c-layout-super-navigation-header__header-logo--large-navbar {
|
912
|
+
height: 35px;
|
913
|
+
padding-bottom: govuk-spacing(5);
|
914
|
+
padding-top: govuk-spacing(5);
|
915
|
+
}
|
916
|
+
|
917
|
+
.gem-c-layout-super-navigation-header__search-toggle-button--large-navbar {
|
918
|
+
height: $large-navbar-height;
|
919
|
+
}
|
920
|
+
|
921
|
+
// to stop the search icon moving on hover
|
922
|
+
.gem-c-layout-super-navigation-header__search-toggle-button--large-navbar:hover {
|
923
|
+
padding-bottom: 12px;
|
924
|
+
}
|
925
|
+
|
926
|
+
.gem-c-layout-super-navigation-header__button-container--large-navbar {
|
927
|
+
top: -$large-navbar-height;
|
928
|
+
}
|
929
|
+
|
930
|
+
.gem-c-layout-super-navigation-header__navigation-top-toggle-button--large-navbar {
|
931
|
+
height: $large-navbar-height;
|
932
|
+
}
|
933
|
+
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
CHANGED
@@ -12,6 +12,7 @@
|
|
12
12
|
// Scope attachment and attachment-link component styles to gem-c-govspeak
|
13
13
|
@import "../attachment-link";
|
14
14
|
@import "../attachment";
|
15
|
+
@import "../details";
|
15
16
|
|
16
17
|
// This block is duplicated from Whitehall as a transitional step, see the
|
17
18
|
// commit message for 2d893c10ee3f2cab27162b9aba38b12379a71d07 before making
|
@@ -72,10 +72,10 @@ module GovukPublishingComponents
|
|
72
72
|
end
|
73
73
|
|
74
74
|
@data = {
|
75
|
-
name
|
76
|
-
dir
|
77
|
-
application_found
|
78
|
-
components_found
|
75
|
+
name:,
|
76
|
+
dir:,
|
77
|
+
application_found:,
|
78
|
+
components_found:,
|
79
79
|
gem_style_references: @gem_style_references.flatten.uniq.sort,
|
80
80
|
jquery_references: @jquery_references.flatten.uniq.sort,
|
81
81
|
component_locations: @component_locations,
|
@@ -95,8 +95,8 @@ module GovukPublishingComponents
|
|
95
95
|
dir: result[:dir],
|
96
96
|
application_found: result[:application_found],
|
97
97
|
uses_static: application_uses_static,
|
98
|
-
summary
|
99
|
-
warnings
|
98
|
+
summary:,
|
99
|
+
warnings:,
|
100
100
|
warning_count: warnings.length,
|
101
101
|
gem_style_references: result[:gem_style_references],
|
102
102
|
jquery_references: result[:jquery_references],
|
@@ -126,8 +126,8 @@ module GovukPublishingComponents
|
|
126
126
|
|
127
127
|
def create_warning(component, message)
|
128
128
|
{
|
129
|
-
component
|
130
|
-
message
|
129
|
+
component:,
|
130
|
+
message:,
|
131
131
|
}
|
132
132
|
end
|
133
133
|
|
@@ -280,7 +280,7 @@ module GovukPublishingComponents
|
|
280
280
|
results << {
|
281
281
|
name: component_name,
|
282
282
|
count: locations.length,
|
283
|
-
locations
|
283
|
+
locations:,
|
284
284
|
}
|
285
285
|
end
|
286
286
|
|
@@ -15,9 +15,9 @@
|
|
15
15
|
ga4_tracking ||= false
|
16
16
|
ga4_data = {
|
17
17
|
event_name: "navigation",
|
18
|
-
type: "contents list",
|
19
18
|
section: t("components.contents_list.contents", locale: :en) || "",
|
20
|
-
|
19
|
+
type: "contents list",
|
20
|
+
index_total: cl_helper.get_index_total,
|
21
21
|
} if ga4_tracking
|
22
22
|
local_assigns[:aria] ||= {}
|
23
23
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
@@ -43,6 +43,7 @@
|
|
43
43
|
<li class="<%= cl_helper.list_item_classes(contents_item, false) %>" <%= "aria-current=true" if contents_item[:active] %>>
|
44
44
|
<% link_text = format_numbers ? cl_helper.wrap_numbers_with_spans(contents_item[:text]) : contents_item[:text]
|
45
45
|
if ga4_tracking
|
46
|
+
ga4_data[:event_name] = cl_helper.get_ga4_event_name(contents_item[:href]) if contents_item[:href]
|
46
47
|
ga4_data[:index] = {
|
47
48
|
"index_link": index_link,
|
48
49
|
}
|
@@ -67,6 +68,7 @@
|
|
67
68
|
<li class="<%= cl_helper.list_item_classes(nested_contents_item, true) %>" <%= "aria-current=true" if nested_contents_item[:active] %>>
|
68
69
|
<%
|
69
70
|
if ga4_tracking
|
71
|
+
ga4_data[:event_name] = cl_helper.get_ga4_event_name(nested_contents_item[:href]) if nested_contents_item[:href]
|
70
72
|
ga4_data[:index] = {
|
71
73
|
"index_link": index_link,
|
72
74
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<%
|
2
2
|
add_gem_component_stylesheet("govspeak")
|
3
|
+
|
3
4
|
inverse ||= false
|
4
5
|
direction_class = "direction-#{direction}" if local_assigns.include?(:direction)
|
5
6
|
disable_youtube_expansions = local_assigns.fetch(:disable_youtube_expansions) if local_assigns.include?(:disable_youtube_expansions)
|
@@ -6,6 +6,7 @@
|
|
6
6
|
blue_bar ||= local_assigns.include?(:blue_bar) ? local_assigns[:blue_bar] : !full_width
|
7
7
|
global_bar ||= nil
|
8
8
|
html_lang ||= "en"
|
9
|
+
homepage ||= false
|
9
10
|
layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
|
10
11
|
blue_bar_background_colour = layout_helper.blue_bar_background_colours.include?(blue_bar_background_colour) ? blue_bar_background_colour : nil
|
11
12
|
logo_link ||= "/"
|
@@ -103,9 +104,15 @@
|
|
103
104
|
|
104
105
|
<% unless omit_header %>
|
105
106
|
<% if show_explore_header %>
|
106
|
-
|
107
|
-
|
108
|
-
|
107
|
+
<% if homepage %>
|
108
|
+
<%= render "govuk_publishing_components/components/layout_for_public/layout_super_navigation_header_homepage", {
|
109
|
+
logo_link: logo_link,
|
110
|
+
} %>
|
111
|
+
<% else %>
|
112
|
+
<%= render "govuk_publishing_components/components/layout_super_navigation_header", {
|
113
|
+
logo_link: logo_link,
|
114
|
+
} %>
|
115
|
+
<% end %>
|
109
116
|
<% else %>
|
110
117
|
<%= render "govuk_publishing_components/components/layout_header", {
|
111
118
|
search: show_search,
|
@@ -122,7 +129,7 @@
|
|
122
129
|
|
123
130
|
<%= raw(emergency_banner) %>
|
124
131
|
|
125
|
-
<% if (blue_bar && !global_bar.present?) || (blue_bar_dedupe) %>
|
132
|
+
<% if (blue_bar && !global_bar.present? && !homepage) || (blue_bar_dedupe) %>
|
126
133
|
<%= content_tag(:div, class: blue_bar_wrapper_classes) do %>
|
127
134
|
<div class="gem-c-layout-for-public__blue-bar govuk-width-container"></div>
|
128
135
|
<% end %>
|