mp-design-system 0.8.4 → 0.9.2
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/library.css +1 -1
- package/dist/build/scss/library.css.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/button/button.config.js +6 -0
- package/src/_includes/components/button/button.scss +6 -2
- package/src/_includes/components/campaign/campaign.scss +16 -8
- package/src/_includes/components/hero/hero.config.js +24 -24
- package/src/_includes/components/hero/hero.njk +3 -1
- package/src/_includes/components/hero/hero.scss +4 -4
- package/src/_includes/components/input/input.njk +2 -2
- package/src/_includes/components/input/input.scss +13 -0
- package/src/_includes/components/quote/quote.scss +6 -4
- package/src/_includes/components/tabs/tabs.scss +2 -2
- package/src/_includes/includes/system-header.njk +1 -1
- package/src/_includes/layout.njk +1 -1
- package/src/_includes/library-navigation/brand-nav.njk +1 -0
- package/src/_includes/system-home-page.njk +2 -1
- package/src/assets/js/imports/hero-video.js +25 -6
- package/src/assets/scss/foundations/colour.scss +3 -3
- package/src/assets/scss/library.scss +9 -1
- package/src/assets/scss/objects/prose.scss +5 -4
- package/src/assets/scss/tools/cutoff.scss +56 -0
- package/src/assets/scss/tools/index.scss +1 -0
- package/src/assets/scss/utilities/index.scss +0 -4
- package/src/brand/basics.md +35 -0
- package/src/brand/colors.njk +3 -3
- package/src/brand/index.njk +74 -7
- package/src/brand/logo.md +1 -1
- package/src/brand/typography.md +9 -12
- package/src/checklist.md +4 -3
- package/src/components/colour.njk +1 -1
- package/src/components/flow.njk +9 -0
- package/src/components/installation.md +3 -3
- package/src/components/utilities.md +39 -13
- package/src/index.njk +33 -27
- package/src/patterns/form.njk +8 -0
- package/src/static/img/favicon.svg +1 -0
- package/src/static/svg/crop-diagram-2.svg +1 -1
- package/src/static/svg/imaging-matrix.svg +1 -1
package/package.json
CHANGED
@@ -11,8 +11,7 @@
|
|
11
11
|
font-family: $font-stack;
|
12
12
|
}
|
13
13
|
|
14
|
-
|
15
|
-
.c-button {
|
14
|
+
%c-button {
|
16
15
|
// Reset
|
17
16
|
border-radius: 0;
|
18
17
|
background: transparent;
|
@@ -45,6 +44,11 @@
|
|
45
44
|
text-decoration: none;
|
46
45
|
color: color("white");
|
47
46
|
}
|
47
|
+
}
|
48
|
+
|
49
|
+
.mp.c-button,
|
50
|
+
.c-button {
|
51
|
+
@extend %c-button;
|
48
52
|
|
49
53
|
&--wide {
|
50
54
|
width: 100%;
|
@@ -1,14 +1,19 @@
|
|
1
|
+
$angle: 225deg;
|
2
|
+
|
1
3
|
.c-campaign {
|
4
|
+
@include cutoff;
|
5
|
+
|
2
6
|
position: relative;
|
3
|
-
background: color('grey');
|
4
7
|
max-width: calc(#{$wrapper}) !important;
|
5
8
|
padding: 0 !important;
|
6
9
|
|
7
10
|
&__link {
|
8
11
|
@extend .u-fill, .u-fill--link;
|
9
12
|
}
|
10
|
-
|
13
|
+
|
11
14
|
&__content {
|
15
|
+
background: color('grey');
|
16
|
+
background: linear-gradient($angle, color('grey', 'step--2'), color('grey'));
|
12
17
|
color: color('white');
|
13
18
|
width: 100%;
|
14
19
|
@include padding('m-l');
|
@@ -33,9 +38,10 @@
|
|
33
38
|
}
|
34
39
|
|
35
40
|
&--petrol {
|
36
|
-
|
37
|
-
|
41
|
+
|
38
42
|
.c-campaign__content {
|
43
|
+
background: color('petrol', 'step-2');
|
44
|
+
background: linear-gradient($angle, color('petrol', 'step-2'), color('petrol', 'step-3'));
|
39
45
|
color: color('grey');
|
40
46
|
}
|
41
47
|
|
@@ -45,9 +51,10 @@
|
|
45
51
|
}
|
46
52
|
|
47
53
|
&--blue {
|
48
|
-
|
49
|
-
|
54
|
+
|
50
55
|
.c-campaign__content {
|
56
|
+
background: color('blue', 'step-3');
|
57
|
+
background: linear-gradient($angle, color('blue', 'step-2'), color('blue', 'step-3'));
|
51
58
|
color: color('grey');
|
52
59
|
}
|
53
60
|
|
@@ -57,9 +64,10 @@
|
|
57
64
|
}
|
58
65
|
|
59
66
|
&--orange {
|
60
|
-
|
61
|
-
|
67
|
+
|
62
68
|
.c-campaign__content {
|
69
|
+
background: color('utility-orange', 'step-2');
|
70
|
+
background: linear-gradient($angle, color('utility-orange', 'step-2'), color('utility-orange', 'step-3'));
|
63
71
|
color: color('grey', 'step--1');
|
64
72
|
}
|
65
73
|
|
@@ -96,30 +96,30 @@ module.exports = {
|
|
96
96
|
homepage: 'light'
|
97
97
|
}
|
98
98
|
},
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
99
|
+
{
|
100
|
+
title: 'Homepage with video',
|
101
|
+
context: {
|
102
|
+
title: 'We\'re big on small.',
|
103
|
+
subtitle: null,
|
104
|
+
content: '<p>We make scientific instruments and services that make the invisible visible, and the impossible possible.</p>',
|
105
|
+
videoplaceholder: {
|
106
|
+
src: 'https://p3.aprimocdn.net/malvernpanalytical/bf169dc6-9edb-4609-9ba8-add301206d1e/bridge-bg_Original%20file.webp?quality=60'
|
107
|
+
},
|
108
|
+
shortvideo: [
|
109
|
+
{ src: '' },
|
110
|
+
{ type: 'video/mp4' },
|
111
|
+
],
|
112
|
+
longvideo: [
|
113
|
+
{ src: '' },
|
114
|
+
{ type: 'video/mp4' },
|
115
|
+
],
|
116
|
+
cta: {
|
117
|
+
label: 'About Malvern Panalytical',
|
118
|
+
link: ''
|
119
|
+
},
|
120
|
+
homepage: 'dark'
|
121
|
+
}
|
122
|
+
}
|
123
123
|
],
|
124
124
|
props: [
|
125
125
|
{
|
@@ -75,6 +75,7 @@
|
|
75
75
|
{% endif %}
|
76
76
|
</figure>
|
77
77
|
|
78
|
+
{% if params.longvideo %}
|
78
79
|
<div id="lightboxVideo" class="c-lightbox u-hidden">
|
79
80
|
<div class="c-lightbox__close">
|
80
81
|
{{ icon({ id: 'cross' }) }}
|
@@ -84,4 +85,5 @@
|
|
84
85
|
<source src="https://p3.aprimocdn.net/malvernpanalytical/304f04aa-ae04-4bed-9946-ae3101152327/PN12593_Brand_Movie_Malvern_Panalytical_MIX_0dBfs_website_header_Original%20file.mp4" type="video/mp4">
|
85
86
|
</video>
|
86
87
|
</div>
|
87
|
-
</div>
|
88
|
+
</div>
|
89
|
+
{% endif %}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
{% inputWrapper params.error %}
|
2
|
-
<label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}
|
2
|
+
<label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}" for="{{ params.id }}">{{ params.label }}</label>
|
3
3
|
{% if params.button %}
|
4
4
|
<div class="u-flex u-border">
|
5
5
|
{% endif %}
|
6
|
-
<input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} />
|
6
|
+
<input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}{{ params.classes }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} />
|
7
7
|
{% if params.button %}
|
8
8
|
<button type="button" class="mp c-button--white">Search</button>
|
9
9
|
{% endif %}
|
@@ -41,6 +41,19 @@
|
|
41
41
|
min-height: 10rem;;
|
42
42
|
}
|
43
43
|
|
44
|
+
&--file {
|
45
|
+
border: 0;
|
46
|
+
padding: 0;
|
47
|
+
cursor: pointer;
|
48
|
+
|
49
|
+
@at-root ::-webkit-file-upload-button {
|
50
|
+
@extend %c-button;
|
51
|
+
@extend .c-button--blue;
|
52
|
+
display: inline-flex;
|
53
|
+
@include margin-right('xs');
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
44
57
|
&-error {
|
45
58
|
--error-state: #{color('red')};
|
46
59
|
position: relative;
|
@@ -1,21 +1,23 @@
|
|
1
1
|
.c-quote {
|
2
2
|
color: color('petrol', 'step-1');
|
3
3
|
padding-top: 74px;
|
4
|
-
@include padding
|
4
|
+
@include padding('2xl', 0, 'l', 'xl');
|
5
5
|
position: relative;
|
6
6
|
|
7
7
|
&:before {
|
8
8
|
content: '“';
|
9
|
-
|
9
|
+
color: color('petrol', 'step-3');
|
10
10
|
position: absolute;
|
11
11
|
height: 57px;
|
12
12
|
width: 45px;
|
13
13
|
left: 0;
|
14
|
-
top: 0;
|
14
|
+
top: 0.1em;
|
15
|
+
font-family: "Arial", sans-serif;
|
15
16
|
font-size: 10em;
|
16
17
|
font-weight: 900;
|
17
18
|
line-height: 0.9;
|
18
|
-
margin-left: -0.
|
19
|
+
margin-left: -0.025em;
|
20
|
+
z-index: -1;
|
19
21
|
}
|
20
22
|
|
21
23
|
p {
|
@@ -37,7 +37,7 @@
|
|
37
37
|
overflow-x: auto;
|
38
38
|
|
39
39
|
&-list {
|
40
|
-
border-bottom: 4px solid color('
|
40
|
+
border-bottom: 4px solid color('utility-blue', 'step-3');
|
41
41
|
display: flex;
|
42
42
|
width: 100%;
|
43
43
|
min-width: min-content;
|
@@ -58,7 +58,7 @@
|
|
58
58
|
@include padding(0, 0 , 's-m');
|
59
59
|
@include margin-right('m');
|
60
60
|
display: block;
|
61
|
-
border-bottom: 4px solid color('
|
61
|
+
border-bottom: 4px solid color('utility-blue', 'step-3');
|
62
62
|
margin-bottom: -4px;
|
63
63
|
position: relative;
|
64
64
|
z-index: 1;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<ul class="u-row">
|
14
14
|
<li><a href="/brand" class="{% if '/brand' in page.url %}c-library-page-active{% endif %}">Brand & visual identity</a></li>
|
15
15
|
<li><a href="/content" class="{% if '/content' in page.url %}c-library-page-active{% endif %}">Tone of voice</a></li>
|
16
|
-
<li><a href="/components" class="{% if '/components' in page.url or '/patterns' in page.url %}c-library-page-active{% endif %}">
|
16
|
+
<li><a href="/components" class="{% if '/components' in page.url or '/patterns' in page.url %}c-library-page-active{% endif %}">Component library</a></li>
|
17
17
|
<li class="u-petrol-step-2">V.{{ config.dsVersion }}</li>
|
18
18
|
</ul>
|
19
19
|
</nav>
|
package/src/_includes/layout.njk
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
document.documentElement.style.setProperty('--headerHeight', headerHeight)
|
40
40
|
}, 250);
|
41
41
|
</script>
|
42
|
-
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon
|
42
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon.svg">
|
43
43
|
<link rel="stylesheet" href="/build/scss/main.css" />
|
44
44
|
<script>window.MSInputMethodContext && document.documentMode && document.write('<script src="https://cdn.jsdelivr.net/gh/nuxodin/ie11CustomProperties@4.1.0/ie11CustomProperties.min.js"><\/script>');</script>
|
45
45
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach%2CDOMTokenList.prototype.forEach%2CNodeList.prototype.forEach%2CArray.from"></script>
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<h3>Brand & visual identity</h3>
|
6
6
|
<ul>
|
7
7
|
{{ libraryList('Overview', '/brand/', page.url) }}
|
8
|
+
{{ libraryList('The basics', '/brand/basics/', page.url) }}
|
8
9
|
{{ libraryList('Downloads', '/brand/downloads/', page.url) }}
|
9
10
|
{{ libraryList('Logo', '/brand/logo/', page.url) }}
|
10
11
|
{{ libraryList('Colors', '/brand/colors/', page.url) }}
|
@@ -8,25 +8,44 @@ function HeroVideo() {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
const lightboxTrigger = document.getElementById('playVideo');
|
11
|
-
const
|
11
|
+
const lightboxContainer = document.getElementById('lightboxVideo');
|
12
|
+
const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');
|
12
13
|
|
13
14
|
lightboxTrigger.addEventListener('click', e => {
|
14
|
-
videoBackground.
|
15
|
-
|
15
|
+
videoBackground.pause();
|
16
|
+
lightboxContainer.classList.remove('u-hidden');
|
17
|
+
checkVideos();
|
16
18
|
});
|
17
19
|
|
18
|
-
|
20
|
+
lightboxContainer.addEventListener('click', (e) => {
|
19
21
|
if (!e.target.classList.contains('c-lightbox__video')) {
|
20
22
|
videoBackground.setAttribute('autoplay','');
|
21
|
-
|
23
|
+
lightboxContainer.classList.add('u-hidden');
|
24
|
+
checkVideos();
|
22
25
|
}
|
23
26
|
});
|
24
27
|
window.addEventListener('keydown', function(e) {
|
25
28
|
if (e.key == "Escape") {
|
26
29
|
videoBackground.setAttribute('autoplay','');
|
27
|
-
|
30
|
+
lightboxContainer.classList.add('u-hidden');
|
31
|
+
checkVideos();
|
28
32
|
}
|
29
33
|
});
|
34
|
+
|
35
|
+
function checkVideos() {
|
36
|
+
if(lightboxContainer.classList.contains('u-hidden')) {
|
37
|
+
if (videoBackground.paused) {
|
38
|
+
videoBackground.play();
|
39
|
+
}
|
40
|
+
if (!lightboxVideo.paused) {
|
41
|
+
lightboxVideo.pause();
|
42
|
+
}
|
43
|
+
} else {
|
44
|
+
if (!videoBackground.paused) {
|
45
|
+
videoBackground.pause();
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
30
49
|
}
|
31
50
|
});
|
32
51
|
}
|
@@ -71,10 +71,10 @@ $colours: (
|
|
71
71
|
|
72
72
|
'grey': (
|
73
73
|
-50: mix(black, #CCC, 50%),
|
74
|
-
'step--2': mp-mix($f-mp-grey, black,
|
75
|
-
'step--1': mp-mix($f-mp-grey, black,
|
74
|
+
'step--2': mp-mix($f-mp-grey, black, 80%),
|
75
|
+
'step--1': mp-mix($f-mp-grey, black, 45%),
|
76
76
|
'step-0': $f-mp-grey,
|
77
|
-
'step-1': mp-mix($f-mp-grey, white,
|
77
|
+
'step-1': mp-mix($f-mp-grey, white, 48%),
|
78
78
|
'step-2': mp-mix($f-mp-grey, white, 76%),
|
79
79
|
'step-3': mp-mix($f-mp-grey, white, 92%)
|
80
80
|
),
|
@@ -55,6 +55,11 @@
|
|
55
55
|
}
|
56
56
|
}
|
57
57
|
|
58
|
+
&__hero {
|
59
|
+
color: white;
|
60
|
+
background: linear-gradient(color('petrol'), transparent), linear-gradient(45deg, color('blue'), color('petrol'));
|
61
|
+
}
|
62
|
+
|
58
63
|
&__body {
|
59
64
|
display: grid;
|
60
65
|
grid-template-rows: auto auto;
|
@@ -244,12 +249,15 @@
|
|
244
249
|
}
|
245
250
|
|
246
251
|
iframe {
|
247
|
-
position: absolute;
|
248
252
|
height: 100%;
|
249
253
|
width: 100%;
|
250
254
|
left: 0;
|
251
255
|
top: 0;
|
252
256
|
transition: all .3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
257
|
+
|
258
|
+
@media only screen and (min-width: 600px) {
|
259
|
+
position: absolute;
|
260
|
+
}
|
253
261
|
}
|
254
262
|
}
|
255
263
|
|
@@ -91,7 +91,8 @@
|
|
91
91
|
}
|
92
92
|
|
93
93
|
li + li,
|
94
|
-
li
|
94
|
+
li > ul,
|
95
|
+
li > ol {
|
95
96
|
@include margin-top('2xs');
|
96
97
|
}
|
97
98
|
}
|
@@ -130,15 +131,15 @@
|
|
130
131
|
|
131
132
|
@media (min-width: 35em) {
|
132
133
|
&:not(.o-prose--left-blockquote) blockquote {
|
133
|
-
padding-left
|
134
|
+
@include padding-left('3xl');
|
134
135
|
|
135
136
|
&:before {
|
136
|
-
left:
|
137
|
+
left: var(--space-xl);
|
137
138
|
}
|
138
139
|
}
|
139
140
|
|
140
141
|
&.o-prose--left-blockquote blockquote {
|
141
|
-
padding-right
|
142
|
+
@include padding-right('3xl');
|
142
143
|
}
|
143
144
|
}
|
144
145
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// Cutoff corner effect
|
2
|
+
|
3
|
+
$g : var(--gutter);
|
4
|
+
$og : calc(100% - var(--gutter));
|
5
|
+
|
6
|
+
@mixin cutoff($corner:"bottom-right") {
|
7
|
+
@if $corner == "top-left" {
|
8
|
+
clip-path: polygon(
|
9
|
+
$g 0,
|
10
|
+
100% 0,
|
11
|
+
100% 100%,
|
12
|
+
0 100%,
|
13
|
+
0 $g
|
14
|
+
);
|
15
|
+
} @else if $corner == "top-right" {
|
16
|
+
clip-path: polygon(
|
17
|
+
0 0,
|
18
|
+
$og 0,
|
19
|
+
100% $g,
|
20
|
+
100% 100%,
|
21
|
+
0 100%
|
22
|
+
);
|
23
|
+
} @else if $corner == "bottom-left" {
|
24
|
+
clip-path: polygon(
|
25
|
+
0 0,
|
26
|
+
100% 0,
|
27
|
+
100% 100%,
|
28
|
+
$g 100%,
|
29
|
+
0 $og
|
30
|
+
);
|
31
|
+
} @else {
|
32
|
+
clip-path: polygon(
|
33
|
+
0 0,
|
34
|
+
100% 0,
|
35
|
+
100% $og,
|
36
|
+
$og 100%,
|
37
|
+
0 100%
|
38
|
+
);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.u-cutoff {
|
43
|
+
@include cutoff
|
44
|
+
}
|
45
|
+
|
46
|
+
.u-cutoff--top-right {
|
47
|
+
@include cutoff("top-right")
|
48
|
+
}
|
49
|
+
|
50
|
+
.u-cutoff--top-left {
|
51
|
+
@include cutoff("top-left")
|
52
|
+
}
|
53
|
+
|
54
|
+
.u-cutoff--bottom-left {
|
55
|
+
@include cutoff("bottom-left")
|
56
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
title: The basics of our digital brand
|
3
|
+
layout: content-page
|
4
|
+
sidebar: brand
|
5
|
+
tags: brand
|
6
|
+
version: 0.0.0
|
7
|
+
status: 'Development'
|
8
|
+
---
|
9
|
+
|
10
|
+
## Text
|
11
|
+
- Our font is [Inter](/brand/typography).
|
12
|
+
- Text is colored MP Charcoal (#333333).
|
13
|
+
- 18px font size.
|
14
|
+
- We write in American English using [sentence case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
|
15
|
+
|
16
|
+
## Buttons
|
17
|
+
{% button 'Primary button' %}
|
18
|
+
{% button 'Secondary button' '' 'c-button--blue' %}
|
19
|
+
{% button 'Tertiary button' '' 'c-button--outline-green' %}
|
20
|
+
- Primary buttons are always colored MP Green (#13AA13). Please use this color sparingly, for the most important elements on the page.
|
21
|
+
- Secondary buttons may be colored MP Blue (#00A2C2), or outlined.
|
22
|
+
- The font is Inter Bold, 18px.
|
23
|
+
- 6px border-radius.
|
24
|
+
- Padding is 0.777em (horizontal) and 1.5em (vertical).
|
25
|
+
|
26
|
+
## Layout
|
27
|
+
- Use a plain white background, with a splash of color to emphasise important elements.
|
28
|
+
- Reduce visual clutter by using space to separate items, rather than lines or boxes. Don't be afraid of white space!
|
29
|
+
- Text is most comfortable to read when it's between 50-75 characters wide. This translates to 30-50 em.
|
30
|
+
|
31
|
+
## More details
|
32
|
+
- [Fonts and typography](../typography)
|
33
|
+
- [Colors](../colors)
|
34
|
+
- [Buttons](/components/button)
|
35
|
+
- [Tone of voice](/content)
|
package/src/brand/colors.njk
CHANGED
@@ -21,7 +21,7 @@ Step 0 is the 'default' shade for each color."
|
|
21
21
|
<div class="u-wrap--content">
|
22
22
|
|
23
23
|
{{ alert({
|
24
|
-
content: "<p>
|
24
|
+
content: "<p>If you're building a website which consumes the Franklin CSS via CDN, see the <a href='/components/colour'>Components ➝ colors</a> page instead.</p>",
|
25
25
|
type: "info"
|
26
26
|
})}}
|
27
27
|
|
@@ -139,7 +139,7 @@ Step 0 is the 'default' shade for each color."
|
|
139
139
|
|
140
140
|
{
|
141
141
|
name: "-1",
|
142
|
-
hex: '
|
142
|
+
hex: '1c1c1c',
|
143
143
|
cmyk: '00.00.00.95'
|
144
144
|
},
|
145
145
|
{
|
@@ -149,7 +149,7 @@ Step 0 is the 'default' shade for each color."
|
|
149
149
|
},
|
150
150
|
{
|
151
151
|
name: 1,
|
152
|
-
hex: '
|
152
|
+
hex: '959595',
|
153
153
|
cmyk: '00.00.00.70'
|
154
154
|
},
|
155
155
|
{
|