gatsby-matrix-theme 7.1.50 → 7.1.51

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,28 @@
1
+ ## [7.1.51](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.50...v7.1.51) (2022-08-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * content module fixes ([4b92756](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4b927563e9724bbdd62ba38022b733e1da43f06b))
7
+ * fixed conflict ([fe5ce39](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fe5ce399370578c99cfa77975e49d7faf6c29c1e))
8
+ * updated to gatsby v4.17 ([03bc20f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/03bc20f866ca3b63706e6c674e3375a7d90dba5b))
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * add newsletter form missing translation ([63a4dcb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/63a4dcb31fcf8856d2c5749788e3bba868f3251a))
14
+ * add newsletter form text translation keys ([2847532](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/28475327fd4592aa5dc0e2cfb3fe2fde1fd96441))
15
+
16
+
17
+ ### Config
18
+
19
+ * update core version ([abc8545](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/abc8545a8d0c0305b69af40ec4acbf68470a3555))
20
+
21
+
22
+ * Merge branch 'tm-2975-content-module' into 'master' ([83e7003](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/83e7003ddb9ab22efc6b41d89b070122080b04a6))
23
+ * Merge branch 'update-core' into 'master' ([3dc2a8e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3dc2a8ebc14953ae4b819cfc8749a16b75be7fd0))
24
+ * Merge branch 'tm-3006-update-newsletter-form-texts' into 'master' ([d3298c8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d3298c8fb56322bf3f39124dc2be90d491fe71f7))
25
+
1
26
  ## [7.1.50](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.49...v7.1.50) (2022-08-10)
2
27
 
3
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "7.1.50",
3
+ "version": "7.1.51",
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": "^10.0.1",
27
+ "gatsby-core-theme": "^11.0.0",
28
28
  "gatsby-plugin-sharp": "^4.10.2",
29
29
  "gatsby-plugin-sitemap": "^3.3.0",
30
30
  "gatsby-transformer-sharp": "^4.10.0",
