mp-design-system 0.9.24 → 0.9.26
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 +1 -1
- package/src/_includes/components/breadcrumb/breadcrumb.njk +1 -1
- package/src/_includes/components/button/button.config.js +8 -1
- package/src/_includes/components/button/button.scss +25 -1
- package/src/_includes/components/card/card.config.js +43 -1
- package/src/_includes/components/card/card.scss +39 -0
- package/src/_includes/includes/system-header.njk +1 -1
- package/src/_includes/layout.njk +8 -4
- package/src/assets/scss/elements/reset.scss +2 -1
- package/src/assets/scss/foundations/animation.scss +4 -0
- package/src/assets/scss/foundations/index.scss +2 -1
- package/src/assets/scss/library.scss +3 -3
- package/src/brand/basics.md +4 -3
- package/src/brand/index.njk +1 -0
- package/src/components/index.njk +1 -0
- package/src/content/index.njk +1 -0
- package/src/index.njk +1 -0
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
</li>
|
11
11
|
{% else %}
|
12
12
|
<li class="c-breadcrumb__item" role="listitem">
|
13
|
-
<span class="c-breadcrumb__current" aria-current={{ item.label }}>{{ item.label}}</span>
|
13
|
+
<span class="c-breadcrumb__current" aria-current="{{ item.label }}">{{ item.label}}</span>
|
14
14
|
</li>
|
15
15
|
{% endif %}
|
16
16
|
{% endfor %}
|
@@ -49,6 +49,12 @@ module.exports = {
|
|
49
49
|
context: {
|
50
50
|
classes: 'c-button--small'
|
51
51
|
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
title: 'Loading',
|
55
|
+
context: {
|
56
|
+
classes: 'c-button--loading'
|
57
|
+
}
|
52
58
|
}
|
53
59
|
],
|
54
60
|
props: [
|
@@ -69,7 +75,8 @@ module.exports = {
|
|
69
75
|
['c-button--[colour]', 'petrol, red, blue, white, outline-green, outline-white'],
|
70
76
|
['c-button--small', '', 'Shrinks the button'],
|
71
77
|
['c-button--wide', '', 'Makes the button 100% width'],
|
72
|
-
['c-button--tight', '', 'Reduces the left/right padding']
|
78
|
+
['c-button--tight', '', 'Reduces the left/right padding'],
|
79
|
+
['c-button--loading', '', 'Replace the button text with a loading indicator']
|
73
80
|
]
|
74
81
|
}
|
75
82
|
]
|
@@ -144,4 +144,28 @@
|
|
144
144
|
@include step(-1);
|
145
145
|
padding: 0.5em 1em;
|
146
146
|
}
|
147
|
-
|
147
|
+
|
148
|
+
&--loading {
|
149
|
+
color: transparent;
|
150
|
+
transition: color .3s ease;
|
151
|
+
|
152
|
+
&:after {
|
153
|
+
content: '⌛';
|
154
|
+
color: color("white");
|
155
|
+
position: absolute;
|
156
|
+
}
|
157
|
+
|
158
|
+
@media (prefers-reduced-motion:no-preference) {
|
159
|
+
&:after {
|
160
|
+
content: '';
|
161
|
+
animation: spin 1.2s ease infinite;
|
162
|
+
border-radius: 50%;
|
163
|
+
border: 3px solid #3336;
|
164
|
+
border-top-color: color("white");
|
165
|
+
display: block;
|
166
|
+
height: 1em;
|
167
|
+
width: 1em;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
@@ -731,7 +731,49 @@ module.exports = {
|
|
731
731
|
content: '<p>确定聚合物材料的分子量、粒度和结构</p>'
|
732
732
|
}
|
733
733
|
}
|
734
|
-
}
|
734
|
+
},
|
735
|
+
{
|
736
|
+
title: 'Event card (with image)',
|
737
|
+
preview: 'content-width',
|
738
|
+
context: {
|
739
|
+
theme: {
|
740
|
+
border: false,
|
741
|
+
size: 'small',
|
742
|
+
layout: 'multi',
|
743
|
+
name: 'event',
|
744
|
+
inlineSpecs: true,
|
745
|
+
corner: true,
|
746
|
+
},
|
747
|
+
image: {
|
748
|
+
src: '/static/img/blog-page-image-1.jpg',
|
749
|
+
alt: 'Product image alt'
|
750
|
+
},
|
751
|
+
header: {
|
752
|
+
title: 'Discover how on-line particle sizing optimises mining analytics.',
|
753
|
+
date: {
|
754
|
+
date: new Date(),
|
755
|
+
time: '11:00 – 12:00',
|
756
|
+
timezone: 'EST'
|
757
|
+
},
|
758
|
+
meta: [
|
759
|
+
'English'
|
760
|
+
],
|
761
|
+
},
|
762
|
+
body: {
|
763
|
+
keySpecs: [
|
764
|
+
{
|
765
|
+
title: 'Products',
|
766
|
+
term: 'Morphologi G3-ID'
|
767
|
+
},
|
768
|
+
{
|
769
|
+
title: 'Technologies',
|
770
|
+
term: 'Morphologically-Directed Raman Spectroscopy'
|
771
|
+
}
|
772
|
+
]
|
773
|
+
},
|
774
|
+
link: '#'
|
775
|
+
}
|
776
|
+
},
|
735
777
|
],
|
736
778
|
|
737
779
|
props: [
|
@@ -353,6 +353,7 @@
|
|
353
353
|
text-align: right;
|
354
354
|
font-size: 1.5rem;
|
355
355
|
transition: 300ms color;
|
356
|
+
z-index: 1;
|
356
357
|
|
357
358
|
.c-icon {
|
358
359
|
position: relative;
|
@@ -403,6 +404,44 @@
|
|
403
404
|
flex-wrap: wrap;
|
404
405
|
@include gap("s-l");
|
405
406
|
}
|
407
|
+
|
408
|
+
&--event.c-card--has-image {
|
409
|
+
@extend .c-card--switch;
|
410
|
+
|
411
|
+
.c-card__wrapper {
|
412
|
+
@include padding(0);
|
413
|
+
|
414
|
+
.c-card__primary {
|
415
|
+
@include padding("s-m");
|
416
|
+
}
|
417
|
+
|
418
|
+
.c-card__image {
|
419
|
+
position: relative;
|
420
|
+
|
421
|
+
img {
|
422
|
+
height: 100%;
|
423
|
+
object-fit: cover;
|
424
|
+
aspect-ratio: 16 / 9;
|
425
|
+
}
|
426
|
+
}
|
427
|
+
|
428
|
+
@media (min-width: 55em) {
|
429
|
+
.c-card__primary {
|
430
|
+
width: calc(60% - 18px) !important;
|
431
|
+
width: calc(60% - var(--space-s-m)) !important;
|
432
|
+
}
|
433
|
+
|
434
|
+
.c-card__image {
|
435
|
+
width: calc(40% - 18px) !important;
|
436
|
+
width: calc(40% - var(--space-s-m)) !important;
|
437
|
+
|
438
|
+
img {
|
439
|
+
position: absolute;
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
}
|
444
|
+
}
|
406
445
|
}
|
407
446
|
|
408
447
|
// IE11 fix
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<header class="c-library__header u-split">
|
4
4
|
<a class="c-library__logo" href="/">
|
5
|
-
<img src="/static/svg/logo-small.svg" alt="Home" />
|
5
|
+
<img src="/static/svg/logo-small.svg" alt="Home" width="299" height="77" />
|
6
6
|
<span class="c-library__logo-name">
|
7
7
|
{% for item in config.logo %}
|
8
8
|
<span>{{ item }}</span>
|
package/src/_includes/layout.njk
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
7
|
<title>{{ fullTitle }}</title>
|
8
|
+
{% if description %} <meta name="description" content="{{ description }}" /> {% endif %}
|
8
9
|
<meta name="theme-color" content="#005461">
|
9
10
|
<meta property="og:type" content="website" />
|
10
11
|
<meta property="og:title" content="{{ fullTitle }}" />
|
@@ -13,7 +14,12 @@
|
|
13
14
|
<meta property="og:image" content="{{ config.openGraphImage }}" />
|
14
15
|
<meta property="og:image:alt" content="{{ config.name }}" />
|
15
16
|
<meta name="twitter:image" content="{{ config.openGraphImage }}" />
|
16
|
-
<link rel="preconnect" href="https://fonts.gstatic.com">
|
17
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
18
|
+
<link rel="preload" href="/build/Inter-Bold.af5441a3.woff2" as="font" type="font/woff2" crossorigin>
|
19
|
+
<link rel="preload" href="/build/Inter-Regular.ed77b881.woff2" as="font" type="font/woff2" crossorigin>
|
20
|
+
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" as="style">
|
21
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon.svg">
|
22
|
+
<link rel="stylesheet" href="/build/scss/main.css" />
|
17
23
|
<script>
|
18
24
|
if(document.documentElement){
|
19
25
|
document.documentElement.classList.add('has-js');
|
@@ -40,8 +46,7 @@
|
|
40
46
|
document.documentElement.style.setProperty('--headerHeight', headerHeight)
|
41
47
|
}, 250);
|
42
48
|
</script>
|
43
|
-
<
|
44
|
-
<link rel="stylesheet" href="/build/scss/main.css" />
|
49
|
+
<script src="/build/js/app.js" defer></script>
|
45
50
|
<script>window.MSInputMethodContext && document.documentMode && document.write('<script src="https://cdn.jsdelivr.net/gh/nuxodin/ie11CustomProperties@4.1.0/ie11CustomProperties.min.js"><\/script>');</script>
|
46
51
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach%2CDOMTokenList.prototype.forEach%2CNodeList.prototype.forEach%2CArray.from"></script>
|
47
52
|
{% block head %}{% endblock %}
|
@@ -49,7 +54,6 @@
|
|
49
54
|
<body class="{{ bodyClass }}">
|
50
55
|
{% block inner %}{% endblock %}
|
51
56
|
|
52
|
-
<script src="/build/js/app.js"></script>
|
53
57
|
<script>
|
54
58
|
(function() {
|
55
59
|
// Prevent empty links from jumping to the top of page when clicked
|
package/src/brand/basics.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: The basics of our digital brand
|
3
|
+
description: A simple style guide for getting started with Malvern Panalytical's Franklin design system
|
3
4
|
layout: content-page
|
4
5
|
sidebar: brand
|
5
6
|
tags: brand
|
@@ -14,9 +15,9 @@ status: 'Development'
|
|
14
15
|
- We write in American English using [sentence case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
|
15
16
|
|
16
17
|
## Buttons
|
17
|
-
{% button 'Primary button' %}
|
18
|
-
{% button 'Secondary button' '' 'c-button--blue' %}
|
19
|
-
{% button 'Tertiary button' '' 'c-button--outline-green' %}
|
18
|
+
{% button 'Primary button' '#' %}
|
19
|
+
{% button 'Secondary button' '#' 'c-button--blue' %}
|
20
|
+
{% button 'Tertiary button' '#' 'c-button--outline-green' %}
|
20
21
|
- Primary buttons are always colored MP Green (#13AA13). Please use this color sparingly, for the most important elements on the page.
|
21
22
|
- Secondary buttons may be colored MP Blue (#00A2C2), or outlined.
|
22
23
|
- The font is Inter Bold, 18px.
|
package/src/brand/index.njk
CHANGED
package/src/components/index.njk
CHANGED
package/src/content/index.njk
CHANGED
package/src/index.njk
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: "Welcome"
|
3
3
|
subtitle: Our design system helps us create consistent experiences across our websites and beyond. It also makes the design and development process faster, more efficient and scalable.
|
4
|
+
description: Franklin is Malvern Panalytical's design system for public-facing websites and digital products.
|
4
5
|
layout: system-home-page
|
5
6
|
renderData:
|
6
7
|
title: "Welcome to the Franklin design system"
|