gatsby-matrix-theme 7.1.39 → 7.1.42
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 +33 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/operators-table/index.js +1 -1
- package/src/components/molecules/newsletter/newsletter.module.scss +1 -1
- package/src/gatsby-core-theme/components/atoms/info-grid/index.js +35 -69
- package/src/gatsby-core-theme/components/atoms/info-grid/info-grid.module.scss +71 -32
- package/src/gatsby-core-theme/components/molecules/footer/footer.module.scss +1 -1
- package/src/gatsby-core-theme/components/organisms/head/index.js +3 -1
- package/storybook/public/{109.8c690dba.iframe.bundle.js → 139.bcea9d6e.iframe.bundle.js} +4 -4
- package/storybook/public/{109.8c690dba.iframe.bundle.js.LICENSE.txt → 139.bcea9d6e.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{109.8c690dba.iframe.bundle.js.map → 139.bcea9d6e.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.f5d8e990.iframe.bundle.js +1 -0
- package/storybook/public/runtime~main.c79754d5.iframe.bundle.js +1 -0
- package/storybook/public/6.538ca336.iframe.bundle.js +0 -1
- package/storybook/public/main.23b5dccd.iframe.bundle.js +0 -1
- package/storybook/public/runtime~main.65a310f1.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## [7.1.42](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.41...v7.1.42) (2022-07-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add variables for colors ([74c5724](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/74c572460c851d5059c13cc0f234707f2a53648d))
|
|
7
|
+
* fix small bug in the transition of item ([4204d05](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4204d05e5172bf3a71880bd93cfb0fc722167dd1))
|
|
8
|
+
|
|
9
|
+
## [7.1.41](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.40...v7.1.41) (2022-07-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* add padding right ([7da15c9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7da15c9a17642df32e9a7eafc84721384ae4a4f5))
|
|
15
|
+
* change site lang irishluck ([0c887f0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0c887f023e487b1785d562b1acaca5c88a05758a))
|
|
16
|
+
* cleanup code ([f758661](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f7586616e0f1a1844675162ab551301fa9f73e83))
|
|
17
|
+
* fix small issue ([56dde35](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/56dde35eaabfe8098831c2f699d05c24f15fa581))
|
|
18
|
+
* make style for footer ([e468c0b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e468c0bfa3862835ba7fa9975659078b805c9919))
|
|
19
|
+
* replace slider with new simple slider(scroll) ([1140622](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/11406223b9f1849cf0d234adf7c3cf3e3887e98c))
|
|
20
|
+
* update gatsby core ([51b5b56](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/51b5b56ac3f0bf5bd173e54816059a1bf4500392))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* Merge branch 'update-gatsby-core' into 'master' ([172d18c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/172d18ceadab3a797c13c2c934adc65095c81152))
|
|
24
|
+
* Merge branch 'tm-2961-slider-component' into 'master' ([bad8dba](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bad8dbade7a88ce4334bc9cb713947eeca7a6a9f))
|
|
25
|
+
* Merge branch 'tm-2974-lang-tag' into 'master' ([8ec4ba2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ec4ba272bb9331bbf4850ff0e80e485502e4b72))
|
|
26
|
+
|
|
27
|
+
## [7.1.40](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.39...v7.1.40) (2022-07-20)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* operator name in cards v2 table style ([6986377](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/698637748cba6556c2babb0130e6bf1995e0a934))
|
|
33
|
+
|
|
1
34
|
## [7.1.39](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.38...v7.1.39) (2022-07-19)
|
|
2
35
|
|
|
3
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.42",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"gatsby": "^4.15.0",
|
|
27
|
-
"gatsby-core-theme": "^8.0.
|
|
27
|
+
"gatsby-core-theme": "^8.0.11",
|
|
28
28
|
"gatsby-plugin-sharp": "^4.10.2",
|
|
29
29
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^4.10.0",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import Slider from 'gatsby-core-theme/src/components/molecules/slider';
|
|
3
|
+
import { GrFormPrevious } from '@react-icons/all-files/gr/GrFormPrevious';
|
|
4
|
+
import { GrFormNext } from '@react-icons/all-files/gr/GrFormNext';
|
|
6
5
|
import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
7
6
|
|
|
8
7
|
import styles from './info-grid.module.scss';
|
|
@@ -21,9 +20,22 @@ const InfoGrid = ({
|
|
|
21
20
|
'Slot Type',
|
|
22
21
|
],
|
|
23
22
|
}) => {
|
|
24
|
-
const [width] = useWindowSize();
|
|
25
|
-
|
|
26
23
|
let volatility = 'Low';
|
|
24
|
+
const ref = useRef();
|
|
25
|
+
const [showButtons, setShowButtons] = useState(2);
|
|
26
|
+
|
|
27
|
+
const previewSlide = () => {
|
|
28
|
+
const scrollValue = ref.current.scrollLeft - window.screen.width;
|
|
29
|
+
ref.current.scrollLeft = scrollValue;
|
|
30
|
+
setShowButtons(scrollValue <= 0 ? 2 : 0);
|
|
31
|
+
};
|
|
32
|
+
const nextSlide = () => {
|
|
33
|
+
const widthItems = window.screen.width;
|
|
34
|
+
const scrollValue = ref.current.scrollLeft + widthItems - 15;
|
|
35
|
+
const inThEnd = scrollValue + widthItems >= ref.current.scrollWidth;
|
|
36
|
+
ref.current.scrollLeft = scrollValue;
|
|
37
|
+
setShowButtons(inThEnd ? 1 : 0);
|
|
38
|
+
};
|
|
27
39
|
|
|
28
40
|
if (page?.relation?.volatility === 1) {
|
|
29
41
|
volatility = 'Medium';
|
|
@@ -64,74 +76,28 @@ const InfoGrid = ({
|
|
|
64
76
|
</div>
|
|
65
77
|
);
|
|
66
78
|
|
|
67
|
-
const renderDesktop = () => (
|
|
68
|
-
<div className={styles.grid}>{Object.keys(items).map((key) => gridItem(key, items[key]))}</div>
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const renderMobile = () => {
|
|
72
|
-
const first = [];
|
|
73
|
-
const second = [];
|
|
74
|
-
const third = [];
|
|
75
|
-
|
|
76
|
-
Object.keys(items).map((key, index) => {
|
|
77
|
-
if (index % 3 === 0) {
|
|
78
|
-
first.push({ [key]: items[key] });
|
|
79
|
-
} else if (index % 3 === 1) {
|
|
80
|
-
second.push({ [key]: items[key] });
|
|
81
|
-
} else {
|
|
82
|
-
third.push({ [key]: items[key] });
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return null;
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<Slider
|
|
90
|
-
className={styles.slider}
|
|
91
|
-
settings={{
|
|
92
|
-
swipeEndThreshold: 0.25,
|
|
93
|
-
transitionTime: 400,
|
|
94
|
-
numberOfSlides: 1,
|
|
95
|
-
sliderGap: 25,
|
|
96
|
-
}}
|
|
97
|
-
useArrows={false}
|
|
98
|
-
gtmClass="info-grid-carousel-gtm"
|
|
99
|
-
>
|
|
100
|
-
<div className={styles.verticalGrid}>
|
|
101
|
-
{first.map((item) => {
|
|
102
|
-
const key = Object.keys(item)[0];
|
|
103
|
-
return gridItem(key, item[key]);
|
|
104
|
-
})}
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div className={styles.verticalGrid}>
|
|
108
|
-
{second.map((item) => {
|
|
109
|
-
const key = Object.keys(item)[0];
|
|
110
|
-
return gridItem(key, item[key]);
|
|
111
|
-
})}
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<div className={styles.verticalGrid}>
|
|
115
|
-
{third.map((item) => {
|
|
116
|
-
const key = Object.keys(item)[0];
|
|
117
|
-
return gridItem(key, item[key]);
|
|
118
|
-
})}
|
|
119
|
-
</div>
|
|
120
|
-
</Slider>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
79
|
return (
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
80
|
+
<div className={styles.container}>
|
|
81
|
+
<div ref={ref} className={styles.grid}>
|
|
82
|
+
{Object.keys(items).map((key) => gridItem(key, items[key]))}
|
|
83
|
+
</div>
|
|
84
|
+
{showButtons !== 2 && (
|
|
85
|
+
<button onClick={() => previewSlide()} className={styles.prev} type="button">
|
|
86
|
+
<GrFormPrevious size={27} color="#fff" />
|
|
87
|
+
</button>
|
|
88
|
+
)}
|
|
89
|
+
{showButtons !== 1 && (
|
|
90
|
+
<button onClick={() => nextSlide()} className={styles.next} type="button">
|
|
91
|
+
<GrFormNext size={27} color="#fff" />
|
|
92
|
+
</button>
|
|
93
|
+
)}
|
|
94
|
+
</div>
|
|
129
95
|
);
|
|
130
96
|
};
|
|
131
97
|
|
|
132
98
|
InfoGrid.propTypes = {
|
|
133
|
-
page: PropTypes.objectOf(PropTypes.
|
|
134
|
-
gridLables: PropTypes.arrayOf(PropTypes.
|
|
99
|
+
page: PropTypes.objectOf(PropTypes.shape),
|
|
100
|
+
gridLables: PropTypes.arrayOf(PropTypes.shape),
|
|
135
101
|
};
|
|
136
102
|
|
|
137
103
|
export default InfoGrid;
|
|
@@ -5,42 +5,81 @@
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
.container {
|
|
9
|
+
position: relative;
|
|
10
|
+
button {
|
|
11
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
12
|
+
@include min(tablet){
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
svg {
|
|
16
|
+
border: 1px solid #ccc;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
height: 3rem;
|
|
19
|
+
width: 3rem;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.prev {
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 1rem;
|
|
25
|
+
top: 0;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
.next {
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: 2rem;
|
|
31
|
+
top: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
.grid {
|
|
35
|
+
@include max(mobile) {
|
|
36
|
+
overflow-x: scroll;
|
|
37
|
+
position: relative;
|
|
38
|
+
transition: 1s;
|
|
39
|
+
scroll-behavior: smooth;
|
|
40
|
+
&::-webkit-scrollbar {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: repeat(3, 1fr);
|
|
46
|
+
grid-gap: 1.9rem;
|
|
47
|
+
margin-top: 1rem;
|
|
48
|
+
}
|
|
14
49
|
|
|
15
|
-
.verticalGrid {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
50
|
+
.verticalGrid {
|
|
51
|
+
margin-top: 1rem;
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template-rows: repeat(3, 1fr);
|
|
54
|
+
grid-gap: 1.5rem;
|
|
55
|
+
}
|
|
21
56
|
|
|
22
|
-
.gridItem {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
57
|
+
.gridItem {
|
|
58
|
+
border-left: 0.8rem solid var(--info-grid-border-left-color);
|
|
59
|
+
padding: 1.4rem 1.5rem;
|
|
60
|
+
border-radius: 0.6rem 0 0 0.6rem;
|
|
61
|
+
background-color: var(--info-grid-backgorund-color);
|
|
62
|
+
@include max(mobile) {
|
|
63
|
+
width: 92vw;
|
|
64
|
+
}
|
|
27
65
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
66
|
+
span {
|
|
67
|
+
float: left;
|
|
68
|
+
clear: left;
|
|
69
|
+
color: #08202e;
|
|
70
|
+
}
|
|
33
71
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
72
|
+
span:first-of-type {
|
|
73
|
+
font-size: 1.8rem;
|
|
74
|
+
line-height: 1.8rem;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
margin-bottom: 0.5rem;
|
|
77
|
+
}
|
|
40
78
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
79
|
+
span:nth-of-type(2) {
|
|
80
|
+
font-size: 1.6rem;
|
|
81
|
+
line-height: 2.4rem;
|
|
82
|
+
margin-bottom: 1.5rem;
|
|
83
|
+
}
|
|
45
84
|
}
|
|
46
85
|
}
|
|
@@ -62,11 +62,13 @@ const Head = ({ page = {}, siteInfo }) => {
|
|
|
62
62
|
const parsedMetaDescr = page.meta_description ? parse(page.meta_description) : '';
|
|
63
63
|
const metaTitle = transformMetaTitle(relation, meta_title, type);
|
|
64
64
|
|
|
65
|
+
const isIL = process.env.GATSBY_SITE_NAME === 'irishluck.ie' && 'en-IE';
|
|
66
|
+
|
|
65
67
|
return (
|
|
66
68
|
<>
|
|
67
69
|
<Helmet>
|
|
68
70
|
<title>{metaTitle}</title>
|
|
69
|
-
<html lang={getLanguage(page.language)} />
|
|
71
|
+
<html lang={getLanguage(isIL || page.language)} />
|
|
70
72
|
<meta name="description" content={parsedMetaDescr} />
|
|
71
73
|
{page.meta_robots && process.env.GATSBY_ACTIVE_ENV !== 'development' && (
|
|
72
74
|
<meta name="robots" content={page.meta_robots.join()} />
|