@@ -26,7 +26,6 @@ const NewsletterForm = ({
26
26
  mainText: 'You get more than 405 free spins',
27
27
  subscribeText: 'Subscribe to our newsletter and get more than 405 free spins instantly.',
28
28
  },
29
- ppcPage = false,
30
29
  }) => {
31
30
  // eslint-disable-next-line react/destructuring-assignment
32
31
 
@@ -36,6 +35,43 @@ const NewsletterForm = ({
36
35
  const [loading, setLoading] = useState(false);
37
36
  const { translations } = useContext(Context) || {};
38
37
 
38
+ const formTextTranslated = {
39
+ placeholderName: translate(
40
+ translations,
41
+ 'newsletter_form_first_name_placeholder',
42
+ formText.placeholderName
43
+ ),
44
+ placeholderEmail: translate(
45
+ translations,
46
+ 'newsletter_form_email_placeholder',
47
+ formText.placeholderEmail
48
+ ),
49
+ placeholderPhoneNumber: translate(
50
+ translations,
51
+ 'newsletter_form_phone_placeholder',
52
+ formText.placeholderPhoneNumber
53
+ ),
54
+ buttonText: translate(translations, 'newsletter_form_submit', formText.buttonText),
55
+ thankYouText: translate(translations, 'newsletter_form_thanks', formText.thankYouText),
56
+ textAboveEmail: translate(translations, 'newsletter_form_email_text', formText.textAboveEmail),
57
+ textAboveName: translate(
58
+ translations,
59
+ 'newsletter_form_first_name_text',
60
+ formText.textAboveName
61
+ ),
62
+ textAbovePhoneNumber: translate(
63
+ translations,
64
+ 'newsletter_form_phone_text',
65
+ formText.textAbovePhoneNumber
66
+ ),
67
+ mainText: translate(translations, 'newsletter_form_main_text', formText.mainText),
68
+ subscribeText: translate(
69
+ translations,
70
+ 'newsletter_form_subscribe_text',
71
+ formText.subscribeText
72
+ ),
73
+ };
74
+
39
75
  const validationForm = (e) => {
40
76
  let nameValidate = false;
41
77
  let emailValidate = false;
@@ -127,48 +163,48 @@ const NewsletterForm = ({
127
163
  <>
128
164
  {!error ? (
129
165
  <>
130
- <p className={styles.maintext}>{formText.mainText}</p>
166
+ <p className={styles.maintext}>{formTextTranslated.mainText}</p>
131
167
  <p
132
- dangerouslySetInnerHTML={{ __html: formText.subscribeText }}
168
+ dangerouslySetInnerHTML={{ __html: formTextTranslated.subscribeText }}
133
169
  className={styles.subscribe}
134
170
  />
135
171
 
136
172
  <form ref={form} onSubmit={handelSubmit}>
137
- {formText.textAboveName ? (
138
- <p className={styles.textAboveInput}>{formText.textAboveName}</p>
173
+ {formTextTranslated.textAboveName ? (
174
+ <p className={styles.textAboveInput}>{formTextTranslated.textAboveName}</p>
139
175
  ) : null}
140
176
 
141
177
  <input
142
178
  className={styles.input}
143
- placeholder={formText.placeholderName}
179
+ placeholder={formTextTranslated.placeholderName}
144
180
  type="text"
145
181
  name="name"
146
182
  />
147
- {formText.textAboveEmail ? (
148
- <p className={styles.textAboveInput}>{formText.textAboveEmail}</p>
183
+ {formTextTranslated.textAboveEmail ? (
184
+ <p className={styles.textAboveInput}>{formTextTranslated.textAboveEmail}</p>
149
185
  ) : null}
150
186
 
151
187
  <input
152
188
  className={styles.input}
153
- placeholder={formText.placeholderEmail}
189
+ placeholder={formTextTranslated.placeholderEmail}
154
190
  type="email"
155
191
  name="email"
156
192
  />
157
- {formText.textAbovePhoneNumber ? (
158
- <p className={styles.textAboveInput}>{formText.textAbovePhoneNumber}</p>
193
+ {formTextTranslated.textAbovePhoneNumber ? (
194
+ <p className={styles.textAboveInput}>{formTextTranslated.textAbovePhoneNumber}</p>
159
195
  ) : null}
160
196
 
161
- {formText.placeholderPhoneNumber && (
197
+ {formTextTranslated.placeholderPhoneNumber && (
162
198
  <input
163
199
  className={styles.input}
164
- placeholder={formText.placeholderPhoneNumber}
200
+ placeholder={formTextTranslated.placeholderPhoneNumber}
165
201
  type="tel"
166
202
  name="phone"
167
203
  />
168
204
  )}
169
205
  <PrivacyandSuccess
170
206
  loading={setLogading || loading}
171
- btnText={formText.buttonText}
207
+ btnText={formTextTranslated.buttonText}
172
208
  privacyText={privacyText}
173
209
  />
174
210
  </form>
@@ -202,7 +238,6 @@ NewsletterForm.propTypes = {
202
238
  redirectUrl: PropTypes.string,
203
239
  privacyText: PropTypes.string,
204
240
  setLogading: PropTypes.bool,
205
- ppcPage: PropTypes.bool,
206
241
  };
207
242
 
208
243
  export default NewsletterForm;
@@ -11,7 +11,7 @@ import Button from '../../atoms/newsletter/toggle-button/index';
11
11
  import Form from '../../atoms/newsletter/form/index';
12
12
  import styles from './newsletter.module.scss';
13
13
 
14
- const Newsletter = ({ page, openBtnText = 'Unlock Exclusive Bonuses', footer = false }) => {
14
+ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) => {
15
15
  const [toggleNewsetter, setToggleNewsletter] = useState(false);
16
16
  const redirectUrl =
17
17
  page?.path === '/'
@@ -30,6 +30,7 @@ export default function Row({
30
30
  activeAuthor = false,
31
31
  isPPC = false,
32
32
  showLaunchDate = true,
33
+ showCtaReviewLink = false,
33
34
  className,
34
35
  }) {
35
36
  const result = item.authorName?.split(/\s+/);
@@ -107,7 +108,7 @@ export default function Row({
107
108
  {itemName}
108
109
  </a>
109
110
  <StarRating numOfStars={5} rating={itemRating} showLabel />
110
- {!isPPC && (
111
+ {!isPPC && !showCtaReviewLink && (
111
112
  <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
112
113
  {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
113
114
  </Link>
@@ -153,7 +154,7 @@ export default function Row({
153
154
  )}
154
155
  <span className={styles.ctaAndReview}>
155
156
  <OperatorCta operator={item} tracker={tracker} gtmClass="toplist-operator-cta-gtm" />
156
- {!isPPC && (
157
+ {!isPPC && showCtaReviewLink && (
157
158
  <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
158
159
  {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
159
160
  </Link>
@@ -172,6 +173,7 @@ Row.propTypes = {
172
173
  tracker: PropTypes.string,
173
174
  oneliner: PropTypes.string,
174
175
  layout: PropTypes.oneOf(['list', 'grid']),
176
+ showCtaReviewLink: PropTypes.bool,
175
177
  item: PropTypes.shape({
176
178
  path: PropTypes.string,
177
179
  authorName: PropTypes.string,
@@ -1,5 +1,18 @@
1
1
  .content {
2
- width: 100%;
2
+ width: auto !important;
3
+ max-width: calc(var(--main-container-max) - 48px) !important;
4
+ margin-top: 1rem !important;
5
+ margin-bottom: 1rem !important;
6
+
7
+ img {
8
+ height: auto !important;
9
+ }
10
+
11
+ @include min(tablet) {
12
+ width: 100%;
13
+ padding: 0 !important;
14
+ }
15
+
3
16
  div {
4
17
  display: flow-root;
5
18
  }
@@ -78,137 +91,6 @@
78
91
  }
79
92
  }
80
93
 
81
- .firstTable {
82
- table {
83
- tbody tr td {
84
- text-align: center;
85
- }
86
- }
87
- }
88
-
89
- .secondTable {
90
- table {
91
- thead {
92
- tr th {
93
- &:last-child {
94
- text-align: left;
95
- }
96
- }
97
- }
98
-
99
- tbody tr td {
100
- &:first-child {
101
- background-color: var(--second-table-background);
102
- text-align: center;
103
-
104
- a {
105
- font-weight: 700;
106
- }
107
- }
108
-
109
- &:nth-child(2) {
110
- text-align: center;
111
- }
112
- }
113
- }
114
- }
115
-
116
- .stackTable {
117
- @include max(mobile) {
118
- table {
119
- border-collapse: inherit;
120
- box-shadow: 0 2px 16px #17182f14;
121
-
122
- thead {
123
- display: none;
124
- }
125
-
126
- tbody {
127
- tr {
128
- &:first-child {
129
- td {
130
- color: white !important;
131
- background: var(--table-head-background);
132
-
133
- border-radius: 0;
134
-
135
- &:first-child {
136
- border-top-left-radius: var(--table-border-radius);
137
- border-top-right-radius: var(--table-border-radius);
138
- }
139
-
140
- a {
141
- color: white !important;
142
- text-decoration: underline;
143
- }
144
- }
145
- }
146
-
147
- td {
148
- display: block;
149
- text-align: left !important;
150
- border-bottom: 1px solid #bfd3e5;
151
- width: 100% !important;
152
- }
153
-
154
- &:last-child {
155
- td {
156
- border-radius: 0;
157
- &:last-child {
158
- border-bottom-right-radius: var(--table-border-radius);
159
- border-bottom-left-radius: var(--table-border-radius);
160
- border-bottom: none;
161
- }
162
- }
163
- }
164
- }
165
- }
166
- }
167
- }
168
- }
169
-
170
- .tableResponsive,
171
- .tableResponsive > div {
172
- box-sizing: content-box;
173
- width: 100%;
174
- table {
175
- display: block;
176
- width: 100%;
177
- @include overflow(overflow-x, auto, touch);
178
- }
179
- @include scrollbar(0.8rem, 0.8rem, var(--color-33));
180
-
181
- * {
182
- box-sizing: content-box;
183
- }
184
-
185
- td,
186
- th {
187
- @include max(tablet) {
188
- min-width: 15rem;
189
- }
190
- img {
191
- max-width: none;
192
- }
193
- }
194
- }
195
-
196
- .contentFrame {
197
- background-color: #E0EAEA;
198
- padding: 1.6rem 2.4rem 2.4rem;
199
- border-radius: .8rem;
200
- box-sizing: border-box;
201
- img {
202
- border-radius: .8rem;
203
- }
204
- @include max(mobile) {
205
- img {
206
- margin-left: 0;
207
- width: 100%;
208
- }
209
- }
210
- }
211
-
212
94
  ul,
213
95
  ol {
214
96
  color: var(--color-6);
@@ -274,6 +156,148 @@
274
156
  }
275
157
  }
276
158
 
159
+ .firstTable {
160
+ table {
161
+ tbody tr td {
162
+ text-align: center;
163
+ }
164
+ }
165
+ }
166
+
167
+ .secondTable {
168
+ table {
169
+ thead {
170
+ tr th {
171
+ &:last-child {
172
+ text-align: left;
173
+ }
174
+ }
175
+ }
176
+
177
+ tbody tr td {
178
+ &:first-child {
179
+ background-color: var(--second-table-background);
180
+ text-align: center;
181
+
182
+ a {
183
+ font-weight: 700;
184
+ }
185
+ }
186
+
187
+ &:nth-child(2) {
188
+ text-align: center;
189
+ }
190
+ }
191
+ }
192
+ }
193
+
194
+ .stackTable {
195
+ margin-bottom: 1rem;
196
+ margin-top: 1rem;
197
+
198
+ @include max(mobile) {
199
+ margin: 1rem 1.6rem !important;
200
+ table {
201
+ border-collapse: inherit;
202
+ box-shadow: 0 2px 16px #17182f14;
203
+
204
+ thead {
205
+ display: none;
206
+ }
207
+
208
+ tbody {
209
+ tr {
210
+ &:first-child {
211
+ td {
212
+ color: white !important;
213
+ background: var(--table-head-background);
214
+
215
+ border-radius: 0;
216
+
217
+ &:first-child {
218
+ border-top-left-radius: var(--table-border-radius);
219
+ border-top-right-radius: var(--table-border-radius);
220
+ }
221
+
222
+ a {
223
+ color: white !important;
224
+ text-decoration: underline;
225
+ }
226
+ }
227
+ }
228
+
229
+ td {
230
+ display: block;
231
+ text-align: left !important;
232
+ border-bottom: 1px solid #bfd3e5;
233
+ width: 100% !important;
234
+ }
235
+
236
+ &:last-child {
237
+ td {
238
+ border-radius: 0;
239
+ &:last-child {
240
+ border-bottom-right-radius: var(--table-border-radius);
241
+ border-bottom-left-radius: var(--table-border-radius);
242
+ border-bottom: none;
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+
252
+ .tableResponsive,
253
+ .tableResponsive > div {
254
+ box-sizing: content-box;
255
+ width: 100%;
256
+ table {
257
+ display: block;
258
+ width: 100%;
259
+ @include overflow(overflow-x, auto, touch);
260
+ }
261
+ @include scrollbar(0.8rem, 0.8rem, var(--color-33));
262
+
263
+ * {
264
+ box-sizing: content-box;
265
+ }
266
+
267
+ td,
268
+ th {
269
+ @include max(tablet) {
270
+ min-width: 15rem;
271
+ }
272
+ img {
273
+ max-width: none;
274
+ }
275
+ }
276
+ }
277
+
278
+ .contentFrame {
279
+ background-color: white;
280
+ box-shadow: 0px -3px 14px rgba(0, 0, 0, 0.09);
281
+ padding: 1.6rem 2.4rem 2.4rem !important;
282
+ border-radius: .8rem;
283
+ box-sizing: border-box;
284
+ margin-bottom: 1rem;
285
+ margin-top: 1rem;
286
+
287
+ img {
288
+ border-radius: .8rem;
289
+ }
290
+ @include max(mobile) {
291
+ margin: 1rem 1.6rem !important;
292
+ img {
293
+ margin-left: 0;
294
+ width: 100%;
295
+ }
296
+ }
297
+ }
298
+
299
+
300
+
277
301
  .button {
278
302
  margin: 3rem 0 0 1.6rem !important;
279
303
  border: 2px solid #171f49;
@@ -63,7 +63,7 @@ const Content = ({ module }) => {
63
63
  case 'table_2':
64
64
  return `${styles.tableResponsive} ${styles.secondTable}`;
65
65
  case 'stack_table':
66
- return styles.stackTable;
66
+ return `${styles.stackTable}`;
67
67
  case 'default_table':
68
68
  return `${styles.tableResponsive}`;
69
69
  case 'content_frame_style':
@@ -81,13 +81,13 @@ const Content = ({ module }) => {
81
81
 
82
82
  return (
83
83
  <>
84
- <div className={`${styles.content} ${showMore && styles.showMore}`}>
85
- <div className={`${switchStyle(module.style)}`}>
86
- {module.value &&
87
- parse(module.value, {
88
- replace: replaceMedia,
89
- })}
90
- </div>
84
+ <div
85
+ className={`${styles.content} ${showMore && styles.showMore} ${switchStyle(module.style)}`}
86
+ >
87
+ {module.value &&
88
+ parse(module.value, {
89
+ replace: replaceMedia,
90
+ })}
91
91
  </div>
92
92
  {showMore && (
93
93
  <button type="button" className={styles.button} onClick={handleChange}>