gatsby-matrix-theme 7.1.62 → 7.1.64
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 +47 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/payment-method-card/index.js +18 -2
- package/src/components/atoms/feedback/index.js +3 -3
- package/src/components/atoms/newsletter/form/index.js +12 -3
- package/src/components/molecules/newsletter/index.js +18 -7
- package/src/components/molecules/newsletter/newsletter.module.scss +20 -1
- package/src/components/organisms/footer-navigation/index.js +1 -8
- package/src/constants/settings/newsletter.js +11 -0
- package/src/gatsby-core-theme/components/atoms/module-title/index.js +10 -4
- package/src/gatsby-core-theme/components/molecules/main/index.js +15 -7
- package/src/gatsby-core-theme/components/organisms/toplist/index.js +1 -0
- package/src/gatsby-core-theme/components/organisms/toplist/list/index.js +6 -1
- package/src/gatsby-core-theme/hooks/modal/modal-content.js +26 -19
- package/src/gatsby-core-theme/helpers/schema.js +0 -137
- package/src/gatsby-core-theme/helpers/schema.test.js +0 -165
- package/storybook/public/0.799c368cbe88266827ba.manager.bundle.js +0 -1
- package/storybook/public/1.9ebd2fb519f6726108de.manager.bundle.js +0 -1
- package/storybook/public/10.a85ea1a67689be8e19ff.manager.bundle.js +0 -1
- package/storybook/public/11.f4e922583ae35da460f3.manager.bundle.js +0 -2
- package/storybook/public/11.f4e922583ae35da460f3.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook/public/12.1415460941f0bdcb8fa8.manager.bundle.js +0 -1
- package/storybook/public/252.a9c1a24e.iframe.bundle.js +0 -7
- package/storybook/public/252.a9c1a24e.iframe.bundle.js.LICENSE.txt +0 -84
- package/storybook/public/252.a9c1a24e.iframe.bundle.js.map +0 -1
- package/storybook/public/29.81c8da24.iframe.bundle.js +0 -1
- package/storybook/public/332.678703ab.iframe.bundle.js +0 -1
- package/storybook/public/409.b4c1872e.iframe.bundle.js +0 -1
- package/storybook/public/5.f459d151315e6780c20f.manager.bundle.js +0 -2
- package/storybook/public/5.f459d151315e6780c20f.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook/public/500.a1e5c8d8.iframe.bundle.js +0 -1
- package/storybook/public/567.18a981a5.iframe.bundle.js +0 -1
- package/storybook/public/6.3bd64d820f3745f262ff.manager.bundle.js +0 -1
- package/storybook/public/7.3d04765dbf3f1dcd706c.manager.bundle.js +0 -1
- package/storybook/public/720.6ee5a175.iframe.bundle.js +0 -1
- package/storybook/public/738.be449817.iframe.bundle.js +0 -2
- package/storybook/public/738.be449817.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook/public/766.47f12b05.iframe.bundle.js +0 -1
- package/storybook/public/8.b541eadfcb9164835dfc.manager.bundle.js +0 -1
- package/storybook/public/805.7894ddea.iframe.bundle.js +0 -2
- package/storybook/public/805.7894ddea.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook/public/9.411ac8e451bbb10926c7.manager.bundle.js +0 -1
- package/storybook/public/94.4342cbcf.iframe.bundle.js +0 -1
- package/storybook/public/974.e2f03aac.iframe.bundle.js +0 -1
- package/storybook/public/favicon.ico +0 -0
- package/storybook/public/iframe.html +0 -348
- package/storybook/public/index.html +0 -51
- package/storybook/public/main.58ee6c5c0cfaec21e272.manager.bundle.js +0 -1
- package/storybook/public/main.d8589f9c.iframe.bundle.js +0 -1
- package/storybook/public/runtime~main.91a0c7330ab317d35c4a.manager.bundle.js +0 -1
- package/storybook/public/runtime~main.e5cc1419.iframe.bundle.js +0 -1
- package/storybook/public/static/media/popup-bg.51d14d2d.webp +0 -0
- package/storybook/public/static/media/summaryBackground.92dfe7de.jpeg +0 -0
- package/storybook/public/vendors~main.f7f16cebbf3aa96a4f89.manager.bundle.js +0 -2
- package/storybook/public/vendors~main.f7f16cebbf3aa96a4f89.manager.bundle.js.LICENSE.txt +0 -110
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
## [7.1.64](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.63...v7.1.64) (2022-10-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added newsletter layer ([e970a68](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e970a68b11a05ae9ee2617edc102198147e923d3))
|
|
7
|
+
* added theme style from input style module ([bc9830d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bc9830d552aa427ac21e1bd7ce641eb100aac859))
|
|
8
|
+
* deleted the unnecessary function ([79b4b0d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/79b4b0dddd3e0ea733e7ed9dbecfeb96f2de7fa4))
|
|
9
|
+
* newsletter layout prop ([d602d4b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d602d4bff8c98cb9acf3d766f46d6793c6cb4bfe))
|
|
10
|
+
* open modal for toplist nsa ([3352aa5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3352aa5c8f1c8ff76bed4c1be94aec4065fb3024))
|
|
11
|
+
* remove schema matrix ([3013ef2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3013ef279224eee63f8da43a1b4a89fac0c183b5))
|
|
12
|
+
* removed timeout on footer navigation ([dedcbab](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dedcbab9caf8f9ec6dd9d601967909fe5d04758b))
|
|
13
|
+
* updated to latest core version ([709f417](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/709f4175e2522e5d6ae157b511a35a3c2a3a480e))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
* update newsletter box positioning ([99b1bc5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/99b1bc5f48445cac234bf556fd8c030433bcfee2))
|
|
19
|
+
* update newsletter form for prop ([eb47237](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/eb47237fce1b6ec75983c6b5ebe54e7f9e48a05a))
|
|
20
|
+
* update newsletter override and main component ([54d2786](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/54d27860a63149ae8608af35ad299043b96ba8b2))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* Merge branch 'tm-2999-update-newsletter-box' into 'master' ([f4a5ca1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f4a5ca1d0e972a7da2c5c1adad9c1020051a26de))
|
|
24
|
+
* Merge branch 'tm-2833-schema-bible-matrix-remove' into 'master' ([de40677](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/de40677097a43e27d530559705c3461f78bc8a21))
|
|
25
|
+
* Merge branch 'tm-3014-sign-up-layer' into 'master' ([ca39c10](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ca39c101fb8fabd1860d204855addf2f199245b5))
|
|
26
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([f9628d0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f9628d0c3e64b48afd1d934341d6502ceb24614f))
|
|
27
|
+
* Merge branch 'tm-3003-toplist-style-theme' into 'master' ([c1f13c8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c1f13c8191b1375be674ff28960e0ec2e4353ee8))
|
|
28
|
+
|
|
29
|
+
## [7.1.63](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.62...v7.1.63) (2022-09-29)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* add new props for show rating and update theme ([ae05db1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ae05db14d8a2bb5d613c2ea72623b3d4d58312e6))
|
|
35
|
+
* show see more ([970f745](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/970f74500de0b8850032ad47b5b5418a12899a36))
|
|
36
|
+
* validate data ([5d4d31c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5d4d31c3f6e2af6f87782b56da340efaa2863de5))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Code Refactoring
|
|
40
|
+
|
|
41
|
+
* correction to page title for feedback component ([0e56912](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0e569129803a8deed0e5351e1828dd860e515bb6))
|
|
42
|
+
* correction to typo and fix feedback title operator name ([7d4c06f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7d4c06fe26cc3c8e66a04592965a41a861e2154b))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
* Merge branch 'tm-3004-cards' into 'master' ([87b0192](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/87b019285cdf05310dc9850983963e225f3d3cf2))
|
|
46
|
+
* Merge branch 'tm-3060-feedback-title' into 'master' ([8e9d8df](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8e9d8dfe8006006eb63db78489116e4f9af56c72))
|
|
47
|
+
|
|
1
48
|
## [7.1.62](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.61...v7.1.62) (2022-09-23)
|
|
2
49
|
|
|
3
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.64",
|
|
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.20.0",
|
|
27
|
-
"gatsby-core-theme": "
|
|
27
|
+
"gatsby-core-theme": "12.0.2",
|
|
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,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import loadable from '@loadable/component';
|
|
3
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
4
6
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
5
7
|
import {
|
|
@@ -14,11 +16,20 @@ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
|
14
16
|
import BaseCard from '../base-card/index';
|
|
15
17
|
import styles from './payment-method-card.module.scss';
|
|
16
18
|
|
|
17
|
-
const PaymentMethodCard = ({
|
|
19
|
+
const PaymentMethodCard = ({
|
|
20
|
+
item,
|
|
21
|
+
showTitle = true,
|
|
22
|
+
showDesc = true,
|
|
23
|
+
width,
|
|
24
|
+
height,
|
|
25
|
+
showRating = false,
|
|
26
|
+
}) => {
|
|
18
27
|
const { title, path, relation, sections } = item;
|
|
19
28
|
const logUrlObject = relation?.logo_object;
|
|
20
29
|
const { translations } = useContext(Context) || {};
|
|
21
|
-
|
|
30
|
+
const StarRating =
|
|
31
|
+
showRating &&
|
|
32
|
+
loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating/one-star'));
|
|
22
33
|
return (
|
|
23
34
|
<BaseCard item={item} cardType="payment_method">
|
|
24
35
|
<div className={styles.content}>
|
|
@@ -39,6 +50,9 @@ const PaymentMethodCard = ({ item, showTitle = true, showDesc = true, width, hei
|
|
|
39
50
|
{showTitle && (
|
|
40
51
|
<Link className={`${styles.links} payment-method-card-gtm`} to={path}>
|
|
41
52
|
<span className={styles.title}>{title}</span>
|
|
53
|
+
{showRating && (
|
|
54
|
+
<StarRating numOfStars={5} halfStars={false} rating={relation.rating} />
|
|
55
|
+
)}
|
|
42
56
|
</Link>
|
|
43
57
|
)}
|
|
44
58
|
</div>
|
|
@@ -73,6 +87,7 @@ PaymentMethodCard.propTypes = {
|
|
|
73
87
|
logo_object: PropTypes.shape({
|
|
74
88
|
alt: PropTypes.string,
|
|
75
89
|
}),
|
|
90
|
+
rating: PropTypes.string,
|
|
76
91
|
}),
|
|
77
92
|
sections: PropTypes.shape({
|
|
78
93
|
header: PropTypes.shape({
|
|
@@ -84,6 +99,7 @@ PaymentMethodCard.propTypes = {
|
|
|
84
99
|
}).isRequired,
|
|
85
100
|
width: PropTypes.number,
|
|
86
101
|
height: PropTypes.number,
|
|
102
|
+
showRating: PropTypes.bool,
|
|
87
103
|
};
|
|
88
104
|
|
|
89
105
|
export default PaymentMethodCard;
|
|
@@ -8,7 +8,7 @@ import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
|
|
|
8
8
|
|
|
9
9
|
import styles from './feedback.module.scss';
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const FeedBack = ({ pageId, casinoTitle, trueVotes, falseVotes, contactUs = '/contact-us' }) => {
|
|
12
12
|
const { translations } = useContext(Context) || {};
|
|
13
13
|
const [voted, setVote] = useState(null);
|
|
14
14
|
const [error, setError] = useState(null);
|
|
@@ -118,7 +118,7 @@ const FeetBack = ({ pageId, casinoTitle, trueVotes, falseVotes, contactUs = '/co
|
|
|
118
118
|
);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
FeedBack.propTypes = {
|
|
122
122
|
pageId: PropTypes.number,
|
|
123
123
|
casinoTitle: PropTypes.string,
|
|
124
124
|
trueVotes: PropTypes.number,
|
|
@@ -126,4 +126,4 @@ FeetBack.propTypes = {
|
|
|
126
126
|
contactUs: PropTypes.string,
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
export default
|
|
129
|
+
export default FeedBack;
|
|
@@ -171,7 +171,9 @@ const NewsletterForm = ({
|
|
|
171
171
|
|
|
172
172
|
<form ref={form} onSubmit={handelSubmit}>
|
|
173
173
|
{formTextTranslated.textAboveName ? (
|
|
174
|
-
<
|
|
174
|
+
<label className={styles.textAboveInput} htmlFor="name">
|
|
175
|
+
{formTextTranslated.textAboveName}
|
|
176
|
+
</label>
|
|
175
177
|
) : null}
|
|
176
178
|
|
|
177
179
|
<input
|
|
@@ -179,9 +181,12 @@ const NewsletterForm = ({
|
|
|
179
181
|
placeholder={formTextTranslated.placeholderName}
|
|
180
182
|
type="text"
|
|
181
183
|
name="name"
|
|
184
|
+
id="name"
|
|
182
185
|
/>
|
|
183
186
|
{formTextTranslated.textAboveEmail ? (
|
|
184
|
-
<
|
|
187
|
+
<label className={styles.textAboveInput} htmlFor="email">
|
|
188
|
+
{formTextTranslated.textAboveEmail}
|
|
189
|
+
</label>
|
|
185
190
|
) : null}
|
|
186
191
|
|
|
187
192
|
<input
|
|
@@ -189,9 +194,12 @@ const NewsletterForm = ({
|
|
|
189
194
|
placeholder={formTextTranslated.placeholderEmail}
|
|
190
195
|
type="email"
|
|
191
196
|
name="email"
|
|
197
|
+
id="email"
|
|
192
198
|
/>
|
|
193
199
|
{formTextTranslated.textAbovePhoneNumber ? (
|
|
194
|
-
<
|
|
200
|
+
<label className={styles.textAboveInput} htmlFor="phone">
|
|
201
|
+
{formTextTranslated.textAbovePhoneNumber}
|
|
202
|
+
</label>
|
|
195
203
|
) : null}
|
|
196
204
|
|
|
197
205
|
{formTextTranslated.placeholderPhoneNumber && (
|
|
@@ -200,6 +208,7 @@ const NewsletterForm = ({
|
|
|
200
208
|
placeholder={formTextTranslated.placeholderPhoneNumber}
|
|
201
209
|
type="tel"
|
|
202
210
|
name="phone"
|
|
211
|
+
id="phone"
|
|
203
212
|
/>
|
|
204
213
|
)}
|
|
205
214
|
<PrivacyandSuccess
|
|
@@ -12,7 +12,7 @@ import Button from '../../atoms/newsletter/toggle-button/index';
|
|
|
12
12
|
import Form from '../../atoms/newsletter/form/index';
|
|
13
13
|
import styles from './newsletter.module.scss';
|
|
14
14
|
|
|
15
|
-
const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) => {
|
|
15
|
+
const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false, isSticky = true }) => {
|
|
16
16
|
const [toggleNewsetter, setToggleNewsletter] = useState(false);
|
|
17
17
|
const [isClicked, setIsClicked] = useState(false);
|
|
18
18
|
const { translations } = useContext(Context) || {};
|
|
@@ -32,9 +32,9 @@ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) =>
|
|
|
32
32
|
return (
|
|
33
33
|
<div
|
|
34
34
|
ref={newsletterFloatingContainer}
|
|
35
|
-
className={
|
|
35
|
+
className={footer ? styles.contentFooter : !isSticky ? styles.contentPage : styles.content}
|
|
36
36
|
>
|
|
37
|
-
{!footer &&
|
|
37
|
+
{!footer && isSticky && (
|
|
38
38
|
<Button
|
|
39
39
|
active={!toggleNewsetter}
|
|
40
40
|
text={translate(translations, 'newsletter_open_btn', openBtnText)}
|
|
@@ -44,15 +44,24 @@ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) =>
|
|
|
44
44
|
ppcPage={ppcPage}
|
|
45
45
|
/>
|
|
46
46
|
)}
|
|
47
|
+
{toggleNewsetter && (
|
|
48
|
+
<div
|
|
49
|
+
className={styles.layer}
|
|
50
|
+
onClick={() => setToggleNewsletter(false)}
|
|
51
|
+
aria-hidden="true"
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
47
54
|
<div
|
|
48
55
|
className={
|
|
49
|
-
|
|
50
|
-
?
|
|
51
|
-
:
|
|
56
|
+
footer
|
|
57
|
+
? styles.formFooter
|
|
58
|
+
: !isSticky
|
|
59
|
+
? styles.formPage
|
|
60
|
+
: `${styles.form} ${toggleNewsetter && styles.active} ${ppcPage && styles.ppcPageForm}`
|
|
52
61
|
}
|
|
53
62
|
>
|
|
54
63
|
<Form redirectUrl={redirectUrl} ppcPage={ppcPage} footer={footer} />
|
|
55
|
-
{!footer ? (
|
|
64
|
+
{!footer && isSticky ? (
|
|
56
65
|
<MdClose className={styles.closeBtn} onClick={() => setToggleNewsletter(false)} />
|
|
57
66
|
) : null}
|
|
58
67
|
</div>
|
|
@@ -68,5 +77,7 @@ Newsletter.propTypes = {
|
|
|
68
77
|
type: PropTypes.string,
|
|
69
78
|
}),
|
|
70
79
|
footer: PropTypes.bool,
|
|
80
|
+
isSticky: PropTypes.bool,
|
|
71
81
|
};
|
|
82
|
+
|
|
72
83
|
export default Newsletter;
|
|
@@ -66,13 +66,32 @@
|
|
|
66
66
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.contentPage {
|
|
70
|
+
padding: 3.2rem 1.6rem;
|
|
71
|
+
width: 100%;
|
|
72
|
+
background: var(--newsletter-container-background-color);
|
|
73
|
+
z-index: var(--scroll-to-top-index);
|
|
74
|
+
.formPage {
|
|
75
|
+
padding: 2.4rem 1.6rem;
|
|
76
|
+
border-radius: 0.8rem;
|
|
77
|
+
box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.2);
|
|
78
|
+
background: var(--newsletter-body-background-color);
|
|
79
|
+
@include flex-direction(column);
|
|
80
|
+
@include min(tablet) {
|
|
81
|
+
margin: 0 auto;
|
|
82
|
+
padding: 2.4rem;
|
|
83
|
+
max-width: var(--main-container-max);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
69
88
|
.contentFooter{
|
|
70
89
|
background: #fff;
|
|
71
90
|
box-shadow: 0 0.4rem 1.6rem 0 rgba(0, 0, 0, 0.2);
|
|
72
91
|
border-radius: .4rem;
|
|
73
92
|
padding: 1.5rem;
|
|
74
93
|
|
|
75
|
-
.
|
|
94
|
+
.formFooter{
|
|
76
95
|
display: block;
|
|
77
96
|
.maintext{
|
|
78
97
|
display: block;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
|
|
4
5
|
import LinkList from 'gatsby-core-theme/src/components/molecules/link-list';
|
|
@@ -12,18 +13,10 @@ const FooterNavigation = ({ section, isStorybook = false }) => {
|
|
|
12
13
|
const handleEvent = () => {
|
|
13
14
|
setShow(true);
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
const showAfter = (seconds) => {
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
setShow(true);
|
|
19
|
-
}, seconds * 1000);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
16
|
useEffect(() => {
|
|
23
17
|
window.addEventListener('scroll', handleEvent);
|
|
24
18
|
window.addEventListener('mousemove', handleEvent);
|
|
25
19
|
window.addEventListener('touchstart', handleEvent);
|
|
26
|
-
showAfter(3);
|
|
27
20
|
|
|
28
21
|
return () => {
|
|
29
22
|
window.removeEventListener('scroll', handleEvent);
|
|
@@ -80,9 +80,11 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
|
|
|
80
80
|
|
|
81
81
|
const template = pageContext && pageContext?.page?.template;
|
|
82
82
|
const type = pageContext && pageContext?.page?.type;
|
|
83
|
+
const seeMore = module?.see_more_link;
|
|
84
|
+
|
|
83
85
|
return module.module_title ||
|
|
84
86
|
(module.title && (module.name === 'cards' || module.name === 'top_list')) ? (
|
|
85
|
-
|
|
87
|
+
seeMore ? (
|
|
86
88
|
<div
|
|
87
89
|
className={`${styles.moduleTitle} ${styles[type]} ${styles[template]} ${
|
|
88
90
|
module?.style && styles[module.style]
|
|
@@ -90,9 +92,9 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
|
|
|
90
92
|
>
|
|
91
93
|
{(module?.title || module.module_title) && getTitle(styles.toplistTitle)}
|
|
92
94
|
|
|
93
|
-
{
|
|
94
|
-
<Link to={
|
|
95
|
-
{
|
|
95
|
+
{seeMore && (
|
|
96
|
+
<Link to={seeMore.value_label} className={`${styles.viewMore} module-title-gtm`}>
|
|
97
|
+
{seeMore.title}
|
|
96
98
|
{viewMoreIcon}
|
|
97
99
|
</Link>
|
|
98
100
|
)}
|
|
@@ -123,6 +125,10 @@ ModuleTitle.propTypes = {
|
|
|
123
125
|
}),
|
|
124
126
|
show_last_updated_date: PropTypes.string,
|
|
125
127
|
title: PropTypes.string,
|
|
128
|
+
see_more_link: PropTypes.shape({
|
|
129
|
+
title: PropTypes.string,
|
|
130
|
+
value_label: PropTypes.string,
|
|
131
|
+
}),
|
|
126
132
|
}),
|
|
127
133
|
viewMoreIcon: PropTypes.element,
|
|
128
134
|
pageContext: PropTypes.shape({}),
|
|
@@ -8,10 +8,16 @@ import Module from 'gatsby-core-theme/src/components/molecules/module';
|
|
|
8
8
|
|
|
9
9
|
import styles from 'gatsby-core-theme/src/components/molecules/main/main.module.scss';
|
|
10
10
|
import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
11
|
-
import
|
|
11
|
+
import settings from 'gatsby-matrix-theme/src/constants/settings/newsletter';
|
|
12
12
|
|
|
13
|
-
const Main = ({ section = {}, pageContext = {}
|
|
13
|
+
const Main = ({ section = {}, pageContext = {} }) => {
|
|
14
14
|
const { page } = pageContext;
|
|
15
|
+
const siteName = process.env.GATSBY_SITE_NAME;
|
|
16
|
+
const showNewsletter = !(
|
|
17
|
+
settings[siteName]?.filter_pages?.includes('*') ||
|
|
18
|
+
settings[siteName]?.filter_pages?.includes(page.type) ||
|
|
19
|
+
settings.default?.filter_pages?.includes(page.type)
|
|
20
|
+
);
|
|
15
21
|
const SearchPage =
|
|
16
22
|
page.path === 's'
|
|
17
23
|
? loadable(() => import(`gatsby-core-theme/src/components/pages/search`))
|
|
@@ -20,8 +26,11 @@ const Main = ({ section = {}, pageContext = {}, showNewsletter = true }) => {
|
|
|
20
26
|
page.path === 'sitemap'
|
|
21
27
|
? loadable(() => import(`gatsby-core-theme/src/components/atoms/sitemap`))
|
|
22
28
|
: null;
|
|
29
|
+
const Newsletter = showNewsletter
|
|
30
|
+
? loadable(() => import('../../../../components/molecules/newsletter'))
|
|
31
|
+
: null;
|
|
23
32
|
const NewsletterSuccess =
|
|
24
|
-
typeof window !== 'undefined' && Boolean(getURLParam('subscribed'))
|
|
33
|
+
showNewsletter && typeof window !== 'undefined' && Boolean(getURLParam('subscribed'))
|
|
25
34
|
? loadable(() => import(`../../../../components/atoms/newsletter/success`))
|
|
26
35
|
: null;
|
|
27
36
|
const NotFound = page.path.includes('404')
|
|
@@ -41,17 +50,17 @@ const Main = ({ section = {}, pageContext = {}, showNewsletter = true }) => {
|
|
|
41
50
|
<Module key={keygen()} module={module} page={page} pageContext={pageContext} />
|
|
42
51
|
))}
|
|
43
52
|
{SearchPage && <SearchPage page={page} />}
|
|
44
|
-
{showNewsletter && <Newsletter page={page} />}
|
|
45
|
-
{NewsletterSuccess && showNewsletter && <NewsletterSuccess />}
|
|
46
53
|
{AuthorBox && <AuthorBox author={page.author} page={page} />}
|
|
47
54
|
{Feedback && (
|
|
48
55
|
<Feedback
|
|
49
56
|
trueVotes={page?.true_votes}
|
|
50
57
|
falseVotes={page?.false_votes}
|
|
51
58
|
pageId={page?.id}
|
|
52
|
-
casinoTitle={page?.title}
|
|
59
|
+
casinoTitle={page?.relation ? page?.relation.name : page?.title}
|
|
53
60
|
/>
|
|
54
61
|
)}
|
|
62
|
+
{Newsletter && <Newsletter page={page} />}
|
|
63
|
+
{NewsletterSuccess && <NewsletterSuccess />}
|
|
55
64
|
</main>
|
|
56
65
|
);
|
|
57
66
|
};
|
|
@@ -68,7 +77,6 @@ Main.propTypes = {
|
|
|
68
77
|
path: PropTypes.string,
|
|
69
78
|
}),
|
|
70
79
|
pageContext: PropTypes.shape({}),
|
|
71
|
-
showNewsletter: PropTypes.bool,
|
|
72
80
|
};
|
|
73
81
|
|
|
74
82
|
export default Main;
|
|
@@ -21,6 +21,7 @@ const TopList = ({ module, toplistHeading, CustomRow, page }) => {
|
|
|
21
21
|
pagePath={page.path}
|
|
22
22
|
toplist={toplist}
|
|
23
23
|
CustomRow={Row}
|
|
24
|
+
modulestyle={module?.style}
|
|
24
25
|
hasLoadMoreButton={toplist.show_load_more}
|
|
25
26
|
initItemsCount={toplist.num_items_initial_load}
|
|
26
27
|
loadItemsCount={toplist.num_items_load_more}
|
|
@@ -19,6 +19,8 @@ export default function List({
|
|
|
19
19
|
initItemsCount,
|
|
20
20
|
loadItemsCount,
|
|
21
21
|
pageTemplate,
|
|
22
|
+
modulestyle,
|
|
23
|
+
themeStyles = {},
|
|
22
24
|
removeInactiveItems = true,
|
|
23
25
|
}) {
|
|
24
26
|
const initLoadItems = Number(initItemsCount) !== 0 ? Number(initItemsCount) : 10000;
|
|
@@ -57,7 +59,10 @@ export default function List({
|
|
|
57
59
|
|
|
58
60
|
return (
|
|
59
61
|
<>
|
|
60
|
-
<ul
|
|
62
|
+
<ul
|
|
63
|
+
className={`${styles.list} ${modulestyle ? themeStyles[modulestyle] : ''} `}
|
|
64
|
+
key={keygen()}
|
|
65
|
+
>
|
|
61
66
|
{items.map((item, index) =>
|
|
62
67
|
CustomRow ? (
|
|
63
68
|
<CustomRow
|
|
@@ -73,26 +73,33 @@ const ModalContent = ({ children, closeIcon }) => {
|
|
|
73
73
|
|
|
74
74
|
return (
|
|
75
75
|
<div className={`${styles.modalInner} ${children && styles.modalContainer}`} ref={modal}>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
{showModal && (
|
|
77
|
+
<>
|
|
78
|
+
<div className={styles.modalOverlay} onClick={close} />
|
|
79
|
+
{modalContent && (
|
|
80
|
+
<div className={styles.modalContent}>
|
|
81
|
+
{closeIcon && (
|
|
82
|
+
<button
|
|
83
|
+
className={`${styles.closeIcon} modal-gtm btn-cta`}
|
|
84
|
+
aria-label="Close Icon"
|
|
85
|
+
type="button"
|
|
86
|
+
onClick={close}
|
|
87
|
+
>
|
|
88
|
+
{closeIcon}
|
|
89
|
+
</button>
|
|
90
|
+
)}
|
|
91
|
+
<div dangerouslySetInnerHTML={{ __html: modalContent }} />
|
|
92
|
+
</div>
|
|
88
93
|
)}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
{!modalContent && (
|
|
95
|
+
<div className={styles.modalChildContainer}>
|
|
96
|
+
{React.cloneElement(children, {
|
|
97
|
+
acceptCookies: handleAcceptCookies,
|
|
98
|
+
closeModal: close,
|
|
99
|
+
})}
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
</>
|
|
96
103
|
)}
|
|
97
104
|
</div>
|
|
98
105
|
);
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/prefer-default-export */
|
|
2
|
-
import {
|
|
3
|
-
generateSchemaObject,
|
|
4
|
-
webPageSchema,
|
|
5
|
-
organizationSchema,
|
|
6
|
-
moduleSchemas,
|
|
7
|
-
templateSchemas,
|
|
8
|
-
} from 'gatsby-core-theme/src/helpers/schema';
|
|
9
|
-
import { getUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
10
|
-
|
|
11
|
-
const knowsAbout = [
|
|
12
|
-
{
|
|
13
|
-
'@type': 'Thing',
|
|
14
|
-
name: 'Norway',
|
|
15
|
-
sameAs: [
|
|
16
|
-
'https://no.wikipedia.org/wiki/Norge',
|
|
17
|
-
'https://www.google.no/search?q=Norge&pws=0&nord=1&hl=no&gl=NO',
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
'@type': 'Thing',
|
|
22
|
-
name: 'LottStift',
|
|
23
|
-
sameAs: [
|
|
24
|
-
'https://no.wikipedia.org/wiki/Lotteri-_og_stiftelsestilsynet',
|
|
25
|
-
'https://www.google.no/search?q=lottstift&pws=0&nord=1&hl=no&gl=NO',
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
'@type': 'Thing',
|
|
30
|
-
name: 'Kasino',
|
|
31
|
-
sameAs: [
|
|
32
|
-
'https://no.wikipedia.org/wiki/Kasino',
|
|
33
|
-
'https://www.google.no/search?q=Kasino&pws=0&nord=1&hl=no&gl=NO',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
'@type': 'Thing',
|
|
38
|
-
name: 'Norsk Tipping Kommisjonær',
|
|
39
|
-
sameAs: [
|
|
40
|
-
'https://no.wikipedia.org/wiki/Norsk_Tipping',
|
|
41
|
-
'https://www.google.no/search?q=norsk+tipping&pws=0&nord=1&hl=no&gl=NO',
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
export function breadcrumbsSchema({
|
|
47
|
-
// type,
|
|
48
|
-
path,
|
|
49
|
-
title,
|
|
50
|
-
breadcrumbs,
|
|
51
|
-
siteSchema: { site_name: siteName } = {},
|
|
52
|
-
// relation: { game_provider: gameProvider } = {},
|
|
53
|
-
}) {
|
|
54
|
-
/* Disabled until we get a confirmation from NSA Seo */
|
|
55
|
-
// const hasExtra = process.env.GATSBY_SITE_NAME === 'norskespilleautomater.com' && type === 'game';
|
|
56
|
-
const schema = {
|
|
57
|
-
'@context': 'https://schema.org',
|
|
58
|
-
'@type': 'BreadcrumbList',
|
|
59
|
-
'@id': `${getUrl(path)}#breadcrumblist`,
|
|
60
|
-
itemListElement: [
|
|
61
|
-
{
|
|
62
|
-
'@type': 'ListItem',
|
|
63
|
-
name: siteName,
|
|
64
|
-
position: 1,
|
|
65
|
-
item: {
|
|
66
|
-
'@type': 'Thing',
|
|
67
|
-
'@id': getUrl('/'),
|
|
68
|
-
url: getUrl('/'),
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
...breadcrumbs.map((breadcrumb, index) => ({
|
|
72
|
-
'@type': 'ListItem',
|
|
73
|
-
name: breadcrumb.label,
|
|
74
|
-
position: index + 2,
|
|
75
|
-
item: {
|
|
76
|
-
'@type': 'Thing',
|
|
77
|
-
'@id': getUrl(breadcrumb.path),
|
|
78
|
-
url: getUrl(breadcrumb.path),
|
|
79
|
-
},
|
|
80
|
-
})),
|
|
81
|
-
/* Disabled until we get a confirmation from NSA Seo */
|
|
82
|
-
// ...(hasExtra
|
|
83
|
-
// ? [
|
|
84
|
-
// {
|
|
85
|
-
// '@type': 'ListItem',
|
|
86
|
-
// name: gameProvider?.name,
|
|
87
|
-
// position: breadcrumbs.length + 2,
|
|
88
|
-
// item: {
|
|
89
|
-
// '@type': 'Thing',
|
|
90
|
-
// '@id': getUrl(`spilleverandorer/${gameProvider?.short_name}`),
|
|
91
|
-
// url: getUrl(`spilleverandorer/${gameProvider?.short_name}`),
|
|
92
|
-
// },
|
|
93
|
-
// },
|
|
94
|
-
// ]
|
|
95
|
-
// : []),
|
|
96
|
-
{
|
|
97
|
-
'@type': 'ListItem',
|
|
98
|
-
name: title,
|
|
99
|
-
// position: breadcrumbs.length + (hasExtra ? 3 : 2),
|
|
100
|
-
position: breadcrumbs.length + 2,
|
|
101
|
-
item: {
|
|
102
|
-
'@type': 'Thing',
|
|
103
|
-
'@id': getUrl(path),
|
|
104
|
-
url: getUrl(path),
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
return JSON.stringify(generateSchemaObject(schema));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export function schemaGenerator(page = {}, pageImage) {
|
|
114
|
-
const isNSA = process.env.GATSBY_SITE_NAME === 'norskespilleautomater.com';
|
|
115
|
-
if (isNSA) {
|
|
116
|
-
page.knowsAbout = knowsAbout;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Temporary Change for removing webPageSchema
|
|
120
|
-
const hasWebPageSchema = (page.type !== 'operator' && page.type !== 'game') || isNSA;
|
|
121
|
-
const hasOrganisationSchema = page.path === '/' || page.path === 'about-us';
|
|
122
|
-
const jsonSchema = [
|
|
123
|
-
// Page Schema
|
|
124
|
-
page.seo_json_schema,
|
|
125
|
-
// Breadcrumbs Schema
|
|
126
|
-
page.breadcrumbs?.length ? breadcrumbsSchema(page) : null,
|
|
127
|
-
hasWebPageSchema ? webPageSchema(page, pageImage) : null,
|
|
128
|
-
hasOrganisationSchema ? organizationSchema(page, pageImage) : null,
|
|
129
|
-
templateSchemas(page, pageImage),
|
|
130
|
-
// Modules Schemas
|
|
131
|
-
...(page.sections?.main?.modules
|
|
132
|
-
? moduleSchemas(page.sections.main.modules, page.path)
|
|
133
|
-
: [null]),
|
|
134
|
-
];
|
|
135
|
-
|
|
136
|
-
return jsonSchema;
|
|
137
|
-
}
|