mp-design-system 1.2.23 → 1.2.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/js/app.js +1 -1
- package/dist/build/js/app.js.map +1 -1
- package/dist/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +1 -1
- package/src/_includes/components/hero/hero.njk +11 -7
- package/src/_includes/components/hero/hero.scss +58 -3
- package/src/_includes/components/product-signpost/product-signpost.scss +2 -1
- package/src/assets/js/imports/hero-video.js +1 -1
- package/src/assets/scss/utilities/display.scss +5 -0
package/package.json
CHANGED
@@ -33,12 +33,14 @@
|
|
33
33
|
</header>
|
34
34
|
|
35
35
|
{% if params.cta %}
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
<div class="c-hero__button-wrap">
|
37
|
+
{{ button({
|
38
|
+
link: params.cta.link,
|
39
|
+
inline: true,
|
40
|
+
label: params.cta.label,
|
41
|
+
color: 'green'
|
42
|
+
}) }}
|
43
|
+
</div>
|
42
44
|
{% endif %}
|
43
45
|
</div>
|
44
46
|
</div>
|
@@ -70,7 +72,9 @@
|
|
70
72
|
{% endif %}
|
71
73
|
|
72
74
|
{% if params.longvideo %}
|
73
|
-
|
75
|
+
<div class="c-hero__video-button-wrap">
|
76
|
+
{{ button({ link: '', label: 'Play video', colour: 'outline-white', attrs: 'id=playVideo' }) }}
|
77
|
+
</div>
|
74
78
|
{% endif %}
|
75
79
|
</figure>
|
76
80
|
|
@@ -1,3 +1,11 @@
|
|
1
|
+
:root {
|
2
|
+
--body-width: min(100vw, calc(78.75rem + var(--gutter) + var(--gutter) ) );
|
3
|
+
--gutter-width: calc( (100vw - var(--body-width)) / 2 );
|
4
|
+
--text-width: min(100vw, 51.75rem);
|
5
|
+
--hero-gap: calc( var(--body-width) - var(--text-width));
|
6
|
+
--stop: calc( ( var(--hero-gap) + var(--gutter-width) ) *.8 );
|
7
|
+
}
|
8
|
+
|
1
9
|
.c-hero {
|
2
10
|
background-color: color('blue', 'step-2');
|
3
11
|
background: linear-gradient(to top right, color('petrol', 'step-3'), color('blue', 'step-2'));
|
@@ -59,6 +67,16 @@
|
|
59
67
|
p {
|
60
68
|
line-height: lh('prose');
|
61
69
|
}
|
70
|
+
|
71
|
+
.c-hero__button-wrap {
|
72
|
+
display: flex;
|
73
|
+
flex-wrap: wrap;
|
74
|
+
gap: var(--space-s);
|
75
|
+
|
76
|
+
&> .c-button {
|
77
|
+
margin: 0 !important;
|
78
|
+
}
|
79
|
+
}
|
62
80
|
}
|
63
81
|
|
64
82
|
&--image {
|
@@ -97,6 +115,12 @@
|
|
97
115
|
background: radial-gradient(circle farthest-side at top right, rgba(color('grey', 'step--1'), 30%), color('grey', 'step--1'));
|
98
116
|
}
|
99
117
|
}
|
118
|
+
|
119
|
+
@media (min-width:70em) {
|
120
|
+
&:after {
|
121
|
+
background: linear-gradient(270deg, rgba(color('grey','step--1'),0%) var(--gutter-width), rgba(color('grey','step--1'),62%) var(--stop), color('grey','step--1'));
|
122
|
+
}
|
123
|
+
}
|
100
124
|
}
|
101
125
|
|
102
126
|
&--homepage {
|
@@ -179,6 +203,17 @@
|
|
179
203
|
}
|
180
204
|
}
|
181
205
|
|
206
|
+
.u-wrap {
|
207
|
+
&::before,
|
208
|
+
&::after {
|
209
|
+
display: none;
|
210
|
+
|
211
|
+
@media (min-width: 38em) {
|
212
|
+
display: inline;
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
182
217
|
.c-hero {
|
183
218
|
&__video-bg {
|
184
219
|
width: 100%;
|
@@ -203,14 +238,15 @@
|
|
203
238
|
}
|
204
239
|
}
|
205
240
|
|
206
|
-
&
|
241
|
+
&__video-button-wrap {
|
207
242
|
position: absolute;
|
208
243
|
z-index: 2;
|
209
244
|
right: 0;
|
210
245
|
bottom: calc(56.25% / 2 - 25px);
|
211
246
|
left: 0;
|
212
|
-
background: rgba(black, 0.2);
|
213
247
|
margin: 0 auto;
|
248
|
+
display: flex;
|
249
|
+
justify-content: center;
|
214
250
|
|
215
251
|
@media (min-width: 38em) {
|
216
252
|
position: absolute;
|
@@ -219,6 +255,21 @@
|
|
219
255
|
bottom: unset;
|
220
256
|
left: unset;
|
221
257
|
}
|
258
|
+
|
259
|
+
.c-button {
|
260
|
+
position: relative;
|
261
|
+
|
262
|
+
&::before {
|
263
|
+
content: '';
|
264
|
+
position: absolute;
|
265
|
+
background: rgba(black, 0.2);
|
266
|
+
height: 100%;
|
267
|
+
width: 100%;
|
268
|
+
top: 0;
|
269
|
+
left: 0;
|
270
|
+
border-radius: inherit;
|
271
|
+
}
|
272
|
+
}
|
222
273
|
}
|
223
274
|
}
|
224
275
|
}
|
@@ -250,10 +301,14 @@
|
|
250
301
|
|
251
302
|
&__canvas {
|
252
303
|
position: absolute;
|
253
|
-
z-index: 1;
|
304
|
+
z-index: -1;
|
254
305
|
height: 100%;
|
255
306
|
width: 100%;
|
256
307
|
left: 0;
|
257
308
|
top: 0;
|
309
|
+
|
310
|
+
@media (min-width: 38em) {
|
311
|
+
z-index: 1;
|
312
|
+
}
|
258
313
|
}
|
259
314
|
}
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
&__image {
|
19
19
|
margin-bottom: 0;
|
20
|
-
@include padding-right("s");
|
20
|
+
// @include padding-right("s");
|
21
21
|
flex-shrink: 0;
|
22
22
|
}
|
23
23
|
|
@@ -28,6 +28,7 @@
|
|
28
28
|
&__wrapper {
|
29
29
|
display: flex;
|
30
30
|
flex-direction: column;
|
31
|
+
@include space('gap', 'xs-s');
|
31
32
|
}
|
32
33
|
|
33
34
|
.o-prose p {
|
@@ -4,7 +4,7 @@ function HeroVideo() {
|
|
4
4
|
if(typeof(videoBackground) != 'undefined' && videoBackground != null) {
|
5
5
|
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
|
6
6
|
if(!reducedMotion || reducedMotion.matches) {
|
7
|
-
videoBackground.
|
7
|
+
videoBackground.pause();
|
8
8
|
}
|
9
9
|
|
10
10
|
const lightboxTrigger = document.getElementById('playVideo');
|