govuk_publishing_components 34.10.0 → 34.11.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 +123 -10
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +17 -92
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +12 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-schemas.js +16 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-smart-answer-results-tracker.js +57 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +2 -2
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +0 -22
- data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +42 -94
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -9
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +207 -221
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +8 -4
- data/lib/govuk_publishing_components/presenters/breadcrumbs.rb +6 -0
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +14 -9
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +4 -3
@@ -91,8 +91,22 @@ $after-button-padding-left: govuk-spacing(4);
|
|
91
91
|
|
92
92
|
.gem-c-layout-super-navigation-header__container {
|
93
93
|
position: relative;
|
94
|
+
}
|
94
95
|
|
95
|
-
|
96
|
+
.gem-c-layout-super-navigation-header__button-width-container {
|
97
|
+
position: relative;
|
98
|
+
}
|
99
|
+
|
100
|
+
.gem-c-layout-super-navigation-header__button-container {
|
101
|
+
@include govuk-media-query($until: "tablet") {
|
102
|
+
margin-right: govuk-spacing(-3);
|
103
|
+
}
|
104
|
+
|
105
|
+
top: -$black-bar-height;
|
106
|
+
position: absolute;
|
107
|
+
right: 0;
|
108
|
+
|
109
|
+
@include govuk-media-query($until: 300px) {
|
96
110
|
position: static;
|
97
111
|
}
|
98
112
|
}
|
@@ -105,47 +119,13 @@ $after-button-padding-left: govuk-spacing(4);
|
|
105
119
|
}
|
106
120
|
|
107
121
|
.gem-c-layout-super-navigation-header__content {
|
108
|
-
|
109
|
-
margin-right: govuk-spacing(-3);
|
110
|
-
}
|
111
|
-
|
112
|
-
display: inline-block;
|
113
|
-
float: right;
|
122
|
+
width: 100%;
|
114
123
|
}
|
115
124
|
|
116
125
|
.gem-c-layout-super-navigation-header__navigation-toggle-wrapper {
|
117
126
|
position: relative;
|
118
127
|
}
|
119
128
|
|
120
|
-
// Top level navigation and search.
|
121
|
-
.gem-c-layout-super-navigation-header__navigation-items,
|
122
|
-
.gem-c-layout-super-navigation-header__search-items {
|
123
|
-
display: block;
|
124
|
-
float: left;
|
125
|
-
list-style: none;
|
126
|
-
padding: 0;
|
127
|
-
margin: 0;
|
128
|
-
}
|
129
|
-
|
130
|
-
.gem-c-layout-super-navigation-header__navigation-items {
|
131
|
-
border-bottom: 1px solid $govuk-border-colour;
|
132
|
-
|
133
|
-
.js-module-initialised & {
|
134
|
-
&:last-child {
|
135
|
-
border-bottom: none;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
@include govuk-media-query($from: "desktop") {
|
140
|
-
border-bottom: 0;
|
141
|
-
padding: 0;
|
142
|
-
|
143
|
-
&:first-of-type {
|
144
|
-
margin-right: -1px;
|
145
|
-
}
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
129
|
.gem-c-layout-super-navigation-header__navigation-item,
|
150
130
|
.gem-c-layout-super-navigation-header__search-item {
|
151
131
|
background: govuk-colour("black");
|
@@ -165,7 +145,7 @@ $after-button-padding-left: govuk-spacing(4);
|
|
165
145
|
font-size: 19px;
|
166
146
|
font-size: govuk-px-to-rem(19px);
|
167
147
|
font-weight: bold;
|
168
|
-
|
148
|
+
padding: govuk-spacing(3) 0;
|
169
149
|
position: relative;
|
170
150
|
|
171
151
|
@include govuk-media-query($from: "desktop") {
|
@@ -204,7 +184,7 @@ $after-button-padding-left: govuk-spacing(4);
|
|
204
184
|
|
205
185
|
&:after {
|
206
186
|
@include make-selectable-area-bigger;
|
207
|
-
@include pseudo-underline($left: $after-link-padding, $right: $after-link-padding
|
187
|
+
@include pseudo-underline($left: $after-link-padding, $right: $after-link-padding);
|
208
188
|
}
|
209
189
|
|
210
190
|
// stylelint-disable max-nesting-depth
|
@@ -413,7 +393,7 @@ $after-button-padding-left: govuk-spacing(4);
|
|
413
393
|
height: $black-bar-height;
|
414
394
|
padding: 0;
|
415
395
|
position: relative;
|
416
|
-
margin: 0
|
396
|
+
margin: 0;
|
417
397
|
vertical-align: top;
|
418
398
|
|
419
399
|
@include govuk-media-query($from: "desktop") {
|
@@ -566,7 +546,7 @@ $after-button-padding-left: govuk-spacing(4);
|
|
566
546
|
// Styles for search toggle button.
|
567
547
|
.gem-c-layout-super-navigation-header__search-toggle-button {
|
568
548
|
@include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
|
569
|
-
background:
|
549
|
+
background: none;
|
570
550
|
border: 0;
|
571
551
|
color: govuk-colour("white");
|
572
552
|
cursor: pointer;
|
@@ -657,25 +637,22 @@ $after-button-padding-left: govuk-spacing(4);
|
|
657
637
|
}
|
658
638
|
}
|
659
639
|
|
640
|
+
.gem-c-layout-super-navigation-header__search-container {
|
641
|
+
padding-bottom: govuk-spacing(3);
|
642
|
+
}
|
643
|
+
|
660
644
|
// Dropdown menu.
|
661
645
|
.gem-c-layout-super-navigation-header__navigation-dropdown-menu {
|
646
|
+
@include govuk-media-query($until: 300px) {
|
647
|
+
padding-top: 80px;
|
648
|
+
}
|
649
|
+
|
662
650
|
background: govuk-colour("light-grey");
|
663
651
|
border-bottom: 1px govuk-colour("mid-grey") solid;
|
664
|
-
top: govuk-spacing(
|
665
|
-
left: govuk-spacing(-3);
|
666
|
-
padding: 0 govuk-spacing(3);
|
667
|
-
position: absolute;
|
668
|
-
right: govuk-spacing(-3);
|
669
|
-
|
670
|
-
@include govuk-media-query($from: "tablet") {
|
671
|
-
padding: 0 govuk-spacing(6);
|
672
|
-
left: govuk-spacing(-6);
|
673
|
-
right: govuk-spacing(-6);
|
674
|
-
}
|
652
|
+
padding-top: govuk-spacing(6);
|
675
653
|
|
676
654
|
@include govuk-media-query($from: "desktop") {
|
677
|
-
|
678
|
-
right: 0;
|
655
|
+
padding-top: govuk-spacing(5);
|
679
656
|
}
|
680
657
|
}
|
681
658
|
|
@@ -692,31 +669,24 @@ $after-button-padding-left: govuk-spacing(4);
|
|
692
669
|
// Dropdown menu items.
|
693
670
|
.gem-c-layout-super-navigation-header__dropdown-list-item {
|
694
671
|
box-sizing: border-box;
|
695
|
-
padding: 0 0 govuk-spacing(
|
672
|
+
padding: 0 0 govuk-spacing(3) 0;
|
696
673
|
position: relative;
|
674
|
+
margin: 0 0 govuk-spacing(2) 0;
|
697
675
|
@include govuk-media-query($from: "desktop") {
|
698
|
-
padding: 0 0 govuk-spacing(
|
676
|
+
padding: 0 0 govuk-spacing(3) 0;
|
677
|
+
margin: 0 govuk-spacing(3) govuk-spacing(1) govuk-spacing(3);
|
699
678
|
}
|
700
679
|
}
|
701
680
|
|
702
681
|
// Navigation menu items.
|
703
682
|
.gem-c-layout-super-navigation-header__navigation-second-items {
|
704
|
-
|
705
683
|
list-style: none;
|
706
684
|
margin: 0;
|
707
685
|
padding: govuk-spacing(3) govuk-spacing(5) govuk-spacing(5) 0;
|
708
686
|
|
709
|
-
& > li {
|
710
|
-
margin: 0;
|
711
|
-
}
|
712
|
-
|
713
687
|
@include govuk-media-query($from: "desktop") {
|
714
688
|
margin: 0 (0 - govuk-spacing(3)) govuk-spacing(9);
|
715
689
|
padding: govuk-spacing(2) 0 0 0;
|
716
|
-
|
717
|
-
& > li {
|
718
|
-
margin: 0 govuk-spacing(3);
|
719
|
-
}
|
720
690
|
}
|
721
691
|
}
|
722
692
|
|
@@ -743,11 +713,15 @@ $after-button-padding-left: govuk-spacing(4);
|
|
743
713
|
font-size: govuk-px-to-rem(16px);
|
744
714
|
font-weight: bold;
|
745
715
|
|
716
|
+
&:after {
|
717
|
+
@include make-selectable-area-bigger;
|
718
|
+
}
|
719
|
+
|
746
720
|
@include govuk-media-query($from: "desktop") {
|
747
721
|
padding: 0;
|
748
722
|
|
749
723
|
&:after {
|
750
|
-
|
724
|
+
@include make-selectable-area-bigger;
|
751
725
|
}
|
752
726
|
}
|
753
727
|
}
|
@@ -771,29 +745,8 @@ $after-button-padding-left: govuk-spacing(4);
|
|
771
745
|
margin: govuk-spacing(1) 0 0 0;
|
772
746
|
}
|
773
747
|
|
774
|
-
// Search dropdown.
|
775
|
-
.gem-c-layout-super-navigation-header__search-items {
|
776
|
-
.js-module-initialised & {
|
777
|
-
margin: 0 (0 - govuk-spacing(3));
|
778
|
-
position: absolute;
|
779
|
-
|
780
|
-
@include govuk-media-query($from: "tablet") {
|
781
|
-
margin: 0 (0 - govuk-spacing(6));
|
782
|
-
}
|
783
|
-
}
|
784
|
-
|
785
|
-
background: govuk-colour("light-grey");
|
786
|
-
left: 0;
|
787
|
-
right: 0;
|
788
|
-
z-index: 999;
|
789
|
-
|
790
|
-
@include govuk-media-query($from: "desktop") {
|
791
|
-
margin: 0;
|
792
|
-
}
|
793
|
-
}
|
794
|
-
|
795
748
|
.gem-c-layout-super-navigation-header__search-form {
|
796
|
-
padding: govuk-spacing(
|
749
|
+
padding: govuk-spacing(2) 0 govuk-spacing(6) 0;
|
797
750
|
}
|
798
751
|
|
799
752
|
// Popular links.
|
@@ -811,12 +764,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
811
764
|
&:after {
|
812
765
|
@include make-selectable-area-bigger;
|
813
766
|
}
|
814
|
-
|
815
|
-
@include govuk-media-query($from: "desktop") {
|
816
|
-
&:after {
|
817
|
-
content: none;
|
818
|
-
}
|
819
|
-
}
|
820
767
|
}
|
821
768
|
|
822
769
|
.gem-c-layout-super-navigation-header__width-container {
|
@@ -826,8 +773,9 @@ $after-button-padding-left: govuk-spacing(4);
|
|
826
773
|
}
|
827
774
|
|
828
775
|
@include govuk-media-query($from: "desktop") {
|
829
|
-
margin:
|
776
|
+
margin: 0 auto;
|
830
777
|
max-width: 960px;
|
778
|
+
padding: govuk-spacing(5);
|
831
779
|
}
|
832
780
|
}
|
833
781
|
|
@@ -17,12 +17,3 @@ $gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
|
|
17
17
|
$gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
|
18
18
|
|
19
19
|
$gem-hover-dark-background: #dddcdb;
|
20
|
-
|
21
|
-
$govuk-colours-organisations: map-merge(
|
22
|
-
$govuk-colours-organisations,
|
23
|
-
(
|
24
|
-
"department-for-energy-security-and-net-zero": (
|
25
|
-
colour: #0da04a
|
26
|
-
)
|
27
|
-
)
|
28
|
-
);
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
15
15
|
component_helper.add_class(classes.join(" "))
|
16
|
-
component_helper.add_data_attribute({ module: "gem-track-click" })
|
16
|
+
component_helper.add_data_attribute({ module: "gem-track-click ga4-link-tracker" })
|
17
17
|
%>
|
18
18
|
|
19
19
|
<script type="application/ld+json">
|