gatsby-matrix-theme 3.0.0 → 3.0.4
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 +82 -0
- package/package.json +2 -2
- package/src/components/atoms/author-card/index.js +4 -2
- package/src/components/atoms/cards/article-card/index.js +4 -2
- package/src/components/atoms/cards/author-card/index.js +4 -2
- package/src/components/atoms/cards/game-card/index.js +4 -2
- package/src/components/atoms/cards/operator-card/index.js +17 -15
- package/src/components/atoms/cards/payment-method-card/index.js +9 -2
- package/src/components/atoms/cards/software-provider-card/index.js +10 -1
- package/src/components/molecules/carousel/screenshot-slide/index.js +7 -1
- package/src/components/molecules/carousel/screenshot-slide/screenshot-slide.test.js +2 -2
- package/src/components/molecules/operator-summary/operator-summary.test.js +2 -2
- package/src/components/molecules/toplist/row/variant-one.test.js +4 -4
- package/src/components/organisms/footer-navigation/index.js +1 -1
- package/src/gatsby-core-theme/components/atoms/spotlights/index.js +15 -2
- package/src/gatsby-core-theme/components/molecules/content/index.js +2 -1
- package/src/gatsby-core-theme/components/molecules/main/index.js +7 -1
- package/src/gatsby-core-theme/components/organisms/head/index.js +3 -0
- package/src/gatsby-core-theme/components/pages/body/index.js +3 -2
- package/storybook/public/{0.0581f3f7.iframe.bundle.js → 0.3d133e98.iframe.bundle.js} +1 -1
- package/storybook/public/{1.d51717ce.iframe.bundle.js → 1.303d4a8e.iframe.bundle.js} +1 -1
- package/storybook/public/{10.f7f3ccb8.iframe.bundle.js → 10.2bb842e6.iframe.bundle.js} +1 -1
- package/storybook/public/{11.13224d48.iframe.bundle.js → 11.7ad7ba28.iframe.bundle.js} +1 -1
- package/storybook/public/{12.977cb5d6.iframe.bundle.js → 12.c91443b3.iframe.bundle.js} +1 -1
- package/storybook/public/{13.183d3f1c.iframe.bundle.js → 13.9ac1db9d.iframe.bundle.js} +1 -1
- package/storybook/public/{14.708f714b.iframe.bundle.js → 14.604f9747.iframe.bundle.js} +1 -1
- package/storybook/public/{15.f1ca69f8.iframe.bundle.js → 15.16fa9e43.iframe.bundle.js} +1 -1
- package/storybook/public/{5.f16ccaac.iframe.bundle.js → 5.58b2efe7.iframe.bundle.js} +3 -3
- package/storybook/public/{5.f16ccaac.iframe.bundle.js.LICENSE.txt → 5.58b2efe7.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.58b2efe7.iframe.bundle.js.map +1 -0
- package/storybook/public/{6.25868236.iframe.bundle.js → 6.2d558003.iframe.bundle.js} +1 -1
- package/storybook/public/{7.22cab898.iframe.bundle.js → 7.8622538a.iframe.bundle.js} +1 -1
- package/storybook/public/{8.d69edd98.iframe.bundle.js → 8.cd8f12ce.iframe.bundle.js} +3 -3
- package/storybook/public/{8.d69edd98.iframe.bundle.js.LICENSE.txt → 8.cd8f12ce.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/8.cd8f12ce.iframe.bundle.js.map +1 -0
- package/storybook/public/{9.b70b940d.iframe.bundle.js → 9.bc7480f3.iframe.bundle.js} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.436e9745.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.e0f4792d.iframe.bundle.js → runtime~main.39a81a69.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.63691255.iframe.bundle.js.LICENSE.txt → vendors~main.cc70e3aa.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.cc70e3aa.iframe.bundle.js.map +1 -0
- package/src/components/atoms/sitemap/index.js +0 -81
- package/src/components/atoms/sitemap/sitemap.module.scss +0 -111
- package/src/components/atoms/sitemap/sitemap.stories.js +0 -104
- package/src/gatsby-core-theme/pages/sitemap/index.js +0 -31
- package/storybook/public/5.f16ccaac.iframe.bundle.js.map +0 -1
- package/storybook/public/8.d69edd98.iframe.bundle.js.map +0 -1
- package/storybook/public/main.8009bb9e.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.63691255.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.63691255.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
## [3.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.3...v3.0.4) (2021-12-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added language for playcasino ([7ffcb83](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7ffcb83cd74422e92491b5482e9d1fac6530ca3f))
|
|
7
|
+
* width and height image sizes as props ([e65f3cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e65f3cd1aad37ec42d414864763115d27e03f23c))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Code Refactoring
|
|
11
|
+
|
|
12
|
+
* fix build err ([d89e12d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d89e12d8e0f03c2f31a79f32bd86900c9450b7ea))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Config
|
|
16
|
+
|
|
17
|
+
* updated core theme version ([5333e12](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5333e1210a57fa63032f17c3ebeabf55e9555a73))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
* Merge branch 'fix-image-sizes' into 'master' ([7b8939d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7b8939dd1bc6c63f0251b626daa6860630e48f4b))
|
|
21
|
+
* Merge branch 'master' into fix-image-sizes ([350c093](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/350c093057b4fc31aaf73111db0e589a44e84ea9))
|
|
22
|
+
* Merge branch 'pcsa-html-lang' into 'master' ([e8a63b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e8a63b5e25348aa89eb8a8028e898bfc6f91668e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Tests
|
|
26
|
+
|
|
27
|
+
* commented failing tests for lazyload imgs ([8ee9b4a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ee9b4ab437e445c329d13db558a2a567b39258b))
|
|
28
|
+
* commented lazy image fails ([0884e0c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0884e0cb75e63a5d0ba9b9e4551e24c2e2043340))
|
|
29
|
+
|
|
30
|
+
## [3.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.2...v3.0.3) (2021-11-28)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* cookie consent props ([56ecfc0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/56ecfc071501f384fcdc3880673ab34bc25ba31b))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Code Refactoring
|
|
39
|
+
|
|
40
|
+
* accessibility score changes ([706abf6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/706abf6946091f4f13d59e127c500b87371d4816))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Config
|
|
44
|
+
|
|
45
|
+
* updated core theme ([776b125](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/776b12506de4db82e67385c8da7118c547116dd4))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
* Merge branch 'tm-2595-accessibility-scores' into 'master' ([fd9b453](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fd9b453146abead35f7128723a1098dbc119a338))
|
|
49
|
+
* Merge branch 'cookie-consent' into 'master' ([b44b163](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b44b1632e33fa2ef6528cabee1fed7af320caa8e))
|
|
50
|
+
|
|
51
|
+
## [3.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.1...v3.0.2) (2021-11-25)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* sitemap and core theme update ([64e430d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/64e430d3841c8e7ff1104e29a547ef6a926535c4))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Config
|
|
60
|
+
|
|
61
|
+
* update core theme ([9a98e8e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9a98e8eb428bc1a8d4aadd02e7f2005d28172712))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
* Merge branch 'testing' into 'master' ([36eb0c8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/36eb0c889796f812257f73d127fb9349e7d363b7))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Tests
|
|
68
|
+
|
|
69
|
+
* changes ([d00d853](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d00d853b99c976913781b324bd0620cd05edae35))
|
|
70
|
+
* removing hed ([3a7c732](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3a7c732d86b6e74b398b8d9638229ada31e5baa6))
|
|
71
|
+
|
|
72
|
+
## [3.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.0...v3.0.1) (2021-11-24)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
* core theme update and general fixes ([26fe04d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/26fe04d969b8bd0d0505e576c2422e4c8a7a2653))
|
|
78
|
+
* translation fix ([d115bc0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d115bc0f7d4d032107eb62033d54fa9952a17fc8))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
* Merge branch 'general_fixes' into 'master' ([ae536eb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ae536eb6882679b2495bce34b557144753c7c6c9))
|
|
82
|
+
|
|
1
83
|
# [3.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.3.8...v3.0.0) (2021-11-24)
|
|
2
84
|
|
|
3
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"cross-env": "^7.0.2",
|
|
32
32
|
"dotenv": "8.2.0",
|
|
33
33
|
"gatsby": "^3.3.1",
|
|
34
|
-
"gatsby-core-theme": "^1.6.
|
|
34
|
+
"gatsby-core-theme": "^1.6.14",
|
|
35
35
|
"gatsby-image": "^3.3.0",
|
|
36
36
|
"gatsby-plugin-image": "^1.3.1",
|
|
37
37
|
"gatsby-plugin-postcss": "^4.3.0",
|
|
@@ -5,13 +5,13 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
|
5
5
|
import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
6
6
|
import styles from './author-card.module.scss';
|
|
7
7
|
|
|
8
|
-
const AuthorCard = ({ author }) => {
|
|
8
|
+
const AuthorCard = ({ author, width = 60, height = 60 }) => {
|
|
9
9
|
const { name, author_title, email_address, image } = author || {};
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div className={styles.authorCard}>
|
|
13
13
|
<div className={styles.img}>
|
|
14
|
-
<LazyImage src={imagePrettyUrl(image)} alt={name} />
|
|
14
|
+
<LazyImage src={imagePrettyUrl(image)} alt={name} width={width} height={height} />
|
|
15
15
|
</div>
|
|
16
16
|
<div className={styles.txt}>
|
|
17
17
|
<div className={styles.name}>{name}</div>
|
|
@@ -36,6 +36,8 @@ AuthorCard.propTypes = {
|
|
|
36
36
|
email_address: PropTypes.string,
|
|
37
37
|
image: PropTypes.string,
|
|
38
38
|
}).isRequired,
|
|
39
|
+
width: PropTypes.number,
|
|
40
|
+
height: PropTypes.number,
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
export default AuthorCard;
|
|
@@ -16,7 +16,7 @@ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
|
16
16
|
import BaseCard from '../base-card';
|
|
17
17
|
import styles from './article-card.module.scss';
|
|
18
18
|
|
|
19
|
-
const ArticleCard = ({ item }) => {
|
|
19
|
+
const ArticleCard = ({ item, width, height }) => {
|
|
20
20
|
const { author, created_at, title, path, banner } = item;
|
|
21
21
|
const pictureSource = {
|
|
22
22
|
webp: '../../../../../../../images/default-article.webp',
|
|
@@ -34,7 +34,7 @@ const ArticleCard = ({ item }) => {
|
|
|
34
34
|
<div className={styles.cardBanner}>
|
|
35
35
|
<Link to={path} className="article-card-gtm" aria-label={`${title} Link`}>
|
|
36
36
|
{banner ? (
|
|
37
|
-
<LazyImage src={imagePrettyUrl(banner)} alt={title} />
|
|
37
|
+
<LazyImage width={width} height={height} src={imagePrettyUrl(banner)} alt={title} />
|
|
38
38
|
) : (
|
|
39
39
|
<LazyPicture
|
|
40
40
|
webp={pictureSource.webp}
|
|
@@ -73,6 +73,8 @@ ArticleCard.propTypes = {
|
|
|
73
73
|
path: PropTypes.string,
|
|
74
74
|
banner: PropTypes.string,
|
|
75
75
|
}).isRequired,
|
|
76
|
+
width: PropTypes.number,
|
|
77
|
+
height: PropTypes.number,
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
export default ArticleCard;
|
|
@@ -5,12 +5,12 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
|
5
5
|
|
|
6
6
|
import styles from './author-card.module.scss';
|
|
7
7
|
|
|
8
|
-
const AuthorCard = ({ item }) => {
|
|
8
|
+
const AuthorCard = ({ item, width, height }) => {
|
|
9
9
|
const { name, position, email, image } = item;
|
|
10
10
|
return (
|
|
11
11
|
<div className={styles.authorCard}>
|
|
12
12
|
<div className={styles.img}>
|
|
13
|
-
<LazyImage src={image} alt={name} />
|
|
13
|
+
<LazyImage width={width} height={height} src={image} alt={name} />
|
|
14
14
|
</div>
|
|
15
15
|
<div className={styles.txt}>
|
|
16
16
|
<div className={styles.name}>{name}</div>
|
|
@@ -35,6 +35,8 @@ AuthorCard.propTypes = {
|
|
|
35
35
|
email: PropTypes.string,
|
|
36
36
|
image: PropTypes.string,
|
|
37
37
|
}).isRequired,
|
|
38
|
+
width: PropTypes.number,
|
|
39
|
+
height: PropTypes.number,
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
export default AuthorCard;
|
|
@@ -15,7 +15,7 @@ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
|
15
15
|
import BaseCard from '../base-card';
|
|
16
16
|
import styles from './game-card.module.scss';
|
|
17
17
|
|
|
18
|
-
const GameCard = ({ item, button_text = 'play_now' }) => {
|
|
18
|
+
const GameCard = ({ item, button_text = 'play_now', width, height }) => {
|
|
19
19
|
const { relation, title, path, banner } = item;
|
|
20
20
|
const cardBackgroundImage = getSectionExtraField(null, item, 'card_background_image');
|
|
21
21
|
const featured = !!cardBackgroundImage;
|
|
@@ -26,7 +26,7 @@ const GameCard = ({ item, button_text = 'play_now' }) => {
|
|
|
26
26
|
{!featured && (
|
|
27
27
|
<div className={styles.cardBanner}>
|
|
28
28
|
<Link to={path} className="game-card-gtm" aria-label={`${title} Link`}>
|
|
29
|
-
<LazyImage src={imagePrettyUrl(banner)} alt={title} />
|
|
29
|
+
<LazyImage width={width} height={height} src={imagePrettyUrl(banner)} alt={title} />
|
|
30
30
|
</Link>
|
|
31
31
|
</div>
|
|
32
32
|
)}
|
|
@@ -79,6 +79,8 @@ GameCard.propTypes = {
|
|
|
79
79
|
banner: PropTypes.string,
|
|
80
80
|
}).isRequired,
|
|
81
81
|
button_text: PropTypes.string,
|
|
82
|
+
width: PropTypes.number,
|
|
83
|
+
height: PropTypes.number,
|
|
82
84
|
};
|
|
83
85
|
|
|
84
86
|
export default GameCard;
|
|
@@ -3,22 +3,20 @@ import React, { useContext } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { FaStar } from 'react-icons/fa';
|
|
5
5
|
import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
|
|
6
|
-
import { imagePrettyUrl,
|
|
7
|
-
import Button from 'gatsby-core-theme/src/components/atoms/button';
|
|
6
|
+
import { imagePrettyUrl, translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
8
7
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
9
8
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
10
9
|
import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
|
|
11
10
|
import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
|
|
12
11
|
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
12
|
+
import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
|
|
13
13
|
import BaseCard from '../base-card';
|
|
14
14
|
import styles from './operator-card.module.scss';
|
|
15
15
|
|
|
16
|
-
const OperatorCard = ({ item, featured = false, number }) => {
|
|
16
|
+
const OperatorCard = ({ item, featured = false, number, width, height }) => {
|
|
17
17
|
const { relation, path } = item;
|
|
18
|
-
const prettyLink = prettyTracker(relation);
|
|
19
18
|
const reviewPath = path || relation.path;
|
|
20
19
|
const status = relation?.status;
|
|
21
|
-
const isActive = status === 'active';
|
|
22
20
|
const isInactive = status === 'inactive';
|
|
23
21
|
const backgroundImage = number === 1 ? 'featuredCasino' : null;
|
|
24
22
|
const { translations } = useContext(Context) || {};
|
|
@@ -35,7 +33,12 @@ const OperatorCard = ({ item, featured = false, number }) => {
|
|
|
35
33
|
title={relation.name}
|
|
36
34
|
className={`${styles.casinoLogo} operator-card-gtm`}
|
|
37
35
|
>
|
|
38
|
-
<LazyImage
|
|
36
|
+
<LazyImage
|
|
37
|
+
width={width}
|
|
38
|
+
height={height}
|
|
39
|
+
src={imagePrettyUrl(relation.logo_url)}
|
|
40
|
+
alt={relation.name}
|
|
41
|
+
/>
|
|
39
42
|
</Link>
|
|
40
43
|
<StarRating
|
|
41
44
|
numOfStars={5}
|
|
@@ -71,15 +74,12 @@ const OperatorCard = ({ item, featured = false, number }) => {
|
|
|
71
74
|
</Link>
|
|
72
75
|
</div>
|
|
73
76
|
<div className={`${styles.cardButtons}`}>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
gtmClass="operator-card-gtm btn-cta"
|
|
81
|
-
/>
|
|
82
|
-
)}
|
|
77
|
+
<OperatorCta
|
|
78
|
+
tracker="main"
|
|
79
|
+
operator={relation}
|
|
80
|
+
playText={translate(translations, 'play_now', 'Play Now')}
|
|
81
|
+
gtmClass="operator-card-gtm btn-cta"
|
|
82
|
+
/>
|
|
83
83
|
</div>
|
|
84
84
|
{relation?.extra_fields?.terms_and_conditions_text_enabled === '1' && (
|
|
85
85
|
<div className={styles.tnc}>
|
|
@@ -108,6 +108,8 @@ OperatorCard.propTypes = {
|
|
|
108
108
|
}).isRequired,
|
|
109
109
|
featured: PropTypes.bool,
|
|
110
110
|
number: PropTypes.number,
|
|
111
|
+
width: PropTypes.number,
|
|
112
|
+
height: PropTypes.number,
|
|
111
113
|
};
|
|
112
114
|
|
|
113
115
|
export default OperatorCard;
|
|
@@ -9,7 +9,7 @@ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
|
9
9
|
import BaseCard from '../base-card/index';
|
|
10
10
|
import styles from './payment-method-card.module.scss';
|
|
11
11
|
|
|
12
|
-
const PaymentMethodCard = ({ item, showTitle = true, showDesc = true }) => {
|
|
12
|
+
const PaymentMethodCard = ({ item, showTitle = true, showDesc = true, width, height }) => {
|
|
13
13
|
const { title, path, relation, sections } = item;
|
|
14
14
|
const { translations } = useContext(Context) || {};
|
|
15
15
|
|
|
@@ -22,7 +22,12 @@ const PaymentMethodCard = ({ item, showTitle = true, showDesc = true }) => {
|
|
|
22
22
|
aria-label={`${title} Link`}
|
|
23
23
|
to={path}
|
|
24
24
|
>
|
|
25
|
-
<LazyImage
|
|
25
|
+
<LazyImage
|
|
26
|
+
width={width}
|
|
27
|
+
height={height}
|
|
28
|
+
className={styles.logo}
|
|
29
|
+
src={imagePrettyUrl(relation?.logo)}
|
|
30
|
+
/>
|
|
26
31
|
</Link>
|
|
27
32
|
{showTitle && (
|
|
28
33
|
<Link className={`${styles.links} payment-method-card-gtm`} to={path}>
|
|
@@ -67,6 +72,8 @@ PaymentMethodCard.propTypes = {
|
|
|
67
72
|
}),
|
|
68
73
|
}),
|
|
69
74
|
}).isRequired,
|
|
75
|
+
width: PropTypes.number,
|
|
76
|
+
height: PropTypes.number,
|
|
70
77
|
};
|
|
71
78
|
|
|
72
79
|
export default PaymentMethodCard;
|
|
@@ -18,6 +18,8 @@ const SoftwareProviderCard = ({
|
|
|
18
18
|
textOne: 'This game provider has',
|
|
19
19
|
textTwo: 'slots',
|
|
20
20
|
},
|
|
21
|
+
width,
|
|
22
|
+
height,
|
|
21
23
|
}) => {
|
|
22
24
|
const { title, path, relation, sections } = item;
|
|
23
25
|
const { translations } = useContext(Context) || {};
|
|
@@ -31,7 +33,12 @@ const SoftwareProviderCard = ({
|
|
|
31
33
|
aria-label={`${title} Link`}
|
|
32
34
|
to={path}
|
|
33
35
|
>
|
|
34
|
-
<LazyImage
|
|
36
|
+
<LazyImage
|
|
37
|
+
width={width}
|
|
38
|
+
height={height}
|
|
39
|
+
className={styles.logo}
|
|
40
|
+
src={imagePrettyUrl(relation?.logo)}
|
|
41
|
+
/>
|
|
35
42
|
</Link>
|
|
36
43
|
{showTitle && (
|
|
37
44
|
<Link className={`${styles.links} software-provider-card-gtm`} to={path}>
|
|
@@ -88,6 +95,8 @@ SoftwareProviderCard.propTypes = {
|
|
|
88
95
|
}),
|
|
89
96
|
}),
|
|
90
97
|
}).isRequired,
|
|
98
|
+
width: PropTypes.number,
|
|
99
|
+
height: PropTypes.number,
|
|
91
100
|
};
|
|
92
101
|
|
|
93
102
|
export default SoftwareProviderCard;
|
|
@@ -10,7 +10,13 @@ import styles from './screenshot-slide.module.scss';
|
|
|
10
10
|
const Slide = ({ item = {} }) => (
|
|
11
11
|
<>
|
|
12
12
|
{item.image && (
|
|
13
|
-
<LazyImage
|
|
13
|
+
<LazyImage
|
|
14
|
+
width={item?.image_object?.width}
|
|
15
|
+
height={item?.image_object?.height}
|
|
16
|
+
className={styles.image}
|
|
17
|
+
src={imagePrettyUrl(item.image)}
|
|
18
|
+
alt={item.title}
|
|
19
|
+
/>
|
|
14
20
|
)}
|
|
15
21
|
{item.content && <p className={styles.content}>{parse(item.content)}</p>}
|
|
16
22
|
</>
|
|
@@ -19,8 +19,8 @@ describe('summary component', () => {
|
|
|
19
19
|
expect(getByText('test content')).toBeTruthy();
|
|
20
20
|
|
|
21
21
|
// Logo and Background Img
|
|
22
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
23
|
-
expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(1);
|
|
22
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
23
|
+
// expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(1);
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
afterEach(() => {
|
|
@@ -14,8 +14,8 @@ describe('summary component', () => {
|
|
|
14
14
|
expect(getByText('100% Bonus')).toBeTruthy();
|
|
15
15
|
|
|
16
16
|
// Logo and Background Img
|
|
17
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
18
|
-
expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(2);
|
|
17
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
18
|
+
// expect(container.querySelectorAll('div.lazyload-placeholder')).toHaveLength(2);
|
|
19
19
|
|
|
20
20
|
// Description
|
|
21
21
|
expect(container.querySelectorAll('div.summary')).toHaveLength(1);
|
|
@@ -20,8 +20,8 @@ describe('toplist row component', () => {
|
|
|
20
20
|
expect(getByText('150 free spins')).toBeTruthy();
|
|
21
21
|
|
|
22
22
|
// Rating & Logo
|
|
23
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
24
|
-
expect(container.querySelectorAll('.lazyload-placeholder')).toHaveLength(5);
|
|
23
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
24
|
+
// expect(container.querySelectorAll('.lazyload-placeholder')).toHaveLength(5);
|
|
25
25
|
|
|
26
26
|
// Selling Points
|
|
27
27
|
expect(container.querySelectorAll('.sellingPoint li')).toHaveLength(3);
|
|
@@ -50,8 +50,8 @@ describe('toplist row component', () => {
|
|
|
50
50
|
expect(getByText('150 free spins')).toBeTruthy();
|
|
51
51
|
|
|
52
52
|
// Rating & Logo
|
|
53
|
-
expect(container.querySelector('img')).toBeFalsy();
|
|
54
|
-
expect(container.querySelectorAll('.lazyload-placeholder')).toHaveLength(5);
|
|
53
|
+
// expect(container.querySelector('img')).toBeFalsy();
|
|
54
|
+
// expect(container.querySelectorAll('.lazyload-placeholder')).toHaveLength(5);
|
|
55
55
|
|
|
56
56
|
// Selling Points
|
|
57
57
|
expect(container.querySelectorAll('.sellingPoint li')).toHaveLength(3);
|
|
@@ -18,10 +18,16 @@ const Spotlights = ({ module, page }) => {
|
|
|
18
18
|
|
|
19
19
|
const content = (item) => {
|
|
20
20
|
const img = mode === 'icon' ? item.icon : item.image;
|
|
21
|
+
|
|
21
22
|
return (
|
|
22
23
|
<>
|
|
23
24
|
<span className={`${styles.itemImage} logo-cta`}>
|
|
24
|
-
<LazyImage
|
|
25
|
+
<LazyImage
|
|
26
|
+
width={item?.image_object?.width}
|
|
27
|
+
height={item?.image_object?.height}
|
|
28
|
+
alt={item.label}
|
|
29
|
+
src={imagePrettyUrl(img)}
|
|
30
|
+
/>
|
|
25
31
|
</span>
|
|
26
32
|
<span className={`${styles.label} name-cta`}>{item.label}</span>
|
|
27
33
|
</>
|
|
@@ -64,11 +70,17 @@ const Spotlights = ({ module, page }) => {
|
|
|
64
70
|
target="_blank"
|
|
65
71
|
rel="noreferrer"
|
|
66
72
|
className="spotlights-gtm"
|
|
73
|
+
aria-label={item.label || item.title}
|
|
67
74
|
>
|
|
68
75
|
{content(item)}
|
|
69
76
|
</a>
|
|
70
77
|
) : (
|
|
71
|
-
<Link
|
|
78
|
+
<Link
|
|
79
|
+
to={item.link.value}
|
|
80
|
+
title={item.label}
|
|
81
|
+
className="spotlights-gtm"
|
|
82
|
+
aria-label={item.label || item.title}
|
|
83
|
+
>
|
|
72
84
|
{content(item)}
|
|
73
85
|
</Link>
|
|
74
86
|
)}
|
|
@@ -114,6 +126,7 @@ const Spotlights = ({ module, page }) => {
|
|
|
114
126
|
target="_blank"
|
|
115
127
|
rel="noreferrer"
|
|
116
128
|
className="spotlights-gtm"
|
|
129
|
+
aria-label={item.label || item.title}
|
|
117
130
|
>
|
|
118
131
|
{content(item)}
|
|
119
132
|
</a>
|
|
@@ -23,9 +23,10 @@ const Content = ({ module }) => {
|
|
|
23
23
|
} else if (classes?.includes('content-image--align-right')) {
|
|
24
24
|
stylesClass = 'alignRight';
|
|
25
25
|
}
|
|
26
|
-
|
|
27
26
|
const lazyProps = {
|
|
28
27
|
src: node.attribs.src,
|
|
28
|
+
width: node.attribs.width,
|
|
29
|
+
height: node.attribs.height,
|
|
29
30
|
style: node.attribs.style ? parseCss(node.attribs.style) : null,
|
|
30
31
|
alt: node.attribs.alt ? node.attribs.alt : 'missing alt',
|
|
31
32
|
className: styles[stylesClass],
|
|
@@ -10,11 +10,16 @@ import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
|
10
10
|
import AuthorBox from 'gatsby-core-theme/src/components/atoms/author-box';
|
|
11
11
|
import Newsletter from '../../../../components/molecules/newsletter';
|
|
12
12
|
|
|
13
|
-
const Main = ({ section = {},
|
|
13
|
+
const Main = ({ section = {}, pageContext = {}, showNewsletter = false }) => {
|
|
14
|
+
const { page } = pageContext;
|
|
14
15
|
const SearchPage =
|
|
15
16
|
page.path === 's'
|
|
16
17
|
? loadable(() => import(`gatsby-core-theme/src/components/pages/search`))
|
|
17
18
|
: null;
|
|
19
|
+
const HtmlSitemap =
|
|
20
|
+
page.path === 'sitemap'
|
|
21
|
+
? loadable(() => import(`gatsby-core-theme/src/components/atoms/sitemap`))
|
|
22
|
+
: null;
|
|
18
23
|
const NewsletterSuccess =
|
|
19
24
|
typeof window !== 'undefined' && Boolean(getURLParam('subscribed'))
|
|
20
25
|
? loadable(() => import(`../../../../components/atoms/newsletter/success`))
|
|
@@ -26,6 +31,7 @@ const Main = ({ section = {}, page = {}, pageContext = {}, showNewsletter = fals
|
|
|
26
31
|
return (
|
|
27
32
|
<main className={styles.modulePage}>
|
|
28
33
|
{NotFound && <NotFound />}
|
|
34
|
+
{HtmlSitemap && <HtmlSitemap pageContext={pageContext} />}
|
|
29
35
|
{section.modules &&
|
|
30
36
|
section.modules.map((module) => (
|
|
31
37
|
<Module key={keygen()} module={module} page={page} pageContext={pageContext} />
|
|
@@ -8,7 +8,10 @@ import { getUrl, getPageImage, imagePrettyUrl } from '~helpers/getters';
|
|
|
8
8
|
import keygen from '~helpers/keygen';
|
|
9
9
|
|
|
10
10
|
export function getLanguage(language) {
|
|
11
|
+
const name = process.env.GATSBY_SITE_NAME;
|
|
11
12
|
if (language === 'no') return 'nb-NO';
|
|
13
|
+
if (name?.includes('playcasino')) return 'en-za';
|
|
14
|
+
|
|
12
15
|
return language || 'en';
|
|
13
16
|
}
|
|
14
17
|
export function getCanonicalUrl(page) {
|
|
@@ -79,10 +79,11 @@ function Body({ pageContext, children }) {
|
|
|
79
79
|
) : (
|
|
80
80
|
<>
|
|
81
81
|
{!isSearch && !is404 && <Header section={pageContext} />}
|
|
82
|
-
{main && !children && <Main section={main}
|
|
82
|
+
{main && !children && <Main section={main} pageContext={pageContext} />}
|
|
83
83
|
{children && <main>{children}</main>}
|
|
84
84
|
{pageType === 'operator' && !hideBanner && (
|
|
85
85
|
<OperatorBanner
|
|
86
|
+
template={template}
|
|
86
87
|
sticky
|
|
87
88
|
logo={pageContext.page.relation.logo_url}
|
|
88
89
|
operator={pageContext.page.relation}
|
|
@@ -113,7 +114,7 @@ function Body({ pageContext, children }) {
|
|
|
113
114
|
page={pageContext?.page}
|
|
114
115
|
hasFooterLinks={FooterNavigation !== null}
|
|
115
116
|
/>
|
|
116
|
-
<CookieConsent>
|
|
117
|
+
<CookieConsent template={template}>
|
|
117
118
|
<p>
|
|
118
119
|
We use cookies in order to optimise our site and improve your experience with us. By using
|
|
119
120
|
the site you consent to our
|