gatsby-matrix-theme 3.0.2 → 3.0.6
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 +9 -2
- 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/gatsby-core-theme/components/atoms/spotlights/index.js +15 -2
- package/src/gatsby-core-theme/components/molecules/content/content.module.scss +34 -1
- package/src/gatsby-core-theme/components/molecules/content/index.js +17 -4
- package/src/gatsby-core-theme/components/organisms/head/index.js +3 -0
- package/src/gatsby-core-theme/components/organisms/navigation/index.js +9 -1
- package/src/gatsby-core-theme/components/pages/body/index.js +2 -1
- package/storybook/public/{0.83ad5c1a.iframe.bundle.js → 0.3d133e98.iframe.bundle.js} +1 -1
- package/storybook/public/{5.58b2efe7.iframe.bundle.js → 5.6fafb5f4.iframe.bundle.js} +3 -3
- package/storybook/public/{5.58b2efe7.iframe.bundle.js.LICENSE.txt → 5.6fafb5f4.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.6fafb5f4.iframe.bundle.js.map +1 -0
- package/storybook/public/{6.9d06c32b.iframe.bundle.js → 6.2d558003.iframe.bundle.js} +1 -1
- package/storybook/public/{7.9e532498.iframe.bundle.js → 7.8622538a.iframe.bundle.js} +1 -1
- package/storybook/public/{8.95fa4570.iframe.bundle.js → 8.cd8f12ce.iframe.bundle.js} +3 -3
- package/storybook/public/{8.95fa4570.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/iframe.html +1 -1
- package/storybook/public/main.4c12afb7.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.540b02a0.iframe.bundle.js → runtime~main.7b867edc.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.be5d297a.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.60c9a523.iframe.bundle.js.LICENSE.txt → vendors~main.be5d297a.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.be5d297a.iframe.bundle.js.map +1 -0
- package/storybook/public/5.58b2efe7.iframe.bundle.js.map +0 -1
- package/storybook/public/8.95fa4570.iframe.bundle.js.map +0 -1
- package/storybook/public/main.3f17eb62.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.60c9a523.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.60c9a523.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
## [3.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.5...v3.0.6) (2021-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* content read more ([6f00226](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6f00226ebc277e02a78103e9987871200af0bb17))
|
|
7
|
+
* issue fix ([ac5b5e6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ac5b5e67e43d31d67cf0c37ecfbf0eb0c979323c))
|
|
8
|
+
* small style issue ([2e32e03](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e32e03904e809a3d2cc1ed444fc5dd1fc16cdeb))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Code Refactoring
|
|
12
|
+
|
|
13
|
+
* add custom styles to menu ([5fb35db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5fb35db8cdc8a4afdb72a768e62ff8c49661371c))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Config
|
|
17
|
+
|
|
18
|
+
* update core theme ([e2885b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2885b856a689cc0f2501d87d39d4f6e92b40f37))
|
|
19
|
+
* updated core theme ([2d2e722](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2d2e72239cba3cf0f6239fede523adf901ee21de))
|
|
20
|
+
* updated core version ([6c83579](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c8357910c12a57d527d691afaab74f2e6debc89))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* Merge branch 'show-more-content' into 'master' ([dfbe31f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dfbe31fd8cf1788ab3546f8ff0663ea5e21bd1e3))
|
|
24
|
+
* Merge branch 'tm-navigation-sticky' into 'master' ([239e204](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/239e2044d341183d843ed06548cfa330b3358bc4))
|
|
25
|
+
|
|
26
|
+
## [3.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.4...v3.0.5) (2021-12-02)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Config
|
|
30
|
+
|
|
31
|
+
* updated core version ([08a78cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/08a78cd4c979b78d157b8eeaeaa608880b9f9023))
|
|
32
|
+
|
|
33
|
+
## [3.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.3...v3.0.4) (2021-12-01)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* added language for playcasino ([7ffcb83](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7ffcb83cd74422e92491b5482e9d1fac6530ca3f))
|
|
39
|
+
* width and height image sizes as props ([e65f3cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e65f3cd1aad37ec42d414864763115d27e03f23c))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Code Refactoring
|
|
43
|
+
|
|
44
|
+
* fix build err ([d89e12d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d89e12d8e0f03c2f31a79f32bd86900c9450b7ea))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Config
|
|
48
|
+
|
|
49
|
+
* updated core theme version ([5333e12](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5333e1210a57fa63032f17c3ebeabf55e9555a73))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
* Merge branch 'fix-image-sizes' into 'master' ([7b8939d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7b8939dd1bc6c63f0251b626daa6860630e48f4b))
|
|
53
|
+
* Merge branch 'master' into fix-image-sizes ([350c093](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/350c093057b4fc31aaf73111db0e589a44e84ea9))
|
|
54
|
+
* Merge branch 'pcsa-html-lang' into 'master' ([e8a63b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e8a63b5e25348aa89eb8a8028e898bfc6f91668e))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Tests
|
|
58
|
+
|
|
59
|
+
* commented failing tests for lazyload imgs ([8ee9b4a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ee9b4ab437e445c329d13db558a2a567b39258b))
|
|
60
|
+
* commented lazy image fails ([0884e0c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0884e0cb75e63a5d0ba9b9e4551e24c2e2043340))
|
|
61
|
+
|
|
62
|
+
## [3.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.2...v3.0.3) (2021-11-28)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* cookie consent props ([56ecfc0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/56ecfc071501f384fcdc3880673ab34bc25ba31b))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Code Refactoring
|
|
71
|
+
|
|
72
|
+
* accessibility score changes ([706abf6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/706abf6946091f4f13d59e127c500b87371d4816))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Config
|
|
76
|
+
|
|
77
|
+
* updated core theme ([776b125](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/776b12506de4db82e67385c8da7118c547116dd4))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
* Merge branch 'tm-2595-accessibility-scores' into 'master' ([fd9b453](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fd9b453146abead35f7128723a1098dbc119a338))
|
|
81
|
+
* Merge branch 'cookie-consent' into 'master' ([b44b163](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b44b1632e33fa2ef6528cabee1fed7af320caa8e))
|
|
82
|
+
|
|
1
83
|
## [3.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.1...v3.0.2) (2021-11-25)
|
|
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.6",
|
|
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.21",
|
|
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;
|
|
@@ -13,7 +13,7 @@ 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
18
|
const reviewPath = path || relation.path;
|
|
19
19
|
const status = relation?.status;
|
|
@@ -33,7 +33,12 @@ const OperatorCard = ({ item, featured = false, number }) => {
|
|
|
33
33
|
title={relation.name}
|
|
34
34
|
className={`${styles.casinoLogo} operator-card-gtm`}
|
|
35
35
|
>
|
|
36
|
-
<LazyImage
|
|
36
|
+
<LazyImage
|
|
37
|
+
width={width}
|
|
38
|
+
height={height}
|
|
39
|
+
src={imagePrettyUrl(relation.logo_url)}
|
|
40
|
+
alt={relation.name}
|
|
41
|
+
/>
|
|
37
42
|
</Link>
|
|
38
43
|
<StarRating
|
|
39
44
|
numOfStars={5}
|
|
@@ -103,6 +108,8 @@ OperatorCard.propTypes = {
|
|
|
103
108
|
}).isRequired,
|
|
104
109
|
featured: PropTypes.bool,
|
|
105
110
|
number: PropTypes.number,
|
|
111
|
+
width: PropTypes.number,
|
|
112
|
+
height: PropTypes.number,
|
|
106
113
|
};
|
|
107
114
|
|
|
108
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>
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
td {
|
|
130
130
|
color: white !important;
|
|
131
131
|
background: var(--table-head-background);
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
border-radius: 0;
|
|
134
134
|
|
|
135
135
|
&:first-child {
|
|
@@ -237,6 +237,39 @@
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
+
|
|
241
|
+
@include max(mobile) {
|
|
242
|
+
&.showMore {
|
|
243
|
+
max-height: 17.8rem;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
position: relative;
|
|
246
|
+
|
|
247
|
+
&::before {
|
|
248
|
+
content: '';
|
|
249
|
+
position: absolute;
|
|
250
|
+
transition: all .25s ease-in-out;
|
|
251
|
+
height: 4rem;
|
|
252
|
+
right: 0;
|
|
253
|
+
bottom: 0;
|
|
254
|
+
left: 0;
|
|
255
|
+
background-image: linear-gradient(to bottom, rgba(209, 209, 209, 0), #ffffff);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.button {
|
|
262
|
+
margin: 3rem 0 0 1.6rem !important;
|
|
263
|
+
border: 2px solid #171f49;
|
|
264
|
+
width: calc(100% - 3.2rem);
|
|
265
|
+
font-style: normal;
|
|
266
|
+
font-weight: bold;
|
|
267
|
+
font-size: 1.8rem;
|
|
268
|
+
line-height: 3rem;
|
|
269
|
+
color: #171f49;
|
|
270
|
+
@include min(tablet) {
|
|
271
|
+
display: none;
|
|
272
|
+
}
|
|
240
273
|
}
|
|
241
274
|
|
|
242
275
|
.floatLeft {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
1
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
-
import React from 'react';
|
|
3
|
+
import React, { useState } from 'react';
|
|
3
4
|
import parse from 'html-react-parser';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
6
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
7
7
|
import { parseCss } from 'gatsby-core-theme/src/helpers/css-parser';
|
|
8
8
|
import styles from './content.module.scss';
|
|
9
9
|
|
|
10
10
|
const Content = ({ module }) => {
|
|
11
|
+
const { show_more_label, show_more_enabled } = module || {};
|
|
12
|
+
const [showMore, setShowMore] = useState(show_more_enabled === '1');
|
|
13
|
+
|
|
11
14
|
const replaceMedia = (node) => {
|
|
12
15
|
if (node.name === 'img') {
|
|
13
16
|
let stylesClass = null;
|
|
@@ -23,9 +26,10 @@ const Content = ({ module }) => {
|
|
|
23
26
|
} else if (classes?.includes('content-image--align-right')) {
|
|
24
27
|
stylesClass = 'alignRight';
|
|
25
28
|
}
|
|
26
|
-
|
|
27
29
|
const lazyProps = {
|
|
28
30
|
src: node.attribs.src,
|
|
31
|
+
width: node.attribs.width,
|
|
32
|
+
height: node.attribs.height,
|
|
29
33
|
style: node.attribs.style ? parseCss(node.attribs.style) : null,
|
|
30
34
|
alt: node.attribs.alt ? node.attribs.alt : 'missing alt',
|
|
31
35
|
className: styles[stylesClass],
|
|
@@ -63,9 +67,13 @@ const Content = ({ module }) => {
|
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
|
|
70
|
+
const handleChange = () => {
|
|
71
|
+
setShowMore(!showMore);
|
|
72
|
+
};
|
|
73
|
+
|
|
66
74
|
return (
|
|
67
75
|
<>
|
|
68
|
-
<div className={styles.content}>
|
|
76
|
+
<div className={`${styles.content} ${showMore && styles.showMore}`}>
|
|
69
77
|
<div className={`${switchStyle(module.style)}`}>
|
|
70
78
|
{module.value &&
|
|
71
79
|
parse(module.value, {
|
|
@@ -73,6 +81,11 @@ const Content = ({ module }) => {
|
|
|
73
81
|
})}
|
|
74
82
|
</div>
|
|
75
83
|
</div>
|
|
84
|
+
{showMore && (
|
|
85
|
+
<button type="button" className={styles.button} onClick={handleChange}>
|
|
86
|
+
{show_more_label}
|
|
87
|
+
</button>
|
|
88
|
+
)}
|
|
76
89
|
</>
|
|
77
90
|
);
|
|
78
91
|
};
|
|
@@ -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) {
|
|
@@ -32,6 +32,7 @@ const Navigation = ({
|
|
|
32
32
|
sticky = true,
|
|
33
33
|
template,
|
|
34
34
|
children,
|
|
35
|
+
customStyles,
|
|
35
36
|
}) => {
|
|
36
37
|
const navRef = useRef(React.createRef());
|
|
37
38
|
const showMenu = template !== 'ppc';
|
|
@@ -74,7 +75,13 @@ const Navigation = ({
|
|
|
74
75
|
</Link>
|
|
75
76
|
{showMenu && (
|
|
76
77
|
<>
|
|
77
|
-
<Menu
|
|
78
|
+
<Menu
|
|
79
|
+
section={section}
|
|
80
|
+
menu={menu}
|
|
81
|
+
options={options}
|
|
82
|
+
customStyles={customStyles}
|
|
83
|
+
gtmClass="main-menu-gtm"
|
|
84
|
+
/>
|
|
78
85
|
{hasSearch && <SearchForm className={styles.search} searchIcon={searchIcon} />}
|
|
79
86
|
</>
|
|
80
87
|
)}
|
|
@@ -121,6 +128,7 @@ Navigation.propTypes = {
|
|
|
121
128
|
}),
|
|
122
129
|
}),
|
|
123
130
|
sticky: PropTypes.bool,
|
|
131
|
+
customStyles: PropTypes.string,
|
|
124
132
|
};
|
|
125
133
|
|
|
126
134
|
export default Navigation;
|
|
@@ -83,6 +83,7 @@ function Body({ pageContext, children }) {
|
|
|
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
|