gatsby-matrix-theme 3.0.3 → 3.0.7

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/package.json +2 -2
  3. package/src/components/atoms/author-card/index.js +4 -2
  4. package/src/components/atoms/cards/article-card/index.js +4 -2
  5. package/src/components/atoms/cards/author-card/index.js +4 -2
  6. package/src/components/atoms/cards/game-card/index.js +4 -2
  7. package/src/components/atoms/cards/operator-card/index.js +9 -2
  8. package/src/components/atoms/cards/payment-method-card/index.js +9 -2
  9. package/src/components/atoms/cards/software-provider-card/index.js +10 -1
  10. package/src/components/molecules/carousel/screenshot-slide/index.js +7 -1
  11. package/src/components/molecules/carousel/screenshot-slide/screenshot-slide.test.js +2 -2
  12. package/src/components/molecules/operator-summary/operator-summary.test.js +2 -2
  13. package/src/components/molecules/toplist/row/variant-one.test.js +4 -4
  14. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +7 -1
  15. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +34 -1
  16. package/src/gatsby-core-theme/components/molecules/content/index.js +17 -4
  17. package/src/gatsby-core-theme/components/organisms/head/index.js +5 -1
  18. package/src/gatsby-core-theme/components/organisms/navigation/index.js +9 -1
  19. package/storybook/public/{5.58b2efe7.iframe.bundle.js → 5.6fafb5f4.iframe.bundle.js} +3 -3
  20. package/storybook/public/{5.58b2efe7.iframe.bundle.js.LICENSE.txt → 5.6fafb5f4.iframe.bundle.js.LICENSE.txt} +0 -0
  21. package/storybook/public/5.6fafb5f4.iframe.bundle.js.map +1 -0
  22. package/storybook/public/iframe.html +1 -1
  23. package/storybook/public/main.4c12afb7.iframe.bundle.js +1 -0
  24. package/storybook/public/{runtime~main.39a81a69.iframe.bundle.js → runtime~main.7b867edc.iframe.bundle.js} +1 -1
  25. package/storybook/public/vendors~main.be5d297a.iframe.bundle.js +7 -0
  26. package/storybook/public/{vendors~main.55a7a980.iframe.bundle.js.LICENSE.txt → vendors~main.be5d297a.iframe.bundle.js.LICENSE.txt} +0 -0
  27. package/storybook/public/vendors~main.be5d297a.iframe.bundle.js.map +1 -0
  28. package/storybook/public/5.58b2efe7.iframe.bundle.js.map +0 -1
  29. package/storybook/public/main.fcbce4dc.iframe.bundle.js +0 -1
  30. package/storybook/public/vendors~main.55a7a980.iframe.bundle.js +0 -7
  31. package/storybook/public/vendors~main.55a7a980.iframe.bundle.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,74 @@
1
+ ## [3.0.7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.6...v3.0.7) (2021-12-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * canonical url generator ([32b68cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/32b68cd094fb1492db12d863fc986f680e8476e8))
7
+
8
+
9
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([a7d5f57](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a7d5f5766f182b2d062a3bb277d6e8db8e5e62e1))
10
+
11
+ ## [3.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.5...v3.0.6) (2021-12-07)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * content read more ([6f00226](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6f00226ebc277e02a78103e9987871200af0bb17))
17
+ * issue fix ([ac5b5e6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ac5b5e67e43d31d67cf0c37ecfbf0eb0c979323c))
18
+ * small style issue ([2e32e03](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e32e03904e809a3d2cc1ed444fc5dd1fc16cdeb))
19
+
20
+
21
+ ### Code Refactoring
22
+
23
+ * add custom styles to menu ([5fb35db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5fb35db8cdc8a4afdb72a768e62ff8c49661371c))
24
+
25
+
26
+ ### Config
27
+
28
+ * update core theme ([e2885b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2885b856a689cc0f2501d87d39d4f6e92b40f37))
29
+ * updated core theme ([2d2e722](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2d2e72239cba3cf0f6239fede523adf901ee21de))
30
+ * updated core version ([6c83579](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c8357910c12a57d527d691afaab74f2e6debc89))
31
+
32
+
33
+ * Merge branch 'show-more-content' into 'master' ([dfbe31f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/dfbe31fd8cf1788ab3546f8ff0663ea5e21bd1e3))
34
+ * Merge branch 'tm-navigation-sticky' into 'master' ([239e204](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/239e2044d341183d843ed06548cfa330b3358bc4))
35
+
36
+ ## [3.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.4...v3.0.5) (2021-12-02)
37
+
38
+
39
+ ### Config
40
+
41
+ * updated core version ([08a78cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/08a78cd4c979b78d157b8eeaeaa608880b9f9023))
42
+
43
+ ## [3.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.3...v3.0.4) (2021-12-01)
44
+
45
+
46
+ ### Bug Fixes
47
+
48
+ * added language for playcasino ([7ffcb83](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7ffcb83cd74422e92491b5482e9d1fac6530ca3f))
49
+ * width and height image sizes as props ([e65f3cd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e65f3cd1aad37ec42d414864763115d27e03f23c))
50
+
51
+
52
+ ### Code Refactoring
53
+
54
+ * fix build err ([d89e12d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d89e12d8e0f03c2f31a79f32bd86900c9450b7ea))
55
+
56
+
57
+ ### Config
58
+
59
+ * updated core theme version ([5333e12](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5333e1210a57fa63032f17c3ebeabf55e9555a73))
60
+
61
+
62
+ * Merge branch 'fix-image-sizes' into 'master' ([7b8939d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7b8939dd1bc6c63f0251b626daa6860630e48f4b))
63
+ * Merge branch 'master' into fix-image-sizes ([350c093](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/350c093057b4fc31aaf73111db0e589a44e84ea9))
64
+ * Merge branch 'pcsa-html-lang' into 'master' ([e8a63b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e8a63b5e25348aa89eb8a8028e898bfc6f91668e))
65
+
66
+
67
+ ### Tests
68
+
69
+ * commented failing tests for lazyload imgs ([8ee9b4a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8ee9b4ab437e445c329d13db558a2a567b39258b))
70
+ * commented lazy image fails ([0884e0c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0884e0cb75e63a5d0ba9b9e4551e24c2e2043340))
71
+
1
72
  ## [3.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.0.2...v3.0.3) (2021-11-28)
2
73
 
3
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "3.0.3",
3
+ "version": "3.0.7",
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.13",
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 src={imagePrettyUrl(relation.logo_url)} alt={relation.name} />
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 className={styles.logo} src={imagePrettyUrl(relation?.logo)} />
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 className={styles.logo} src={imagePrettyUrl(relation?.logo)} />
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 className={styles.image} src={imagePrettyUrl(item.image)} alt={item.title} />
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 alt={item.label} src={imagePrettyUrl(img)} />
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
  </>
@@ -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) {
@@ -18,7 +21,8 @@ export function getCanonicalUrl(page) {
18
21
  if (page.path === '/') {
19
22
  return process.env.GATSBY_SITE_URL;
20
23
  }
21
- return `${process.env.GATSBY_SITE_URL}${page.path}`;
24
+
25
+ return `${process.env.GATSBY_SITE_URL}${page.path.replace(/^\//, '')}`;
22
26
  }
23
27
  export function getRobotOptions(options) {
24
28
  const array = [];
@@ -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 section={section} menu={menu} options={options} gtmClass="main-menu-gtm" />
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;