gatsby-matrix-theme 34.0.9 → 34.0.11
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 +16 -0
- package/package.json +2 -2
- package/src/components/molecules/operator-summary/index.js +1 -1
- package/src/components/molecules/operator-summary/template-one/index.js +14 -9
- package/src/components/molecules/operator-summary/template-one/template-one.module.scss +45 -2
- package/src/components/molecules/operator-summary/template-two/index.js +10 -3
- package/storybook/public/{660.edfa73c6.iframe.bundle.js → 660.c91ab12c.iframe.bundle.js} +3 -3
- package/storybook/public/{660.edfa73c6.iframe.bundle.js.map → 660.c91ab12c.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.83ab7bb9.iframe.bundle.js +2 -0
- package/tests/factories/pages/operator.factory.js +2 -2
- package/storybook/public/main.51b3c162.iframe.bundle.js +0 -2
- /package/storybook/public/{660.edfa73c6.iframe.bundle.js.LICENSE.txt → 660.c91ab12c.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/public/{main.51b3c162.iframe.bundle.js.LICENSE.txt → main.83ab7bb9.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [34.0.11](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.10...v34.0.11) (2023-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add rating for template one summery and update theme ([d76dd2a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d76dd2a46091d6c127d10ea06cb4635220a2394f))
|
|
7
|
+
|
|
8
|
+
## [34.0.10](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.9...v34.0.10) (2023-10-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add author image for main image ([b98930a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b98930a555700abf0cb1dfd48968044d071b3ed7))
|
|
14
|
+
* add correct img for storybook ([c803fad](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c803fad6f66866641f0a1b2ffcbaea95bff9b1c9))
|
|
15
|
+
* add img for operator and author ([142acec](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/142acec08cc26e0f6c5b05b536c54a355bb658c7))
|
|
16
|
+
|
|
1
17
|
## [34.0.9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.8...v34.0.9) (2023-10-09)
|
|
2
18
|
|
|
3
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "34.0.
|
|
3
|
+
"version": "34.0.11",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@react-icons/all-files": "^4.1.0",
|
|
27
27
|
"gatsby": "^5.11.0",
|
|
28
|
-
"gatsby-core-theme": "30.0.
|
|
28
|
+
"gatsby-core-theme": "30.0.7",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import TemplateOne from './template-one';
|
|
3
3
|
import TemplateTwo from './template-two';
|
|
4
4
|
|
|
5
|
-
export default function index({ template = '
|
|
5
|
+
export default function index({ template = 'template_one', ...props }) {
|
|
6
6
|
switch (template) {
|
|
7
7
|
case 'template_two':
|
|
8
8
|
return <TemplateTwo {...props} />;
|
|
@@ -6,29 +6,33 @@ import { formatDate } from 'gatsby-core-theme/src/helpers/date-time';
|
|
|
6
6
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
7
7
|
import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
|
|
8
8
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
9
|
+
import Ratings from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
|
|
9
10
|
import Author from '../../../atoms/author/template-one';
|
|
10
11
|
import OperatorBanner from '../../../atoms/header-operator-bannner';
|
|
11
12
|
import styles from './template-one.module.scss';
|
|
12
13
|
|
|
13
|
-
const TemplateOne = ({
|
|
14
|
+
const TemplateOne = ({
|
|
15
|
+
page,
|
|
16
|
+
imgWidth = 128,
|
|
17
|
+
imgHeight = 146,
|
|
18
|
+
tnc = false,
|
|
19
|
+
operatorImg = true,
|
|
20
|
+
}) => {
|
|
14
21
|
const { translations } = useContext(Context) || {};
|
|
15
22
|
const operatorData = page?.relation;
|
|
16
23
|
const { standardised_logo_url_object, logo_url_object, name } = operatorData;
|
|
17
24
|
const operatorSummary = getExtraField(page.extra_fields, 'operator_review_summary', null);
|
|
18
25
|
const author = page?.reviewer;
|
|
26
|
+
const img = operatorImg
|
|
27
|
+
? standardised_logo_url_object?.filename || logo_url_object?.filename
|
|
28
|
+
: author?.image;
|
|
19
29
|
return (
|
|
20
30
|
<div className={styles?.summaryLayout || ''}>
|
|
21
31
|
<div className={styles.details}>
|
|
22
32
|
<h2>{translate(translations, 'expert_casino_review', 'Expert Casino Review')}</h2>
|
|
23
33
|
<div className={styles.img}>
|
|
24
|
-
<LazyImage
|
|
25
|
-
|
|
26
|
-
standardised_logo_url_object?.filename || logo_url_object?.filename
|
|
27
|
-
)}
|
|
28
|
-
width={imgWidth}
|
|
29
|
-
height={imgHeight}
|
|
30
|
-
alt={name}
|
|
31
|
-
/>
|
|
34
|
+
<LazyImage src={imagePrettyUrl(img)} width={imgWidth} height={imgHeight} alt={name} />
|
|
35
|
+
{operatorImg && <Ratings rating={operatorData?.rating} />}
|
|
32
36
|
</div>
|
|
33
37
|
<div className={styles.author}>
|
|
34
38
|
<Author
|
|
@@ -64,6 +68,7 @@ TemplateOne.propTypes = {
|
|
|
64
68
|
imgWidth: PropTypes.number,
|
|
65
69
|
imgHeight: PropTypes.string,
|
|
66
70
|
tnc: PropTypes.bool,
|
|
71
|
+
operatorImg: PropTypes.bool,
|
|
67
72
|
page: PropTypes.shape({
|
|
68
73
|
reviewer: PropTypes.shape({}),
|
|
69
74
|
relation_type: PropTypes.string,
|
|
@@ -9,15 +9,19 @@
|
|
|
9
9
|
width: calc(100% - 32px);
|
|
10
10
|
gap: 2.4rem;
|
|
11
11
|
padding: 0 1.6rem;
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
@include min(tablet) {
|
|
13
14
|
padding: 0 2.4rem;
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
//operator-banner
|
|
16
18
|
>div:nth-child(2) {
|
|
17
19
|
margin-bottom: 2.4rem;
|
|
18
|
-
|
|
20
|
+
|
|
21
|
+
@include min(tablet) {
|
|
19
22
|
padding: 1.6rem;
|
|
20
23
|
}
|
|
24
|
+
|
|
21
25
|
>div>div {
|
|
22
26
|
>a:nth-child(2) {
|
|
23
27
|
height: 3.5rem;
|
|
@@ -27,6 +31,7 @@
|
|
|
27
31
|
font-weight: 700;
|
|
28
32
|
line-height: 1.4rem;
|
|
29
33
|
text-transform: capitalize;
|
|
34
|
+
|
|
30
35
|
@include min(tablet) {
|
|
31
36
|
height: 6.4rem;
|
|
32
37
|
font-size: 1.8rem;
|
|
@@ -38,10 +43,12 @@
|
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
}
|
|
46
|
+
|
|
41
47
|
.details {
|
|
42
48
|
margin-top: 2.4rem;
|
|
43
49
|
gap: 2.4rem;
|
|
44
50
|
@include flex-direction(column);
|
|
51
|
+
|
|
45
52
|
>h2 {
|
|
46
53
|
color: var(--operator-summery-title-color, #1C1A28);
|
|
47
54
|
text-align: center;
|
|
@@ -52,9 +59,11 @@
|
|
|
52
59
|
text-transform: capitalize;
|
|
53
60
|
margin: 0;
|
|
54
61
|
}
|
|
62
|
+
|
|
55
63
|
@include min(tablet) {
|
|
56
64
|
display: grid;
|
|
57
65
|
grid-template-columns: repeat(3, auto);
|
|
66
|
+
|
|
58
67
|
h2 {
|
|
59
68
|
grid-column: 1/3;
|
|
60
69
|
grid-row: 1/2;
|
|
@@ -64,21 +73,46 @@
|
|
|
64
73
|
}
|
|
65
74
|
}
|
|
66
75
|
}
|
|
76
|
+
|
|
67
77
|
.img {
|
|
78
|
+
@include flex-direction(column);
|
|
68
79
|
@include flex-align(center, center);
|
|
80
|
+
|
|
69
81
|
>img {
|
|
70
82
|
border-radius: 1.6rem;
|
|
71
83
|
}
|
|
84
|
+
|
|
85
|
+
>div {
|
|
86
|
+
border-radius: 100px;
|
|
87
|
+
background: #F6F6F6;
|
|
88
|
+
width: 7.9rem;
|
|
89
|
+
height: 3.8rem;
|
|
90
|
+
border: 1px solid #F6F6F6;
|
|
91
|
+
@include flex-align(center, center);
|
|
92
|
+
margin-top: -1.9rem;
|
|
93
|
+
color: var(--black-900, #1C1A28);
|
|
94
|
+
font-size: 1.4rem;
|
|
95
|
+
font-style: normal;
|
|
96
|
+
font-weight: 800;
|
|
97
|
+
line-height: 2.2rem;
|
|
98
|
+
|
|
99
|
+
>span:first-child {
|
|
100
|
+
margin-right: .2rem;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
72
104
|
@include min(tablet) {
|
|
73
105
|
grid-column: 1/2;
|
|
74
106
|
grid-row: 2/3;
|
|
75
107
|
margin-right: 2.4rem
|
|
76
108
|
}
|
|
77
109
|
}
|
|
110
|
+
|
|
78
111
|
.author {
|
|
79
112
|
@include flex-direction(column);
|
|
80
113
|
@include flex-align(center, center);
|
|
81
114
|
gap: 1.6rem;
|
|
115
|
+
|
|
82
116
|
>span:first-child {
|
|
83
117
|
>a {
|
|
84
118
|
color: #165AF8 !important;
|
|
@@ -91,6 +125,7 @@
|
|
|
91
125
|
position: relative;
|
|
92
126
|
@include flex-direction(row);
|
|
93
127
|
padding-left: 3.6rem;
|
|
128
|
+
|
|
94
129
|
&::before {
|
|
95
130
|
content: 'By';
|
|
96
131
|
color: #6B6A72;
|
|
@@ -99,6 +134,7 @@
|
|
|
99
134
|
font-weight: 100;
|
|
100
135
|
background-color: white;
|
|
101
136
|
}
|
|
137
|
+
|
|
102
138
|
>img {
|
|
103
139
|
position: absolute;
|
|
104
140
|
left: 0;
|
|
@@ -108,6 +144,7 @@
|
|
|
108
144
|
}
|
|
109
145
|
}
|
|
110
146
|
}
|
|
147
|
+
|
|
111
148
|
>span:nth-child(2) {
|
|
112
149
|
border-radius: 100px;
|
|
113
150
|
background: var(--review-summery-backgorund-color, #5CE482);
|
|
@@ -121,6 +158,7 @@
|
|
|
121
158
|
text-transform: uppercase;
|
|
122
159
|
padding: .6rem 1.2rem;
|
|
123
160
|
}
|
|
161
|
+
|
|
124
162
|
>p {
|
|
125
163
|
font-size: 1.4rem;
|
|
126
164
|
font-style: normal;
|
|
@@ -128,18 +166,22 @@
|
|
|
128
166
|
line-height: 2.2rem;
|
|
129
167
|
color: #3E3C47;
|
|
130
168
|
}
|
|
169
|
+
|
|
131
170
|
@include min(tablet) {
|
|
132
171
|
display: grid;
|
|
133
172
|
grid-template-columns: repeat(3, auto);
|
|
134
173
|
gap: 1.6rem;
|
|
174
|
+
|
|
135
175
|
>p {
|
|
136
176
|
grid-column: 1/2;
|
|
137
177
|
grid-row: 1/2;
|
|
138
178
|
}
|
|
139
179
|
}
|
|
140
180
|
}
|
|
181
|
+
|
|
141
182
|
.description {
|
|
142
183
|
color: #3e3c47;
|
|
184
|
+
|
|
143
185
|
p {
|
|
144
186
|
color: #3E3C47;
|
|
145
187
|
font-size: 1.6rem;
|
|
@@ -147,6 +189,7 @@
|
|
|
147
189
|
font-weight: 400;
|
|
148
190
|
line-height: 2.7rem;
|
|
149
191
|
}
|
|
192
|
+
|
|
150
193
|
@include min(tablet) {
|
|
151
194
|
grid-column: 2/4;
|
|
152
195
|
grid-row: 2/3
|
|
@@ -11,21 +11,27 @@ import Author from '../../../atoms/author/template-one';
|
|
|
11
11
|
import OperatorBanner from '../../../atoms/header-operator-bannner';
|
|
12
12
|
import styles from './template-two.module.scss';
|
|
13
13
|
|
|
14
|
-
const TemplateTwo = ({
|
|
14
|
+
const TemplateTwo = ({
|
|
15
|
+
page,
|
|
16
|
+
imgWidth = 128,
|
|
17
|
+
imgHeight = 146,
|
|
18
|
+
tnc = false,
|
|
19
|
+
operatorImg = false,
|
|
20
|
+
}) => {
|
|
15
21
|
const { translations } = useContext(Context) || {};
|
|
16
22
|
const operatorData = page?.relation;
|
|
17
23
|
const { name } = operatorData;
|
|
18
24
|
const imageObject = operatorData?.standardised_logo_url_object || operatorData?.logo_url_object;
|
|
19
25
|
const operatorSummary = getExtraField(page.extra_fields, 'operator_review_summary', null);
|
|
20
26
|
const author = page?.reviewer;
|
|
21
|
-
|
|
27
|
+
const img = operatorImg ? imageObject : author?.image;
|
|
22
28
|
return (
|
|
23
29
|
<div>
|
|
24
30
|
<div className={styles?.summaryLayout || ''}>
|
|
25
31
|
<div className={styles.details}>
|
|
26
32
|
<div className={styles.img}>
|
|
27
33
|
<LazyImage
|
|
28
|
-
src={imagePrettyUrl(
|
|
34
|
+
src={imagePrettyUrl(img, imgWidth, imgHeight)}
|
|
29
35
|
width={imgWidth}
|
|
30
36
|
height={imgHeight}
|
|
31
37
|
alt={name}
|
|
@@ -69,6 +75,7 @@ TemplateTwo.propTypes = {
|
|
|
69
75
|
imgWidth: PropTypes.number,
|
|
70
76
|
imgHeight: PropTypes.string,
|
|
71
77
|
tnc: PropTypes.bool,
|
|
78
|
+
operatorImg: PropTypes.bool,
|
|
72
79
|
page: PropTypes.shape({
|
|
73
80
|
reviewer: PropTypes.shape({}),
|
|
74
81
|
relation_type: PropTypes.string,
|