gatsby-matrix-theme 7.1.24 → 7.1.27
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 +61 -0
- package/jest.config.js +1 -1
- package/package.json +3 -3
- package/src/components/atoms/cards/popup-card/index.js +8 -4
- package/src/components/atoms/newsletter/form/index.js +3 -0
- package/src/components/atoms/newsletter/toggle-button/index.js +25 -19
- package/src/components/atoms/toggle-button/index.js +29 -0
- package/src/components/atoms/toggle-button/toggle-button.module.scss +56 -0
- package/src/components/molecules/cookie-modal/category/category.module.scss +55 -0
- package/src/components/molecules/cookie-modal/category/index.js +54 -0
- package/src/components/molecules/cookie-modal/cookie-modal.module.scss +135 -0
- package/src/components/molecules/cookie-modal/index.js +111 -0
- package/src/components/molecules/newsletter/index.js +4 -4
- package/src/components/molecules/toplist/row/variant-one.js +1 -1
- package/src/gatsby-core-theme/components/molecules/module/index.js +5 -2
- package/src/gatsby-core-theme/components/molecules/module/module.module.scss +4 -0
- package/src/gatsby-core-theme/components/organisms/cookie-consent/cookie-consent.module.scss +86 -0
- package/src/gatsby-core-theme/components/organisms/cookie-consent/index.js +89 -0
- package/src/gatsby-core-theme/components/organisms/head/index.js +8 -4
- package/src/gatsby-core-theme/components/pages/body/index.js +19 -11
- package/src/gatsby-core-theme/hooks/modal/modal-content.js +106 -0
- package/src/gatsby-core-theme/hooks/modal/modal.module.scss +80 -0
- package/src/gatsby-core-theme/hooks/modal/modalContext.js +30 -0
- package/src/helpers/strings.js +16 -0
- package/src/helpers/strings.test.js +19 -0
- package/storybook/public/40.2004a13e.iframe.bundle.js +7 -0
- package/storybook/public/{40.70a65204.iframe.bundle.js.LICENSE.txt → 40.2004a13e.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{40.70a65204.iframe.bundle.js.map → 40.2004a13e.iframe.bundle.js.map} +1 -1
- package/storybook/public/409.82f094c1.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.8c95231a.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.7fb17c77.iframe.bundle.js → runtime~main.4d1aa7b7.iframe.bundle.js} +1 -1
- package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +0 -42
- package/src/gatsby-core-theme/components/organisms/anchor/index.js +0 -72
- package/storybook/public/40.70a65204.iframe.bundle.js +0 -7
- package/storybook/public/409.ceaa0cbe.iframe.bundle.js +0 -1
- package/storybook/public/main.b2beaee1.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## [7.1.27](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.26...v7.1.27) (2022-06-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add and YEAR ([4bd0df6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4bd0df6376e7f856198d7085d47ce9c341114273))
|
|
7
|
+
* add class for module_intro ([1113419](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/11134193de0fb336a18f386f21b874c8f5b2ff4f))
|
|
8
|
+
* add placeholders for meta_title ([b3f2bb9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3f2bb92e71e1d8c8fc310e30a24e8de133323e2))
|
|
9
|
+
* cleanup code ([076c24d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/076c24d29ec484b780efcdfe8c660adf8ca0844d))
|
|
10
|
+
* cleanup code ([2872800](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/287280085f7e4872963b6485e0755ba1ab603a8b))
|
|
11
|
+
* cookie consent ([344d84c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/344d84ceed9247a082f20cfe3ef83bf4c9b7eac2))
|
|
12
|
+
* fix conflicts ([44dd1f0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/44dd1f0e38013ab9daacc847da27111e8cc816ef))
|
|
13
|
+
* fix conflicts ([a0ca5b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a0ca5b5e060d0240829e5efb81e5ab34001e3ab3))
|
|
14
|
+
* fix error ([2ef5d6e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2ef5d6ee7bb8bb0f2da3e512d3fbbe0e075eeda6))
|
|
15
|
+
* fix name ([10027de](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/10027de2e45f92874e705c8f1c249b9783d8abb1))
|
|
16
|
+
* fix the logic when page is not operator ([3d14661](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3d14661154f12dfaabf8e2283a086d332a4b34d2))
|
|
17
|
+
* remove the anchor from matrix ([62913ee](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/62913ee850ae71b0cbcd2e8786e42aa6df2d742f))
|
|
18
|
+
* translatable ([8df7f41](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8df7f41d1db40a368262bb3eafcf091151a31b9d))
|
|
19
|
+
* updated to latest core version ([e017a8a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e017a8ad027551c128d36016ccc73ae0b883c69b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Code Refactoring
|
|
23
|
+
|
|
24
|
+
* add page template type for newsletter pages ([c6f28f1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6f28f19cbf9b5cc1e29a83bdaf2ebf2fae338bd))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Config
|
|
28
|
+
|
|
29
|
+
* update theme ([347f7a2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/347f7a28485c63407cb32c75824e36658bdfa8f1))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
* Merge branch 'tm-2913-anchor' into 'master' ([2e18828](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e18828367d8654758278a499b77c043090342d9))
|
|
33
|
+
* Merge branch 'tm-2871-cards-v22' into 'master' ([693f157](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/693f15726ee23e4af37a1c9dd04d7f07733e6cfa))
|
|
34
|
+
* Update package.json ([7241fc8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7241fc8b691aee0d0d86bee275a859a7d0819278))
|
|
35
|
+
* Update package.json ([cc168f7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cc168f7fc86f3dd98db21a2f66c766cf30aeec82))
|
|
36
|
+
* Merge branch 'revert-347f7a28' into 'master' ([cd35c25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cd35c25c39e2da2d3dc0c1e6fae6cc90e8d8ddd1))
|
|
37
|
+
* Revert "config: update theme" ([4d052a6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4d052a6907b3c642b12dfcca7d2ac4ee4c37d0c7))
|
|
38
|
+
* Merge branch 'tm-2622-cookie' into 'master' ([b174aae](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b174aae77f4cc5ba0e537caf40ee42f35ce2606c))
|
|
39
|
+
* Merge branch 'tm-2926-meta-title' into 'master' ([188786f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/188786f0ddfcec571e840a9db00a5fd543386cbb))
|
|
40
|
+
* Merge branch 'tm-2918-align-sign-up-form' into 'master' ([bdbb723](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bdbb7239c04f314a65c87fadff2a7057cfca186a))
|
|
41
|
+
|
|
42
|
+
## [7.1.26](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.25...v7.1.26) (2022-06-20)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* added standardized logo in popup ([59e2807](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/59e280772b02d04872b38ce13bc743041f2c9f78))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([672357a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/672357a370ae87c1a42cbb44d4e2db0de8f02a39))
|
|
51
|
+
|
|
52
|
+
## [7.1.25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.24...v7.1.25) (2022-06-20)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* updated to latest gatsby version and latest core version ([b60944a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b60944aa3ea20bfbf9539c25f0bc195cb3b3e802))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([cbb80af](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cbb80af9c69c39a9513706961073cd0bc53dc62d))
|
|
61
|
+
|
|
1
62
|
## [7.1.24](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.23...v7.1.24) (2022-06-20)
|
|
2
63
|
|
|
3
64
|
|
package/jest.config.js
CHANGED
|
@@ -24,7 +24,7 @@ module.exports = {
|
|
|
24
24
|
'^gatsby-core-utils/(.*)$': `gatsby-core-utils/dist/$1`,
|
|
25
25
|
},
|
|
26
26
|
// testPathIgnorePatterns: [`node_modules`, `\\.cache`, `<rootDir>.*/public`],
|
|
27
|
-
transformIgnorePatterns: [`node_modules/(?!gatsby-core-theme)`],
|
|
27
|
+
transformIgnorePatterns: [`node_modules/(?!gatsby-core-theme|gatsby-script)`],
|
|
28
28
|
globals: {
|
|
29
29
|
__PATH_PREFIX__: ``,
|
|
30
30
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.27",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"url": "https://storybook-matrix.gigmedia.com/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"gatsby": "^4.
|
|
26
|
+
"gatsby": "^4.15.0",
|
|
27
27
|
"gatsby-plugin-sharp": "^4.10.2",
|
|
28
28
|
"gatsby-transformer-sharp": "^4.10.0",
|
|
29
29
|
"react": "^17.0.2",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"react-dom": "^17.0.2",
|
|
32
|
-
"gatsby-core-theme": "^8.0.
|
|
32
|
+
"gatsby-core-theme": "^8.0.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.13.1",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
@@ -20,17 +21,17 @@ const PopupCard = ({
|
|
|
20
21
|
}) => {
|
|
21
22
|
const { translations } = useContext(Context) || {};
|
|
22
23
|
|
|
23
|
-
const {
|
|
24
|
+
const { name } = item;
|
|
24
25
|
const oneLiner = item?.one_liners?.main?.one_liner;
|
|
25
26
|
const tnc = item?.extra_fields?.terms_and_conditions_text_enabled;
|
|
26
|
-
const
|
|
27
|
+
const imageObject = item?.standardised_logo_url_object || item?.logo_url_object;
|
|
27
28
|
|
|
28
29
|
return (
|
|
29
30
|
<div className={styles.popupCard}>
|
|
30
31
|
<div className={styles.imgContainer}>
|
|
31
32
|
<LazyImage
|
|
32
|
-
src={imagePrettyUrl(
|
|
33
|
-
alt={getAltText(
|
|
33
|
+
src={imagePrettyUrl(imageObject?.filename || item?.logo_url, 98, 98)}
|
|
34
|
+
alt={getAltText(imageObject, oneLiner)}
|
|
34
35
|
width={98}
|
|
35
36
|
height={98}
|
|
36
37
|
/>
|
|
@@ -70,6 +71,9 @@ PopupCard.propTypes = {
|
|
|
70
71
|
links: PropTypes.shape({
|
|
71
72
|
main: PropTypes.string,
|
|
72
73
|
}),
|
|
74
|
+
standardised_logo_url_object: PropTypes.shape({
|
|
75
|
+
alt: PropTypes.string,
|
|
76
|
+
}),
|
|
73
77
|
review_link: PropTypes.string,
|
|
74
78
|
rating: PropTypes.string,
|
|
75
79
|
logo_url_object: PropTypes.shape({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
1
2
|
/* eslint-disable no-unused-expressions */
|
|
2
3
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
4
|
import React, { useRef, useState, useEffect, useContext } from 'react';
|
|
@@ -25,6 +26,7 @@ const NewsletterForm = ({
|
|
|
25
26
|
mainText: 'You get more than 405 free spins',
|
|
26
27
|
subscribeText: 'Subscribe to our newsletter and get more than 405 free spins instantly.',
|
|
27
28
|
},
|
|
29
|
+
ppcPage = false,
|
|
28
30
|
}) => {
|
|
29
31
|
// eslint-disable-next-line react/destructuring-assignment
|
|
30
32
|
|
|
@@ -200,6 +202,7 @@ NewsletterForm.propTypes = {
|
|
|
200
202
|
redirectUrl: PropTypes.string,
|
|
201
203
|
privacyText: PropTypes.string,
|
|
202
204
|
setLogading: PropTypes.bool,
|
|
205
|
+
ppcPage: PropTypes.bool,
|
|
203
206
|
};
|
|
204
207
|
|
|
205
208
|
export default NewsletterForm;
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
+
/* eslint-disable react/button-has-type */
|
|
2
|
+
/* eslint-disable arrow-body-style */
|
|
3
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
|
|
4
|
-
import styles from './newsletter-button.module.scss'
|
|
5
|
-
const NewsletterButton =(
|
|
6
|
-
{
|
|
7
|
-
text="Bonus alert",
|
|
8
|
-
toggleNewsLetter,
|
|
9
|
-
active=true
|
|
10
|
-
}
|
|
11
|
-
)=>{
|
|
12
|
-
return(
|
|
13
|
-
<button onClick={toggleNewsLetter} className={!active ? `${styles.button}` :`${styles.button} ${styles.active}`}>
|
|
14
|
-
{text}
|
|
15
|
-
</button>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
7
|
+
import styles from './newsletter-button.module.scss';
|
|
18
8
|
|
|
19
|
-
NewsletterButton
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const NewsletterButton = ({
|
|
10
|
+
text = 'Bonus alert',
|
|
11
|
+
toggleNewsLetter,
|
|
12
|
+
active = true,
|
|
13
|
+
ppcPage = false,
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<button
|
|
17
|
+
onClick={toggleNewsLetter}
|
|
18
|
+
className={`${styles.button} ${active && styles.active} ${ppcPage && styles.ppcButton}`}
|
|
19
|
+
>
|
|
20
|
+
{text}
|
|
21
|
+
</button>
|
|
22
|
+
);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
NewsletterButton.propTypes = {
|
|
26
|
+
text: PropTypes.string,
|
|
27
|
+
toggleNewsLetter: PropTypes.bool,
|
|
28
|
+
active: PropTypes.bool,
|
|
29
|
+
ppcPage: PropTypes.bool,
|
|
30
|
+
};
|
|
25
31
|
|
|
26
|
-
export default NewsletterButton;
|
|
32
|
+
export default NewsletterButton;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styles from './toggle-button.module.scss';
|
|
6
|
+
|
|
7
|
+
const ToggleButton = ({ icon1, icons2, state, setStateFunc }) => (
|
|
8
|
+
<div className={styles.wrgtoggle} onClick={() => setStateFunc(!state)}>
|
|
9
|
+
<div className={`${styles.wrgtogglecontainer} ${state && styles.wrgtogglecontainerOn}`}>
|
|
10
|
+
<div className={styles.wrgtogglecheck}>
|
|
11
|
+
<span>{icon1}</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div className={styles.wrgtoggleuncheck}>
|
|
14
|
+
<span>{icons2}</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div className={`${styles.wrgtogglecircle} ${state && styles.wrgtogglecircleAgreed}`} />
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
ToggleButton.propTypes = {
|
|
23
|
+
icon1: PropTypes.elementType,
|
|
24
|
+
icons2: PropTypes.elementType,
|
|
25
|
+
state: PropTypes.bool,
|
|
26
|
+
setStateFunc: PropTypes.func,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default ToggleButton;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.wrgtoggle {
|
|
2
|
+
touch-action: pan-x;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
position: relative;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
background-color: transparent;
|
|
7
|
+
border: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
-webkit-touch-callout: none;
|
|
10
|
+
-webkit-user-select: none;
|
|
11
|
+
-ms-user-select: none;
|
|
12
|
+
user-select: none;
|
|
13
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
14
|
+
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.wrgtoggleuncheck span,
|
|
18
|
+
.wrgtogglecheck span {
|
|
19
|
+
align-items: center;
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 10px;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 10px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.wrgtogglecontainer {
|
|
28
|
+
width: 50px;
|
|
29
|
+
height: 24px;
|
|
30
|
+
padding: 0;
|
|
31
|
+
border-radius: 30px;
|
|
32
|
+
background-color: #ced0dd;
|
|
33
|
+
transition: all 0.2s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.wrgtogglecontainerOn {
|
|
37
|
+
background-color: #5ce482;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wrgtogglecircle {
|
|
41
|
+
transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 1px;
|
|
44
|
+
left: 1px;
|
|
45
|
+
width: 22px;
|
|
46
|
+
height: 22px;
|
|
47
|
+
border-radius: 50%;
|
|
48
|
+
background-color: #fafafa;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
transition: all 0.25s ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.wrgtogglecircleAgreed {
|
|
54
|
+
right: 1px;
|
|
55
|
+
left: auto;
|
|
56
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.categoryBox {
|
|
2
|
+
height: 59px;
|
|
3
|
+
overflow-y: hidden;
|
|
4
|
+
background-color: #f3f2f2;
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
margin-bottom: 8px;
|
|
7
|
+
|
|
8
|
+
.categoryHeader {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: 16px;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
line-height: 24px;
|
|
16
|
+
color: #150e06;
|
|
17
|
+
|
|
18
|
+
> p {
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
line-height: 22px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.boxTitle {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
> h3 {
|
|
31
|
+
margin: 0px;
|
|
32
|
+
padding-left: 10px;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
line-height: 24px;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.categoryText {
|
|
44
|
+
background-color: white;
|
|
45
|
+
margin: 2px;
|
|
46
|
+
padding: 16px;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
line-height: 19px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.showFullCategory {
|
|
54
|
+
height: auto;
|
|
55
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { AiOutlinePlus, AiOutlineMinus } from 'react-icons/ai';
|
|
4
|
+
import ToggleButton from '../../../atoms/toggle-button/index';
|
|
5
|
+
import { translate } from '~helpers/getters';
|
|
6
|
+
import styles from './category.module.scss';
|
|
7
|
+
|
|
8
|
+
const CategoryContainer = ({
|
|
9
|
+
obj,
|
|
10
|
+
index,
|
|
11
|
+
currentState,
|
|
12
|
+
updateState,
|
|
13
|
+
currentSection,
|
|
14
|
+
setCurrentSection,
|
|
15
|
+
translations,
|
|
16
|
+
}) => (
|
|
17
|
+
<div>
|
|
18
|
+
<div
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
className={`${styles.categoryBox} ${currentSection === index && styles.showFullCategory}`}
|
|
21
|
+
onClick={() => setCurrentSection(index)}
|
|
22
|
+
>
|
|
23
|
+
<div className={styles.categoryHeader}>
|
|
24
|
+
<div className={styles.boxTitle}>
|
|
25
|
+
{currentSection === index ? <AiOutlineMinus /> : <AiOutlinePlus />}
|
|
26
|
+
<h3>{translate(translations, obj?.translateKey, obj?.altTranslation)}</h3>
|
|
27
|
+
</div>
|
|
28
|
+
{obj?.button ? (
|
|
29
|
+
<ToggleButton state={currentState} setStateFunc={updateState} />
|
|
30
|
+
) : (
|
|
31
|
+
<p>{translate(translations, 'cookie_container_always_text', 'Alwasy Enabled')}</p>
|
|
32
|
+
)}
|
|
33
|
+
</div>
|
|
34
|
+
<div className={styles.categoryText}>{translate(translations, obj?.textKey)}</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
CategoryContainer.propTypes = {
|
|
40
|
+
obj: PropTypes.shape({
|
|
41
|
+
translateKey: PropTypes.string,
|
|
42
|
+
altTranslation: PropTypes.string,
|
|
43
|
+
textKey: PropTypes.string,
|
|
44
|
+
button: PropTypes.bool,
|
|
45
|
+
}),
|
|
46
|
+
index: PropTypes.number,
|
|
47
|
+
currentState: PropTypes.bool,
|
|
48
|
+
updateState: PropTypes.func,
|
|
49
|
+
currentSection: PropTypes.number,
|
|
50
|
+
setCurrentSection: PropTypes.func,
|
|
51
|
+
translations: PropTypes.shape({}),
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default CategoryContainer;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.modalContent {
|
|
2
|
+
background-color: white;
|
|
3
|
+
padding: 20px 16px;
|
|
4
|
+
height: 100%;
|
|
5
|
+
overflow-y: scroll;
|
|
6
|
+
|
|
7
|
+
.modalCookieHeader {
|
|
8
|
+
display: flex;
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-bottom: 18px;
|
|
11
|
+
border-bottom: 1px solid #ced0dd;
|
|
12
|
+
|
|
13
|
+
> img {
|
|
14
|
+
width: 150px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
> button {
|
|
18
|
+
position: absolute;
|
|
19
|
+
right: 2px;
|
|
20
|
+
top: 2px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.modalTextHeader {
|
|
25
|
+
margin-top: 18px;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
|
|
28
|
+
h4 {
|
|
29
|
+
margin: 0px;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
line-height: 24px;
|
|
33
|
+
margin-bottom: 8px;
|
|
34
|
+
}
|
|
35
|
+
p {
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 19px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.modalButtons {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
|
|
46
|
+
button {
|
|
47
|
+
margin-bottom: 13px;
|
|
48
|
+
height: 40px;
|
|
49
|
+
|
|
50
|
+
&:last-child {
|
|
51
|
+
background-color: white;
|
|
52
|
+
border: 1px solid black;
|
|
53
|
+
color: black;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mainBox {
|
|
63
|
+
padding-top: 3px;
|
|
64
|
+
|
|
65
|
+
.mainTitle {
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
line-height: 24px;
|
|
69
|
+
margin-bottom: 8px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.lastButton {
|
|
73
|
+
padding-top: 6px;
|
|
74
|
+
padding-bottom: 3.2rem;
|
|
75
|
+
> button {
|
|
76
|
+
height: 40px;
|
|
77
|
+
width: 100%;
|
|
78
|
+
margin-bottom: 0px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@include min(tablet) {
|
|
83
|
+
border-radius: 16px;
|
|
84
|
+
padding: 34px 32px;
|
|
85
|
+
overflow-y: hidden;
|
|
86
|
+
.modalCookieHeader {
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding-bottom: 27px;
|
|
89
|
+
border: none;
|
|
90
|
+
> img {
|
|
91
|
+
width: 128px;
|
|
92
|
+
}
|
|
93
|
+
> button {
|
|
94
|
+
right: -11px;
|
|
95
|
+
top: -16px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
.modalTextHeader {
|
|
99
|
+
margin-top: 0px;
|
|
100
|
+
margin-bottom: 0px;
|
|
101
|
+
color: #150e06;
|
|
102
|
+
h4 {
|
|
103
|
+
font-size: 18px;
|
|
104
|
+
line-height: 26px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.modalButtons {
|
|
108
|
+
flex-direction: row;
|
|
109
|
+
padding: 16px 0px;
|
|
110
|
+
|
|
111
|
+
button {
|
|
112
|
+
margin-bottom: 0px;
|
|
113
|
+
&:last-child {
|
|
114
|
+
margin-left: 10px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
.mainBox {
|
|
119
|
+
padding-top: 8px;
|
|
120
|
+
color: #150e06;
|
|
121
|
+
.mainTitle {
|
|
122
|
+
margin: 0px;
|
|
123
|
+
font-size: 18px;
|
|
124
|
+
line-height: 26px;
|
|
125
|
+
margin-bottom: 8px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.lastButton {
|
|
129
|
+
padding-bottom: 0rem;
|
|
130
|
+
> button {
|
|
131
|
+
width: auto;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
5
|
+
import { MdClose } from 'react-icons/md';
|
|
6
|
+
import { translate } from '~helpers/getters';
|
|
7
|
+
import CategoryContainer from './category/index';
|
|
8
|
+
import Button from '~atoms/button';
|
|
9
|
+
import LazyImage from '~hooks/lazy-image';
|
|
10
|
+
import styles from './cookie-modal.module.scss';
|
|
11
|
+
|
|
12
|
+
const CookieModal = ({ acceptCookies, closeModal, logo = '../../../../../images/logo.svg' }) => {
|
|
13
|
+
const [categorySection, setCategorySection] = useState(0);
|
|
14
|
+
const [anlyticsButton, setAnlyticsButton] = useState(false);
|
|
15
|
+
const [marketing, setMarketingButton] = useState(false);
|
|
16
|
+
const { translations } = useContext(Context) || {};
|
|
17
|
+
|
|
18
|
+
const CategoryObj = [
|
|
19
|
+
{
|
|
20
|
+
translateKey: 'neccesary_cookie_title',
|
|
21
|
+
button: false,
|
|
22
|
+
altTranslation: 'Neccesary',
|
|
23
|
+
textKey: 'neccesary_cookie_text',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
translateKey: 'analytical_cookie_title',
|
|
27
|
+
button: true,
|
|
28
|
+
altTranslation: 'Analytical And Stadistical',
|
|
29
|
+
textKey: 'analytical_cookie_text',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
translateKey: 'marketing_cookie_title',
|
|
33
|
+
button: true,
|
|
34
|
+
altTranslation: 'Marketing',
|
|
35
|
+
textKey: 'marketing_cookie_text',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
return (
|
|
39
|
+
<div className={styles.modalContent}>
|
|
40
|
+
<div className={styles.modalCookieHeader}>
|
|
41
|
+
<LazyImage alt="Irishluck logo" width={150} height={21} src={logo} />
|
|
42
|
+
<button type="button" onClick={() => closeModal()}>
|
|
43
|
+
<MdClose />
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
<div className={styles.modalTextHeader}>
|
|
47
|
+
<h4>{translate(translations, 'privacy_preference_title', 'Privacy Preference Center')}</h4>
|
|
48
|
+
<p>{translate(translations, 'privacy_preference_text')}</p>
|
|
49
|
+
</div>
|
|
50
|
+
<div className={styles.modalButtons}>
|
|
51
|
+
<Button
|
|
52
|
+
onClick={() => acceptCookies()}
|
|
53
|
+
btnText={translate(translations, 'cookie_accept_all_button', 'Accept All Cookies')}
|
|
54
|
+
isInternalLink={false}
|
|
55
|
+
isButton
|
|
56
|
+
gtmClass="cookie-consent-gtm btn-cta"
|
|
57
|
+
/>
|
|
58
|
+
<Button
|
|
59
|
+
onClick={() => acceptCookies()}
|
|
60
|
+
btnText={translate(
|
|
61
|
+
translations,
|
|
62
|
+
'cookie_reject_nonnecessary_button',
|
|
63
|
+
'I reject Non-Necessary'
|
|
64
|
+
)}
|
|
65
|
+
isInternalLink={false}
|
|
66
|
+
isButton
|
|
67
|
+
gtmClass="cookie-consent-gtm btn-cta"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
<div className={styles.mainBox}>
|
|
71
|
+
<h3 className={styles.mainTitle}>
|
|
72
|
+
{translate(translations, 'menage_consent_preference', 'Manage Consent Preferences')}
|
|
73
|
+
</h3>
|
|
74
|
+
|
|
75
|
+
{CategoryObj.map((elm, index) => {
|
|
76
|
+
const state = index === 1 ? anlyticsButton : marketing;
|
|
77
|
+
const updateState = index === 1 ? setAnlyticsButton : setMarketingButton;
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<CategoryContainer
|
|
81
|
+
obj={elm}
|
|
82
|
+
index={index}
|
|
83
|
+
currentState={state}
|
|
84
|
+
updateState={updateState}
|
|
85
|
+
setCurrentSection={setCategorySection}
|
|
86
|
+
currentSection={categorySection}
|
|
87
|
+
translations={translations}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
})}
|
|
91
|
+
</div>
|
|
92
|
+
<div className={styles.lastButton}>
|
|
93
|
+
<Button
|
|
94
|
+
onClick={() => acceptCookies()}
|
|
95
|
+
btnText={translate(translations, 'cookie_confirm_button', 'Confirm my choices')}
|
|
96
|
+
isInternalLink={false}
|
|
97
|
+
isButton
|
|
98
|
+
gtmClass="cookie-consent-gtm btn-cta"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
CookieModal.propTypes = {
|
|
106
|
+
acceptCookies: PropTypes.func,
|
|
107
|
+
closeModal: PropTypes.func,
|
|
108
|
+
logo: PropTypes.string,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default CookieModal;
|
|
@@ -19,6 +19,7 @@ const Newsletter = ({ page, openBtnText = 'Unlock Exclusive Bonuses', footer = f
|
|
|
19
19
|
: `${getUrl(page?.path)}/?subscribed=true`;
|
|
20
20
|
|
|
21
21
|
const newsletterFloatingContainer = useRef(React.createRef());
|
|
22
|
+
const ppcPage = page.template === 'ppc';
|
|
22
23
|
|
|
23
24
|
return (
|
|
24
25
|
<div
|
|
@@ -31,18 +32,17 @@ const Newsletter = ({ page, openBtnText = 'Unlock Exclusive Bonuses', footer = f
|
|
|
31
32
|
text={openBtnText}
|
|
32
33
|
toggleNewsLetter={() => setToggleNewsletter(!toggleNewsetter)}
|
|
33
34
|
gtmClass="newsletter-gtm btn-cta"
|
|
35
|
+
ppcPage={ppcPage}
|
|
34
36
|
/>
|
|
35
37
|
)}
|
|
36
38
|
<div
|
|
37
39
|
className={
|
|
38
40
|
!footer
|
|
39
|
-
? toggleNewsetter
|
|
40
|
-
? `${styles.form} ${styles.active}`
|
|
41
|
-
: styles.form
|
|
41
|
+
? `${styles.form} ${toggleNewsetter && styles.active} ${ppcPage && styles.ppcPageForm}`
|
|
42
42
|
: styles.newsletter
|
|
43
43
|
}
|
|
44
44
|
>
|
|
45
|
-
<Form redirectUrl={redirectUrl} />
|
|
45
|
+
<Form redirectUrl={redirectUrl} ppcPage={ppcPage} />
|
|
46
46
|
{!footer ? (
|
|
47
47
|
<MdClose className={styles.closeBtn} onClick={() => setToggleNewsletter(false)} />
|
|
48
48
|
) : null}
|