gatsby-matrix-theme 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.json +2 -2
- package/src/gatsby-core-theme/components/molecules/content/content.module.scss +34 -1
- package/src/gatsby-core-theme/components/molecules/content/index.js +15 -3
- package/src/gatsby-core-theme/components/organisms/navigation/index.js +9 -1
- package/storybook/public/{5.58b2efe7.iframe.bundle.js → 5.6fafb5f4.iframe.bundle.js} +3 -3
- package/storybook/public/{5.58b2efe7.iframe.bundle.js.LICENSE.txt → 5.6fafb5f4.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.6fafb5f4.iframe.bundle.js.map +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.4c12afb7.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.39a81a69.iframe.bundle.js → runtime~main.7b867edc.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.be5d297a.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.cc70e3aa.iframe.bundle.js.LICENSE.txt → vendors~main.be5d297a.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.be5d297a.iframe.bundle.js.map +1 -0
- package/storybook/public/5.58b2efe7.iframe.bundle.js.map +0 -1
- package/storybook/public/main.436e9745.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## [3.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.5...v3.0.6) (2021-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* content read more ([6f00226](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6f00226ebc277e02a78103e9987871200af0bb17))
|
|
7
|
+
* issue fix ([ac5b5e6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ac5b5e67e43d31d67cf0c37ecfbf0eb0c979323c))
|
|
8
|
+
* small style issue ([2e32e03](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e32e03904e809a3d2cc1ed444fc5dd1fc16cdeb))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Code Refactoring
|
|
12
|
+
|
|
13
|
+
* add custom styles to menu ([5fb35db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5fb35db8cdc8a4afdb72a768e62ff8c49661371c))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Config
|
|
17
|
+
|
|
18
|
+
* update core theme ([e2885b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2885b856a689cc0f2501d87d39d4f6e92b40f37))
|
|
19
|
+
* updated core theme ([2d2e722](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2d2e72239cba3cf0f6239fede523adf901ee21de))
|
|
20
|
+
* updated core version ([6c83579](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c8357910c12a57d527d691afaab74f2e6debc89))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* Merge branch 'show-more-content' into 'master' ([dfbe31f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dfbe31fd8cf1788ab3546f8ff0663ea5e21bd1e3))
|
|
24
|
+
* Merge branch 'tm-navigation-sticky' into 'master' ([239e204](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/239e2044d341183d843ed06548cfa330b3358bc4))
|
|
25
|
+
|
|
1
26
|
## [3.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.4...v3.0.5) (2021-12-02)
|
|
2
27
|
|
|
3
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"cross-env": "^7.0.2",
|
|
32
32
|
"dotenv": "8.2.0",
|
|
33
33
|
"gatsby": "^3.3.1",
|
|
34
|
-
"gatsby-core-theme": "^1.6.
|
|
34
|
+
"gatsby-core-theme": "^1.6.21",
|
|
35
35
|
"gatsby-image": "^3.3.0",
|
|
36
36
|
"gatsby-plugin-image": "^1.3.1",
|
|
37
37
|
"gatsby-plugin-postcss": "^4.3.0",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
td {
|
|
130
130
|
color: white !important;
|
|
131
131
|
background: var(--table-head-background);
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
border-radius: 0;
|
|
134
134
|
|
|
135
135
|
&:first-child {
|
|
@@ -237,6 +237,39 @@
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
+
|
|
241
|
+
@include max(mobile) {
|
|
242
|
+
&.showMore {
|
|
243
|
+
max-height: 17.8rem;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
position: relative;
|
|
246
|
+
|
|
247
|
+
&::before {
|
|
248
|
+
content: '';
|
|
249
|
+
position: absolute;
|
|
250
|
+
transition: all .25s ease-in-out;
|
|
251
|
+
height: 4rem;
|
|
252
|
+
right: 0;
|
|
253
|
+
bottom: 0;
|
|
254
|
+
left: 0;
|
|
255
|
+
background-image: linear-gradient(to bottom, rgba(209, 209, 209, 0), #ffffff);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.button {
|
|
262
|
+
margin: 3rem 0 0 1.6rem !important;
|
|
263
|
+
border: 2px solid #171f49;
|
|
264
|
+
width: calc(100% - 3.2rem);
|
|
265
|
+
font-style: normal;
|
|
266
|
+
font-weight: bold;
|
|
267
|
+
font-size: 1.8rem;
|
|
268
|
+
line-height: 3rem;
|
|
269
|
+
color: #171f49;
|
|
270
|
+
@include min(tablet) {
|
|
271
|
+
display: none;
|
|
272
|
+
}
|
|
240
273
|
}
|
|
241
274
|
|
|
242
275
|
.floatLeft {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
1
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
-
import React from 'react';
|
|
3
|
+
import React, { useState } from 'react';
|
|
3
4
|
import parse from 'html-react-parser';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
6
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
7
7
|
import { parseCss } from 'gatsby-core-theme/src/helpers/css-parser';
|
|
8
8
|
import styles from './content.module.scss';
|
|
9
9
|
|
|
10
10
|
const Content = ({ module }) => {
|
|
11
|
+
const { show_more_label, show_more_enabled } = module || {};
|
|
12
|
+
const [showMore, setShowMore] = useState(show_more_enabled === '1');
|
|
13
|
+
|
|
11
14
|
const replaceMedia = (node) => {
|
|
12
15
|
if (node.name === 'img') {
|
|
13
16
|
let stylesClass = null;
|
|
@@ -64,9 +67,13 @@ const Content = ({ module }) => {
|
|
|
64
67
|
}
|
|
65
68
|
};
|
|
66
69
|
|
|
70
|
+
const handleChange = () => {
|
|
71
|
+
setShowMore(!showMore);
|
|
72
|
+
};
|
|
73
|
+
|
|
67
74
|
return (
|
|
68
75
|
<>
|
|
69
|
-
<div className={styles.content}>
|
|
76
|
+
<div className={`${styles.content} ${showMore && styles.showMore}`}>
|
|
70
77
|
<div className={`${switchStyle(module.style)}`}>
|
|
71
78
|
{module.value &&
|
|
72
79
|
parse(module.value, {
|
|
@@ -74,6 +81,11 @@ const Content = ({ module }) => {
|
|
|
74
81
|
})}
|
|
75
82
|
</div>
|
|
76
83
|
</div>
|
|
84
|
+
{showMore && (
|
|
85
|
+
<button type="button" className={styles.button} onClick={handleChange}>
|
|
86
|
+
{show_more_label}
|
|
87
|
+
</button>
|
|
88
|
+
)}
|
|
77
89
|
</>
|
|
78
90
|
);
|
|
79
91
|
};
|
|
@@ -32,6 +32,7 @@ const Navigation = ({
|
|
|
32
32
|
sticky = true,
|
|
33
33
|
template,
|
|
34
34
|
children,
|
|
35
|
+
customStyles,
|
|
35
36
|
}) => {
|
|
36
37
|
const navRef = useRef(React.createRef());
|
|
37
38
|
const showMenu = template !== 'ppc';
|
|
@@ -74,7 +75,13 @@ const Navigation = ({
|
|
|
74
75
|
</Link>
|
|
75
76
|
{showMenu && (
|
|
76
77
|
<>
|
|
77
|
-
<Menu
|
|
78
|
+
<Menu
|
|
79
|
+
section={section}
|
|
80
|
+
menu={menu}
|
|
81
|
+
options={options}
|
|
82
|
+
customStyles={customStyles}
|
|
83
|
+
gtmClass="main-menu-gtm"
|
|
84
|
+
/>
|
|
78
85
|
{hasSearch && <SearchForm className={styles.search} searchIcon={searchIcon} />}
|
|
79
86
|
</>
|
|
80
87
|
)}
|
|
@@ -121,6 +128,7 @@ Navigation.propTypes = {
|
|
|
121
128
|
}),
|
|
122
129
|
}),
|
|
123
130
|
sticky: PropTypes.bool,
|
|
131
|
+
customStyles: PropTypes.string,
|
|
124
132
|
};
|
|
125
133
|
|
|
126
134
|
export default Navigation;
|