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 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.39",
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.10",
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",
@@ -45,7 +45,7 @@ const CasinosTable = ({ module }) => {
45
45
  title={item.title}
46
46
  className={`${styles.casinoLogo} table-operator-card-gtm`}
47
47
  >
48
- {item.title}
48
+ {item.relation.bonus?.operator_name || item.relation.name}
49
49
  </Link>
50
50
  </td>
51
51
  <td>
@@ -6,7 +6,7 @@
6
6
  border-radius: 0.4rem;
7
7
  padding: 2rem;
8
8
  transition: 1s;
9
- bottom: -40rem;
9
+ bottom: -100%;
10
10
  z-index: var(--scroll-to-top-index);
11
11
  @include min(tablet){
12
12
  @include flex-direction(column);
@@ -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 useWindowSize from 'gatsby-core-theme/src/hooks/useWindowSize';
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
- {width >= 991 && renderDesktop()}
127
- {width < 991 && width > 0 && renderMobile()}
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.object),
134
- gridLables: PropTypes.arrayOf(PropTypes.object),
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
- .grid {
9
- display: grid;
10
- grid-template-columns: repeat(3, 1fr);
11
- grid-gap: 1.9rem;
12
- margin-top: 1rem;
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
- margin-top: 1rem;
17
- display: grid;
18
- grid-template-rows: repeat(3, 1fr);
19
- grid-gap: 1.5rem;
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
- border-left: 0.8rem solid #ff743d;
24
- padding: 1.4rem 1.5rem;
25
- border-radius: 0.6rem 0 0 0.6rem;
26
- background-color: white;
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
- span {
29
- float: left;
30
- clear: left;
31
- color: #08202e;
32
- }
66
+ span {
67
+ float: left;
68
+ clear: left;
69
+ color: #08202e;
70
+ }
33
71
 
34
- span:first-of-type {
35
- font-size: 1.8rem;
36
- line-height: 1.8rem;
37
- font-weight: 700;
38
- margin-bottom: 0.5rem;
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
- span:nth-of-type(2) {
42
- font-size: 1.6rem;
43
- line-height: 2.4rem;
44
- margin-bottom: 1.5rem;
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
  }
@@ -46,9 +46,9 @@
46
46
  }
47
47
 
48
48
  .links {
49
- @include flex-direction(row);
50
49
 
51
50
  @include min(tablet) {
51
+ @include flex-direction(row);
52
52
  padding-top: 7rem;
53
53
  }
54
54
 
@@ -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()} />