gatsby-matrix-theme 7.1.26 → 7.1.29
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 +58 -0
- package/package.json +2 -2
- 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 +60 -0
- package/src/components/molecules/cookie-modal/category/index.js +54 -0
- package/src/components/molecules/cookie-modal/cookie-modal.module.scss +140 -0
- package/src/components/molecules/cookie-modal/index.js +111 -0
- package/src/components/molecules/newsletter/index.js +4 -4
- 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 +88 -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 +81 -0
- package/src/gatsby-core-theme/hooks/modal/modalContext.js +30 -0
- package/src/gatsby-core-theme/styles/utils/variables/_main.scss +2 -0
- package/src/helpers/strings.js +16 -0
- package/src/helpers/strings.test.js +19 -0
- package/storybook/public/{40.a27a9692.iframe.bundle.js → 40.2004a13e.iframe.bundle.js} +3 -3
- package/storybook/public/{40.a27a9692.iframe.bundle.js.LICENSE.txt → 40.2004a13e.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{40.a27a9692.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.ecf205c7.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/409.b960bde4.iframe.bundle.js +0 -1
- package/storybook/public/main.c0c69fa0.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
## [7.1.29](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.28...v7.1.29) (2022-06-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* cookie-consent ([9b3f6ed](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9b3f6edf772528d3dc97fcfbd4f29ce7a09f89d9))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'tm-2622' into 'master' ([f4d11fd](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f4d11fd63c4731132ceae5d6498da0fc4fd7d307))
|
|
10
|
+
|
|
11
|
+
## [7.1.28](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.27...v7.1.28) (2022-06-24)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Config
|
|
15
|
+
|
|
16
|
+
* update gatsby theme ([a9d044d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a9d044d2e959e09a2987f63ed6146402975b6184))
|
|
17
|
+
|
|
18
|
+
## [7.1.27](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.26...v7.1.27) (2022-06-23)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* add and YEAR ([4bd0df6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4bd0df6376e7f856198d7085d47ce9c341114273))
|
|
24
|
+
* add class for module_intro ([1113419](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/11134193de0fb336a18f386f21b874c8f5b2ff4f))
|
|
25
|
+
* add placeholders for meta_title ([b3f2bb9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3f2bb92e71e1d8c8fc310e30a24e8de133323e2))
|
|
26
|
+
* cleanup code ([076c24d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/076c24d29ec484b780efcdfe8c660adf8ca0844d))
|
|
27
|
+
* cleanup code ([2872800](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/287280085f7e4872963b6485e0755ba1ab603a8b))
|
|
28
|
+
* cookie consent ([344d84c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/344d84ceed9247a082f20cfe3ef83bf4c9b7eac2))
|
|
29
|
+
* fix conflicts ([44dd1f0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/44dd1f0e38013ab9daacc847da27111e8cc816ef))
|
|
30
|
+
* fix conflicts ([a0ca5b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a0ca5b5e060d0240829e5efb81e5ab34001e3ab3))
|
|
31
|
+
* fix error ([2ef5d6e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2ef5d6ee7bb8bb0f2da3e512d3fbbe0e075eeda6))
|
|
32
|
+
* fix name ([10027de](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/10027de2e45f92874e705c8f1c249b9783d8abb1))
|
|
33
|
+
* fix the logic when page is not operator ([3d14661](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3d14661154f12dfaabf8e2283a086d332a4b34d2))
|
|
34
|
+
* remove the anchor from matrix ([62913ee](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/62913ee850ae71b0cbcd2e8786e42aa6df2d742f))
|
|
35
|
+
* translatable ([8df7f41](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8df7f41d1db40a368262bb3eafcf091151a31b9d))
|
|
36
|
+
* updated to latest core version ([e017a8a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e017a8ad027551c128d36016ccc73ae0b883c69b))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Code Refactoring
|
|
40
|
+
|
|
41
|
+
* add page template type for newsletter pages ([c6f28f1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6f28f19cbf9b5cc1e29a83bdaf2ebf2fae338bd))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Config
|
|
45
|
+
|
|
46
|
+
* update theme ([347f7a2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/347f7a28485c63407cb32c75824e36658bdfa8f1))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
* Merge branch 'tm-2913-anchor' into 'master' ([2e18828](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e18828367d8654758278a499b77c043090342d9))
|
|
50
|
+
* Merge branch 'tm-2871-cards-v22' into 'master' ([693f157](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/693f15726ee23e4af37a1c9dd04d7f07733e6cfa))
|
|
51
|
+
* Update package.json ([7241fc8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7241fc8b691aee0d0d86bee275a859a7d0819278))
|
|
52
|
+
* Update package.json ([cc168f7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cc168f7fc86f3dd98db21a2f66c766cf30aeec82))
|
|
53
|
+
* Merge branch 'revert-347f7a28' into 'master' ([cd35c25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cd35c25c39e2da2d3dc0c1e6fae6cc90e8d8ddd1))
|
|
54
|
+
* Revert "config: update theme" ([4d052a6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4d052a6907b3c642b12dfcca7d2ac4ee4c37d0c7))
|
|
55
|
+
* Merge branch 'tm-2622-cookie' into 'master' ([b174aae](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b174aae77f4cc5ba0e537caf40ee42f35ce2606c))
|
|
56
|
+
* Merge branch 'tm-2926-meta-title' into 'master' ([188786f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/188786f0ddfcec571e840a9db00a5fd543386cbb))
|
|
57
|
+
* Merge branch 'tm-2918-align-sign-up-form' into 'master' ([bdbb723](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bdbb7239c04f314a65c87fadff2a7057cfca186a))
|
|
58
|
+
|
|
1
59
|
## [7.1.26](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.25...v7.1.26) (2022-06-20)
|
|
2
60
|
|
|
3
61
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.29",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -29,7 +29,7 @@
|
|
|
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.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.13.1",
|
|
@@ -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,60 @@
|
|
|
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
|
+
color: #39394F;
|
|
51
|
+
|
|
52
|
+
@include min(tablet){
|
|
53
|
+
color:#150E06;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.showFullCategory {
|
|
59
|
+
height: auto;
|
|
60
|
+
}
|
|
@@ -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,140 @@
|
|
|
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: 184px;
|
|
15
|
+
height: 29px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
> button {
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 2px;
|
|
21
|
+
top: 2px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.modalTextHeader {
|
|
26
|
+
margin-top: 18px;
|
|
27
|
+
margin-bottom: 16px;
|
|
28
|
+
|
|
29
|
+
h4 {
|
|
30
|
+
margin: 0px;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
margin-bottom: 8px;
|
|
35
|
+
color: #150E06;
|
|
36
|
+
}
|
|
37
|
+
p {
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
line-height: 19px;
|
|
41
|
+
color: #150E06;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.modalButtons {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
|
|
49
|
+
button {
|
|
50
|
+
margin-bottom: 13px;
|
|
51
|
+
height: 40px;
|
|
52
|
+
|
|
53
|
+
&:last-child {
|
|
54
|
+
background-color: white;
|
|
55
|
+
border: 1px solid black;
|
|
56
|
+
color: black;
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
background: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mainBox {
|
|
66
|
+
padding-top: 3px;
|
|
67
|
+
|
|
68
|
+
.mainTitle {
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
line-height: 24px;
|
|
72
|
+
margin-bottom: 8px;
|
|
73
|
+
color: #150E06;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.lastButton {
|
|
77
|
+
padding-top: 6px;
|
|
78
|
+
padding-bottom: 3.2rem;
|
|
79
|
+
> button {
|
|
80
|
+
height: 40px;
|
|
81
|
+
width: 100%;
|
|
82
|
+
margin-bottom: 0px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include min(tablet) {
|
|
87
|
+
border-radius: 16px;
|
|
88
|
+
padding: 34px 32px;
|
|
89
|
+
overflow-y: hidden;
|
|
90
|
+
.modalCookieHeader {
|
|
91
|
+
justify-content: center;
|
|
92
|
+
padding-bottom: 27px;
|
|
93
|
+
border: none;
|
|
94
|
+
> img {
|
|
95
|
+
width: 159px;
|
|
96
|
+
height: 25px;
|
|
97
|
+
}
|
|
98
|
+
> button {
|
|
99
|
+
right: -11px;
|
|
100
|
+
top: -16px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
.modalTextHeader {
|
|
104
|
+
margin-top: 0px;
|
|
105
|
+
margin-bottom: 0px;
|
|
106
|
+
color: #150e06;
|
|
107
|
+
h4 {
|
|
108
|
+
font-size: 18px;
|
|
109
|
+
line-height: 26px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.modalButtons {
|
|
113
|
+
flex-direction: row;
|
|
114
|
+
padding: 16px 0px;
|
|
115
|
+
|
|
116
|
+
button {
|
|
117
|
+
margin-bottom: 0px;
|
|
118
|
+
&:last-child {
|
|
119
|
+
margin-left: 10px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.mainBox {
|
|
124
|
+
padding-top: 8px;
|
|
125
|
+
color: #150e06;
|
|
126
|
+
.mainTitle {
|
|
127
|
+
margin: 0px;
|
|
128
|
+
font-size: 18px;
|
|
129
|
+
line-height: 26px;
|
|
130
|
+
margin-bottom: 8px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.lastButton {
|
|
134
|
+
padding-bottom: 0rem;
|
|
135
|
+
> button {
|
|
136
|
+
width: auto;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -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}
|
|
@@ -41,7 +41,7 @@ const Modules = ({ module, page, pageContext }) => {
|
|
|
41
41
|
return loadable(() => import('gatsby-core-theme/src/components/organisms/accordion'));
|
|
42
42
|
case 'anchor':
|
|
43
43
|
if (items && items.length > 0) {
|
|
44
|
-
return loadable(() => import('
|
|
44
|
+
return loadable(() => import('gatsby-core-theme/src/components/organisms/anchor'));
|
|
45
45
|
}
|
|
46
46
|
return null;
|
|
47
47
|
case 'carousel':
|
|
@@ -123,7 +123,10 @@ const Modules = ({ module, page, pageContext }) => {
|
|
|
123
123
|
{module.name !== 'top_list' && <ModuleTitle module={module} />}
|
|
124
124
|
{module.name !== 'top_list' && module.module_introduction && (
|
|
125
125
|
// eslint-disable-next-line react/no-danger
|
|
126
|
-
<div
|
|
126
|
+
<div
|
|
127
|
+
className={styles.module_introduction}
|
|
128
|
+
dangerouslySetInnerHTML={{ __html: module?.module_introduction }}
|
|
129
|
+
/>
|
|
127
130
|
)}
|
|
128
131
|
<ModuleComponent module={module} page={page} pageContext={pageContext} {...extraProps} />
|
|
129
132
|
</div>
|