mp-design-system 1.2.27 → 1.2.30
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2 -2
- package/src/_includes/components/button/button.scss +1 -1
- package/src/_includes/components/card/existing-customer-card.config.js +51 -0
- package/src/_includes/components/card/existing-customer-card.njk +40 -0
- package/src/_includes/components/card/existing-customer-card.scss +100 -0
- package/src/_includes/components/card/industry-card.config.js +26 -3
- package/src/_includes/components/card/industry-card.njk +32 -6
- package/src/_includes/components/card/industry-card.scss +76 -6
- package/src/_includes/components/card/macro.njk +14 -2
- package/src/_includes/components/card/measurement-type-card.config.js +35 -0
- package/src/_includes/components/card/measurement-type-card.njk +35 -0
- package/src/_includes/components/card/measurement-type-card.scss +56 -0
- package/src/_includes/components/card/{product-comparison-card.config.js → product-card.config.js} +28 -27
- package/src/_includes/components/card/product-card.njk +50 -0
- package/src/_includes/components/card/product-card.scss +88 -0
- package/src/_includes/components/card/search-result-card.config.js +2 -2
- package/src/_includes/components/card/search-result-card.njk +27 -18
- package/src/_includes/components/card/search-result-card.scss +5 -5
- package/src/_includes/components/card/technology-card.config.js +35 -0
- package/src/_includes/components/card/technology-card.njk +35 -0
- package/src/_includes/components/card/technology-card.scss +56 -0
- package/src/_includes/components/component/preview-fixed-width.njk +5 -0
- package/src/_includes/components/eyebrow/eyebrow.config.js +14 -0
- package/src/_includes/components/eyebrow/eyebrow.scss +10 -0
- package/src/_includes/components/signpost/signpost.config.js +14 -1
- package/src/_includes/components/signpost/signpost.njk +7 -4
- package/src/_includes/components/signpost/signpost.scss +23 -0
- package/src/_includes/components/tabs/tabs.scss +4 -0
- package/src/_includes/components/twi/twi.scss +4 -0
- package/src/_includes/layout.njk +0 -2
- package/src/_includes/navigation/corporate.njk +0 -3
- package/src/assets/scss/components/index.scss +4 -1
- package/src/assets/scss/components/product-finder.scss +1 -1
- package/src/assets/scss/tools/cutoff.scss +5 -1
- package/src/assets/scss/tools/index.scss +11 -7
- package/src/assets/scss/utilities/space.scss +6 -0
- package/src/index.njk +1 -1
- package/src/prototype/events-hub.njk +463 -0
- package/src/prototype/index.njk +251 -182
- package/src/prototype/range.njk +5 -5
- package/src/prototype/sections.njk +6 -1
- package/src/static/svg/icon-globe-alt.svg +4 -0
- package/src/static/svg/icon-live-webinars.svg +6 -0
- package/src/static/svg/icon-recorded-webinars.svg +4 -0
- package/src/static/svg/icon-user-trainings.svg +5 -0
- package/src/_includes/components/card/product-comparison-card.njk +0 -37
- package/src/_includes/components/card/product-comparison-card.scss +0 -79
- /package/src/assets/fonts/{inter-bold.woff → Inter-Bold.woff} +0 -0
- /package/src/assets/fonts/{inter-bold.woff2 → Inter-Bold.woff2} +0 -0
- /package/src/assets/fonts/{inter-regular.woff → Inter-Regular.woff} +0 -0
- /package/src/assets/fonts/{inter-regular.woff2 → Inter-Regular.woff2} +0 -0
- /package/src/assets/fonts/{inter-semibold.woff → Inter-SemiBold.woff} +0 -0
- /package/src/assets/fonts/{inter-semibold.woff2 → Inter-SemiBold.woff2} +0 -0
@@ -0,0 +1,88 @@
|
|
1
|
+
.c-product-card {
|
2
|
+
background: color('white');
|
3
|
+
display: flex;
|
4
|
+
flex-flow: column;
|
5
|
+
border: 1px solid color('petrol', 'step-2');
|
6
|
+
|
7
|
+
&__body {
|
8
|
+
@include padding('s-m');
|
9
|
+
display: flex;
|
10
|
+
flex-flow: column;
|
11
|
+
flex-grow: 1;
|
12
|
+
|
13
|
+
& > * + * {
|
14
|
+
@include margin-top('xs');
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
&__heading {
|
19
|
+
@extend .c-h, .c-h--step-0;
|
20
|
+
}
|
21
|
+
|
22
|
+
&__lede {
|
23
|
+
@extend .u-step--1;
|
24
|
+
}
|
25
|
+
|
26
|
+
&__footer {
|
27
|
+
@include margin-top('auto');
|
28
|
+
@include padding-top('s');
|
29
|
+
display: flex;
|
30
|
+
flex-flow: row;
|
31
|
+
flex-wrap: wrap;
|
32
|
+
gap: var(--space-2xs);
|
33
|
+
|
34
|
+
& > * {
|
35
|
+
flex-grow: 1;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
&__image {
|
40
|
+
height: 10em;
|
41
|
+
order: -1;
|
42
|
+
|
43
|
+
img {
|
44
|
+
height: 100%;
|
45
|
+
width: 100%;
|
46
|
+
aspect-ratio: 16/9;
|
47
|
+
object-fit: cover;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
.c-product-card--features-list {
|
53
|
+
.c-product-card {
|
54
|
+
&__heading {
|
55
|
+
@extend .c-h--step-1;
|
56
|
+
}
|
57
|
+
|
58
|
+
&__lede {
|
59
|
+
@extend .u-step-0;
|
60
|
+
}
|
61
|
+
|
62
|
+
&__features-list {
|
63
|
+
@include margin-top('2xs');
|
64
|
+
list-style: none;
|
65
|
+
|
66
|
+
&-heading {
|
67
|
+
@include margin-top('s');
|
68
|
+
font-weight: weight("bold");
|
69
|
+
}
|
70
|
+
|
71
|
+
& > * + * {
|
72
|
+
@include margin-top('3xs');
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
&__feature {
|
77
|
+
&--tick {
|
78
|
+
svg {
|
79
|
+
color: color('green');
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
&--cross {
|
84
|
+
color: color('grey', 'step-2');
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -11,7 +11,7 @@ module.exports = {
|
|
11
11
|
context: {
|
12
12
|
title: 'Mastersizer range',
|
13
13
|
description: 'The Mastersizer range of laser diffraction particle size analyzers set the standard for delivering rapid, accurate particle size distributions for both wet and dry dispersions.',
|
14
|
-
|
14
|
+
link: '/en/products/product-range/mastersizer-range',
|
15
15
|
tag: 'Product range'
|
16
16
|
},
|
17
17
|
variants: [
|
@@ -21,7 +21,7 @@ module.exports = {
|
|
21
21
|
table: [
|
22
22
|
['title', 'string'],
|
23
23
|
['description', 'string'],
|
24
|
-
['
|
24
|
+
['link', 'string'],
|
25
25
|
['tag', 'string'],
|
26
26
|
]
|
27
27
|
}
|
@@ -1,24 +1,33 @@
|
|
1
1
|
{%- from "components/eyebrow/macro.njk" import eyebrow -%}
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
<article class="mp c-search-result-card">
|
4
|
+
<header class="c-search-result-card__header">
|
5
|
+
{% if params.title | length %}
|
6
|
+
<h2 class="c-search-result-card__title">
|
7
|
+
{% if params.link | length %}
|
8
|
+
<a href="{{ params.link }}" aria-label="{{ params.title }}">
|
8
9
|
{{ params.title }}
|
9
10
|
</a>
|
10
|
-
|
11
|
-
|
12
|
-
<div class="c-search-result-card__tag">
|
13
|
-
{{ eyebrow({
|
14
|
-
text: params.tag,
|
15
|
-
colour: 'blue'
|
16
|
-
}) }}
|
17
|
-
</div>
|
11
|
+
{% else %}
|
12
|
+
{{ params.title }}
|
18
13
|
{% endif %}
|
19
|
-
</
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
</h2>
|
15
|
+
{% endif %}
|
16
|
+
{% if params.tag | length %}
|
17
|
+
<div class="c-search-result-card__tag">
|
18
|
+
{{ eyebrow({
|
19
|
+
text: params.tag,
|
20
|
+
colour: 'blue'
|
21
|
+
}) }}
|
23
22
|
</div>
|
24
|
-
|
23
|
+
{% endif %}
|
24
|
+
</header>
|
25
|
+
<div class="c-search-result-card__body">
|
26
|
+
{% if params.description | length %}
|
27
|
+
<p class="c-search-result-card__description">{{ params.description }}</p>
|
28
|
+
{% endif %}
|
29
|
+
{% if params.link | length %}
|
30
|
+
<span class="c-search-result-card__url">{{ params.link }}</span>
|
31
|
+
{% endif %}
|
32
|
+
</div>
|
33
|
+
</article>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
outline: 2px solid color('petrol');
|
9
9
|
}
|
10
10
|
|
11
|
-
&:where(:hover
|
11
|
+
&:where(:hover) .c-search-result-card__title {
|
12
12
|
text-decoration: underline;
|
13
13
|
text-underline-offset: 0.1em;
|
14
14
|
}
|
@@ -24,10 +24,6 @@
|
|
24
24
|
|
25
25
|
a {
|
26
26
|
@include clickable-parent;
|
27
|
-
|
28
|
-
&:focus {
|
29
|
-
outline: 0;
|
30
|
-
}
|
31
27
|
}
|
32
28
|
}
|
33
29
|
|
@@ -44,5 +40,9 @@
|
|
44
40
|
|
45
41
|
&__url {
|
46
42
|
color: color('utility-blue');
|
43
|
+
overflow: hidden;
|
44
|
+
display: -webkit-box;
|
45
|
+
-webkit-line-clamp: 1;
|
46
|
+
-webkit-box-orient: vertical;
|
47
47
|
}
|
48
48
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
const categories = require('../component/categories');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
title: 'Technology card',
|
5
|
+
category: categories.card,
|
6
|
+
component: {
|
7
|
+
name: 'technology-card',
|
8
|
+
folder: 'card'
|
9
|
+
},
|
10
|
+
preview: 'cards-three',
|
11
|
+
context: {
|
12
|
+
title: 'X-ray Diffraction (XRD)',
|
13
|
+
link: '#',
|
14
|
+
description: 'XRD is the only laboratory technique that non-destructively and accurately obtains information such as chemical composition.',
|
15
|
+
image: {
|
16
|
+
src: '/static/img/range-product-1.jpg',
|
17
|
+
alt: ''
|
18
|
+
},
|
19
|
+
footer: {
|
20
|
+
button: {
|
21
|
+
label: 'View technology'
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
variants: [],
|
26
|
+
props: [
|
27
|
+
{
|
28
|
+
table: [
|
29
|
+
['title', 'string'],
|
30
|
+
['link', 'string'],
|
31
|
+
['image', 'object', 'Image object']
|
32
|
+
]
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{%- from "components/twi/macro.njk" import twi -%}
|
2
|
+
|
3
|
+
{%- set classes = 'mp c-technology-card' -%}
|
4
|
+
|
5
|
+
{%- if params.classes -%}{% set classes = classes + ' ' + params.classes %}{%- endif -%}
|
6
|
+
|
7
|
+
<article class="{{ classes }}" role="article" aria-label="Technology card">
|
8
|
+
<div class="c-technology-card__body">
|
9
|
+
{% if params.title | length %}
|
10
|
+
<h3 class="c-technology-card__heading">
|
11
|
+
{% if params.link | length %}
|
12
|
+
<a href="{{ params.link }}" aria-label="{{ params.title }}">
|
13
|
+
{{ params.title }}
|
14
|
+
</a>
|
15
|
+
{% else %}
|
16
|
+
{{ params.title }}
|
17
|
+
{% endif %}
|
18
|
+
</h3>
|
19
|
+
{% endif %}
|
20
|
+
{% if params.description | length %}
|
21
|
+
<p class="c-technology-card__lede">{{ params.description }}</p>
|
22
|
+
{% endif %}
|
23
|
+
{% if params.footer.button | length %}
|
24
|
+
<footer class="c-technology-card__footer">
|
25
|
+
{{ twi({ label: params.footer.button.label, icon: 'arrow-right', classes: 'c-twi--small u-link' }) }}
|
26
|
+
</footer>
|
27
|
+
{% endif %}
|
28
|
+
</div>
|
29
|
+
{% if params.image | length %}
|
30
|
+
<figure class="c-technology-card__image">
|
31
|
+
<img src="{{ params.image.src }}" alt="{{ params.image.alt or params.title }}" />
|
32
|
+
</figure>
|
33
|
+
{% endif %}
|
34
|
+
</article>
|
35
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
.c-technology-card {
|
2
|
+
background: color('white');
|
3
|
+
display: flex;
|
4
|
+
flex-flow: column;
|
5
|
+
border: 1px solid color('petrol', 'step-2');
|
6
|
+
position: relative;
|
7
|
+
|
8
|
+
&:focus-within {
|
9
|
+
outline: 2px solid color('petrol');
|
10
|
+
}
|
11
|
+
|
12
|
+
&:where(:hover) .c-twi.u-link {
|
13
|
+
text-decoration: underline;
|
14
|
+
text-underline-offset: 0.1em;
|
15
|
+
}
|
16
|
+
|
17
|
+
&__body {
|
18
|
+
@include padding('s-m');
|
19
|
+
display: flex;
|
20
|
+
flex-flow: column;
|
21
|
+
flex-grow: 1;
|
22
|
+
|
23
|
+
& > * + * {
|
24
|
+
@include margin-top('xs');
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
&__heading {
|
29
|
+
@extend .c-h, .c-h--step-0;
|
30
|
+
|
31
|
+
a {
|
32
|
+
@include clickable-parent;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
&__lede {
|
37
|
+
@extend .u-step--1;
|
38
|
+
}
|
39
|
+
|
40
|
+
&__footer {
|
41
|
+
@include margin-top('auto');
|
42
|
+
@include padding-top('s');
|
43
|
+
}
|
44
|
+
|
45
|
+
&__image {
|
46
|
+
height: 10em;
|
47
|
+
order: -1;
|
48
|
+
|
49
|
+
img {
|
50
|
+
height: 100%;
|
51
|
+
width: 100%;
|
52
|
+
aspect-ratio: 16/9;
|
53
|
+
object-fit: cover;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
@@ -15,6 +15,20 @@ module.exports = {
|
|
15
15
|
colour: 'blue'
|
16
16
|
}
|
17
17
|
},
|
18
|
+
{
|
19
|
+
title: 'Blue step 2',
|
20
|
+
context: {
|
21
|
+
text: 'Product range',
|
22
|
+
colour: 'blue-step-2'
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
title: 'Grey',
|
27
|
+
context: {
|
28
|
+
text: 'Product range',
|
29
|
+
colour: 'grey'
|
30
|
+
}
|
31
|
+
},
|
18
32
|
{
|
19
33
|
title: 'Petrol',
|
20
34
|
context: {
|
@@ -11,6 +11,15 @@
|
|
11
11
|
background-color: color('blue');
|
12
12
|
}
|
13
13
|
|
14
|
+
&--blue-step-2 {
|
15
|
+
background-color: color('blue', 'step-2');
|
16
|
+
color: color('petrol');
|
17
|
+
}
|
18
|
+
|
19
|
+
&--grey {
|
20
|
+
background-color: color('grey');
|
21
|
+
}
|
22
|
+
|
14
23
|
&--petrol {
|
15
24
|
background-color: color('petrol');
|
16
25
|
}
|
@@ -25,5 +34,6 @@
|
|
25
34
|
|
26
35
|
&--utility-orange {
|
27
36
|
background-color: color('utility-orange');
|
37
|
+
color: color('grey');
|
28
38
|
}
|
29
39
|
}
|
@@ -12,5 +12,18 @@ module.exports = {
|
|
12
12
|
icon: 'large-student',
|
13
13
|
title: 'Dive into our knowledge center',
|
14
14
|
description: 'Our huge freely-available library of manuals, instrument and application information.'
|
15
|
-
}
|
15
|
+
},
|
16
|
+
variants: [
|
17
|
+
{
|
18
|
+
title: "Vertical",
|
19
|
+
preview: 'cards-three',
|
20
|
+
context: {
|
21
|
+
direction: 'vertical',
|
22
|
+
size: 'l',
|
23
|
+
color: 'blue',
|
24
|
+
icon: 'icon-user-training',
|
25
|
+
description: false
|
26
|
+
}
|
27
|
+
}
|
28
|
+
]
|
16
29
|
}
|
@@ -1,11 +1,14 @@
|
|
1
|
-
<article
|
2
|
-
|
1
|
+
<article
|
2
|
+
class="mp c-signpost {{ "c-signpost--vertical" if params.direction == "vertical" }} {{ "c-signpost--l" if params.size == "l" }} {{ params.classes }}">
|
3
|
+
<a class="c-signpost__link {{ "u-white u-bg-" if params.color }}{{params.color}}" href="{{ params.link }}">
|
3
4
|
<figure class="c-signpost__image">
|
4
5
|
<img src="/static/svg/{{ params.icon }}.svg" />
|
5
6
|
</figure>
|
6
7
|
<div class="c-signpost__content u-flow--2xs">
|
7
|
-
<h3 class="c-h c-h--step--1">{{ params.title }}</h3>
|
8
|
-
|
8
|
+
<h3 class="{{ "c-h c-h--step--1" if params.direction !== "vertical" }}">{{ params.title }}</h3>
|
9
|
+
{% if params.description %}
|
10
|
+
<p>{{ params.description }}</p>
|
11
|
+
{% endif %}
|
9
12
|
</div>
|
10
13
|
</a>
|
11
14
|
</article>
|
@@ -10,6 +10,11 @@
|
|
10
10
|
max-width: 72px;
|
11
11
|
flex-grow: 1;
|
12
12
|
flex-shrink: 0;
|
13
|
+
|
14
|
+
.c-signpost--l & {
|
15
|
+
max-width: var(--space-3xl);
|
16
|
+
width: auto;
|
17
|
+
}
|
13
18
|
}
|
14
19
|
|
15
20
|
&__content {
|
@@ -19,9 +24,27 @@
|
|
19
24
|
color: color('utility-blue');
|
20
25
|
text-decoration: underline;
|
21
26
|
}
|
27
|
+
|
28
|
+
.c-signpost--l & {
|
29
|
+
@include step(0);
|
30
|
+
}
|
22
31
|
}
|
23
32
|
|
24
33
|
&:hover &__content p {
|
25
34
|
text-decoration: none;
|
26
35
|
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.c-signpost--vertical {
|
39
|
+
.c-signpost__link {
|
40
|
+
@include cutoff($size: #{var(--space-m)});
|
41
|
+
@include padding('m');
|
42
|
+
flex-direction: column;
|
43
|
+
text-align: center;
|
44
|
+
}
|
45
|
+
|
46
|
+
.c-signpost__image {
|
47
|
+
@include margin-bottom('s-m');
|
48
|
+
margin-right: 0;
|
49
|
+
}
|
27
50
|
}
|
package/src/_includes/layout.njk
CHANGED
@@ -16,8 +16,6 @@
|
|
16
16
|
<meta property="og:image:alt" content="{{ config.name }}" />
|
17
17
|
<meta name="twitter:image" content="{{ config.openGraphImage }}" />
|
18
18
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
19
|
-
<link rel="preload" href="/build/Inter-Bold.af5441a3.woff2" as="font" type="font/woff2" crossorigin>
|
20
|
-
<link rel="preload" href="/build/Inter-Regular.ed77b881.woff2" as="font" type="font/woff2" crossorigin>
|
21
19
|
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" as="style">
|
22
20
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon.svg">
|
23
21
|
<link rel="stylesheet" href="/build/scss/main.css" />
|
@@ -4,9 +4,12 @@
|
|
4
4
|
@import '~comp/button/button.scss';
|
5
5
|
@import '~comp/campaign/campaign.scss';
|
6
6
|
@import '~comp/card/card.scss';
|
7
|
+
@import '~comp/card/existing-customer-card.scss';
|
7
8
|
@import '~comp/card/industry-card.scss';
|
8
|
-
@import '~comp/card/
|
9
|
+
@import '~comp/card/measurement-type-card.scss';
|
10
|
+
@import '~comp/card/product-card.scss';
|
9
11
|
@import '~comp/card/search-result-card.scss';
|
12
|
+
@import '~comp/card/technology-card.scss';
|
10
13
|
@import '~comp/comparison-table/comparison-table.scss';
|
11
14
|
@import '~comp/embed/embed.scss';
|
12
15
|
@import '~comp/eyebrow/eyebrow.scss';
|
@@ -157,11 +157,15 @@
|
|
157
157
|
@mixin clickable-parent {
|
158
158
|
position: static;
|
159
159
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
160
|
+
&:focus {
|
161
|
+
outline: 0;
|
162
|
+
}
|
163
|
+
|
164
|
+
&::after {
|
165
|
+
content: '';
|
166
|
+
position: absolute;
|
167
|
+
inset: 0;
|
168
|
+
cursor: pointer !important;
|
169
|
+
display: flex;
|
170
|
+
}
|
167
171
|
}
|
@@ -90,6 +90,9 @@
|
|
90
90
|
.u-pad-s {
|
91
91
|
@include padding('s');
|
92
92
|
}
|
93
|
+
.u-pad-s-m {
|
94
|
+
@include padding('s-m');
|
95
|
+
}
|
93
96
|
.u-pad-m {
|
94
97
|
@include padding('m');
|
95
98
|
}
|
@@ -166,6 +169,9 @@
|
|
166
169
|
.u-margin-top-auto {
|
167
170
|
margin-top: auto;
|
168
171
|
}
|
172
|
+
.u-margin-top-negative-2xl {
|
173
|
+
margin-top: calc(-1 * #{var(--space-2xl)})
|
174
|
+
}
|
169
175
|
.u-margin-top-2xs {
|
170
176
|
@include margin-top('2xs');
|
171
177
|
}
|
package/src/index.njk
CHANGED
@@ -196,7 +196,7 @@ There are two other design systems in use at Malvern Panalytical.
|
|
196
196
|
## Latest updates
|
197
197
|
##### V1.2.13 - November 2023
|
198
198
|
|
199
|
-
- New [product comparison cards](/components/product-
|
199
|
+
- New [product comparison cards](/components/product-card-with-features-list)
|
200
200
|
- New ["Sticky" internal nav](/components/internal-nav-sticky-on-scroll)
|
201
201
|
- Updated [comparison table](/components/comparison-table) design
|
202
202
|
{% endset %}
|