govuk_publishing_components 25.2.0 → 25.2.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/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +38 -12
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +25 -4
- 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: 0fc516835586ed0098df4390f5fd9bfe2c9dd97c9dcd91d0d41c2cc0b8ad9864
|
4
|
+
data.tar.gz: 4a4e410ac48855b9ba8d7c7f014c37b4049587824cf147daa51b2b9c35870dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ba63ec97ec65250980ba70482fbdb1efa191c203cb693a5c76b054480edb63562b68d955bb22b06364dc447071b1f2642784a732c73098c604282bebe882c0
|
7
|
+
data.tar.gz: 12c1d8b7dc34e97e9faf28b58d5cff71f23ab86eb79b0faf567ea23f89f2043a805f8b9de57f46a04fd4ea8d87c3f8f4364dabaf3d0d4b849ac81badf1767d0f
|
@@ -1,15 +1,15 @@
|
|
1
1
|
$search-icon-size: 20px;
|
2
2
|
|
3
3
|
@mixin chevron($colour) {
|
4
|
-
border-bottom:
|
5
|
-
border-right:
|
4
|
+
border-bottom: 3px solid govuk-colour($colour);
|
5
|
+
border-right: 3px solid govuk-colour($colour);
|
6
6
|
content: " ";
|
7
7
|
display: inline-block;
|
8
|
-
height:
|
9
|
-
margin: 0
|
8
|
+
height: 8px;
|
9
|
+
margin: 0 8px 0 2px;
|
10
10
|
transform: translateY(-35%) rotate(45deg);
|
11
11
|
vertical-align: middle;
|
12
|
-
width:
|
12
|
+
width: 8px;
|
13
13
|
}
|
14
14
|
|
15
15
|
%top-level-navigation-link-base {
|
@@ -24,8 +24,9 @@ $search-icon-size: 20px;
|
|
24
24
|
text-decoration: none;
|
25
25
|
|
26
26
|
&,
|
27
|
+
&:link,
|
27
28
|
&:visited {
|
28
|
-
color: govuk-colour
|
29
|
+
color: $govuk-link-colour;
|
29
30
|
}
|
30
31
|
|
31
32
|
&:focus {
|
@@ -44,6 +45,7 @@ $search-icon-size: 20px;
|
|
44
45
|
|
45
46
|
@include govuk-media-query($from: "desktop") {
|
46
47
|
@include govuk-font($size: 16, $weight: false, $line-height: 20px);
|
48
|
+
color: govuk-colour("white");
|
47
49
|
display: inherit;
|
48
50
|
height: govuk-spacing(9);
|
49
51
|
padding: govuk-spacing(4);
|
@@ -107,10 +109,6 @@ $search-icon-size: 20px;
|
|
107
109
|
border-color: $govuk-focus-colour;
|
108
110
|
}
|
109
111
|
|
110
|
-
&:hover {
|
111
|
-
border-color: govuk-colour("black");
|
112
|
-
}
|
113
|
-
|
114
112
|
&.gem-c-layout-super-navigation-header__open-button {
|
115
113
|
border-left-color: govuk-colour("black");
|
116
114
|
border-right-color: govuk-colour("black");
|
@@ -128,8 +126,8 @@ $search-icon-size: 20px;
|
|
128
126
|
|
129
127
|
&:before,
|
130
128
|
&:after {
|
131
|
-
$width:
|
132
|
-
$height:
|
129
|
+
$width: govuk-spacing(4);
|
130
|
+
$height: 4px;
|
133
131
|
|
134
132
|
border: none;
|
135
133
|
content: " ";
|
@@ -265,6 +263,30 @@ $search-icon-size: 20px;
|
|
265
263
|
.gem-c-layout-super-navigation-header__navigation-item-link {
|
266
264
|
@extend %top-level-navigation-link-base;
|
267
265
|
|
266
|
+
&,
|
267
|
+
&:link, // 👈 required to override govuk-template
|
268
|
+
&:visited {
|
269
|
+
color: $govuk-link-colour;
|
270
|
+
|
271
|
+
&:hover {
|
272
|
+
color: govuk-colour("mid-grey");
|
273
|
+
}
|
274
|
+
|
275
|
+
&:focus {
|
276
|
+
color: $govuk-focus-text-colour;
|
277
|
+
}
|
278
|
+
|
279
|
+
@include govuk-media-query($from: "desktop") {
|
280
|
+
color: govuk-colour("white");
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
// This :link:focus selector is required to override the `govuk-template`
|
285
|
+
// defaults.
|
286
|
+
&:link:focus {
|
287
|
+
color: $govuk-focus-text-colour;
|
288
|
+
}
|
289
|
+
|
268
290
|
.js-enabled & {
|
269
291
|
@include govuk-media-query($until: "desktop") {
|
270
292
|
padding: govuk-spacing(6) govuk-spacing(3) govuk-spacing(6) govuk-spacing(9);
|
@@ -366,6 +388,10 @@ $search-icon-size: 20px;
|
|
366
388
|
position: absolute;
|
367
389
|
right: (0 - govuk-spacing(3));
|
368
390
|
|
391
|
+
&:hover {
|
392
|
+
border-color: govuk-colour("black");
|
393
|
+
}
|
394
|
+
|
369
395
|
@include govuk-media-query($from: 360px) {
|
370
396
|
right: 0;
|
371
397
|
}
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -134,7 +134,17 @@ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_to
|
|
134
134
|
link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
|
135
135
|
%>
|
136
136
|
<li class="gem-c-layout-super-navigation-header__dropdown-list-item">
|
137
|
-
<%= link_to item[:label], item[:href], {
|
137
|
+
<%= link_to item[:label], item[:href], {
|
138
|
+
class: link_classes,
|
139
|
+
data: {
|
140
|
+
module: "gem-track-click",
|
141
|
+
track_action: "#{tracking_label}Link",
|
142
|
+
track_category: "headerClicked",
|
143
|
+
track_label: item[:href],
|
144
|
+
track_dimension: item[:label],
|
145
|
+
track_dimension_index: "29",
|
146
|
+
}
|
147
|
+
} %>
|
138
148
|
<%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
|
139
149
|
</li>
|
140
150
|
<% end %>
|
@@ -150,9 +160,20 @@ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_to
|
|
150
160
|
<ul class="gem-c-layout-super-navigation-header__navigation-second-footer-list">
|
151
161
|
<% link[:footer_links].each do | item | %>
|
152
162
|
<li class="gem-c-layout-super-navigation-header__navigation-second-footer-item">
|
153
|
-
|
154
|
-
|
155
|
-
|
163
|
+
<%= link_to item[:label], item[:href], {
|
164
|
+
class: [
|
165
|
+
"govuk-link",
|
166
|
+
"gem-c-layout-super-navigation-header__navigation-second-footer-link",
|
167
|
+
],
|
168
|
+
data: {
|
169
|
+
module: "gem-track-lick",
|
170
|
+
track_action: "#{tracking_label}Link",
|
171
|
+
track_cateogry: "headerClicked",
|
172
|
+
track_label: item[:href],
|
173
|
+
track_dimension: item[:label],
|
174
|
+
track_dimension_index: "29",
|
175
|
+
}
|
176
|
+
} %>
|
156
177
|
</li>
|
157
178
|
<% end %>
|
158
179
|
</ul>
|