gatsby-matrix-theme 12.0.2 → 13.0.0
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 +22 -0
- package/package.json +1 -1
- package/src/components/atoms/cards/comparison-table/table/index.js +20 -19
- package/src/components/atoms/rating/index.js +4 -4
- package/src/components/atoms/rating/rating.test.js +1 -6
- package/src/components/molecules/header/variants/default/template-two/template-two.module.scss +148 -145
- package/src/components/molecules/header/variants/operator/template-five/index.js +42 -37
- package/src/components/molecules/header/variants/operator/template-five/template-five.module.scss +13 -2
- package/src/gatsby-core-theme/components/molecules/header/index.js +10 -8
- package/src/helpers/popup.test.js +32 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.314aafd1.iframe.bundle.js +1 -0
- package/storybook/public/main.df72707f.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# [13.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v12.0.2...v13.0.0) (2023-02-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add unit testting ([0139fd9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0139fd9385d19b4bb16942e6ccd67a9f8a9cf997))
|
|
7
|
+
* background for template two ([c2bc128](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c2bc12831b13f27defb77b83494aea234d957c48))
|
|
8
|
+
* header operator ([3ce7ea9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3ce7ea9366b93128d42b8cd691201e1f9b2b48f2))
|
|
9
|
+
* test ([2cc51ef](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2cc51ef00fd1b8cdb18a1bb8e5cea8e619039e46))
|
|
10
|
+
* validate payment images for comparison table ([83ac518](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/83ac518ab2de14fe14fd47b575001bff1656b603))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Code Refactoring
|
|
14
|
+
|
|
15
|
+
* add description from section.header.extra_fields to description ([d110b66](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d110b66ce8a860ac63500273331bacbdba55d576))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* Merge branch 'tm-3252-default-headers' into 'master' ([d2340be](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d2340bee8a67d99720dcf20e52d3dc9f3fa40084))
|
|
19
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([ad2f5ee](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ad2f5ee0a0b607a52ef31488194a7bfe2497a873))
|
|
20
|
+
* Merge branch 'master' into tm-3252-default-headers ([c6c399e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6c399e767300f5f9917163256777184c09a9760))
|
|
21
|
+
* Merge branch 'tm-3264-remove-messing' into 'master' ([ce63995](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ce6399504468d44ab7b8edce4c763baa81fd41ac))
|
|
22
|
+
|
|
1
23
|
## [12.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v12.0.1...v12.0.2) (2023-02-02)
|
|
2
24
|
|
|
3
25
|
|
package/package.json
CHANGED
|
@@ -83,9 +83,9 @@ export default function ComparisonTable({
|
|
|
83
83
|
case 'casino_name':
|
|
84
84
|
return (
|
|
85
85
|
<td key={key} className={styles.casinoName}>
|
|
86
|
-
{
|
|
86
|
+
{imageObject?.filename ? (
|
|
87
87
|
<LazyImg
|
|
88
|
-
src={imagePrettyUrl(imageObject?.filename
|
|
88
|
+
src={imagePrettyUrl(imageObject?.filename, 89, 89)}
|
|
89
89
|
height={89}
|
|
90
90
|
width={89}
|
|
91
91
|
alt={itemName}
|
|
@@ -145,23 +145,24 @@ export default function ComparisonTable({
|
|
|
145
145
|
<div key={key}>
|
|
146
146
|
{item?.relation?.bonus?.deposit_methods &&
|
|
147
147
|
// eslint-disable-next-line array-callback-return
|
|
148
|
-
item?.relation?.bonus?.deposit_methods?.slice(0, 5)?.map((deposit) =>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
148
|
+
item?.relation?.bonus?.deposit_methods?.slice(0, 5)?.map((deposit) => {
|
|
149
|
+
const logo =
|
|
150
|
+
deposit?.standardised_logo_filename_object?.filename ||
|
|
151
|
+
deposit?.standardised_logo_filename ||
|
|
152
|
+
deposit?.logo_filename;
|
|
153
|
+
if (!logo) return;
|
|
154
|
+
return (
|
|
155
|
+
<Link to={deposit?.path}>
|
|
156
|
+
<LazyImg
|
|
157
|
+
key={`${key}-${deposit.name}`}
|
|
158
|
+
src={imagePrettyUrl(logo, 72, 32)}
|
|
159
|
+
width={72}
|
|
160
|
+
height={32}
|
|
161
|
+
alt={deposit.name}
|
|
162
|
+
/>
|
|
163
|
+
</Link>
|
|
164
|
+
);
|
|
165
|
+
})}
|
|
165
166
|
</div>
|
|
166
167
|
</td>
|
|
167
168
|
);
|
|
@@ -3,8 +3,8 @@ import React, { useContext } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
5
5
|
import { translate, getObjectValue } from 'gatsby-core-theme/src/helpers/getters';
|
|
6
|
-
import { isMobileDevice } from 'gatsby-core-theme/src/helpers/device-detect';
|
|
7
6
|
import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
7
|
+
import { isMobileDevice } from '../../../helpers/mobile-detect';
|
|
8
8
|
import operatorRatings from '../../../constants/ratings-constant';
|
|
9
9
|
|
|
10
10
|
import styles from './ratings.module.scss';
|
|
@@ -34,11 +34,11 @@ export default function Ratings({ item, type, numOfStars = 5 }) {
|
|
|
34
34
|
const component = componentToUse ? componentToUse(numOfStars, value) : false;
|
|
35
35
|
|
|
36
36
|
if (component && value) {
|
|
37
|
-
valueDiplayed = component;
|
|
37
|
+
valueDiplayed = component || '-';
|
|
38
38
|
} else if (fieldValue.includes('volatility')) {
|
|
39
|
-
valueDiplayed = rangeText[getObjectValue(item, fieldValue)] || '
|
|
39
|
+
valueDiplayed = rangeText[getObjectValue(item, fieldValue)] || '-';
|
|
40
40
|
} else {
|
|
41
|
-
valueDiplayed = value || '
|
|
41
|
+
valueDiplayed = value || '-';
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (['coming_soon', 'inactive'].includes(item?.status)) {
|
|
@@ -38,7 +38,7 @@ describe('Rating component', () => {
|
|
|
38
38
|
const { container, getByText, getAllByText } = render(<Ratings item={page()} type="game" />);
|
|
39
39
|
expect(container.querySelectorAll('ul')).toHaveLength(1);
|
|
40
40
|
expect(container.querySelectorAll('li')).toHaveLength(5);
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
expect(getAllByText(3)).toHaveLength(2);
|
|
43
43
|
expect(getByText('Medium')).toBeTruthy();
|
|
44
44
|
});
|
|
@@ -48,11 +48,6 @@ describe('Rating component', () => {
|
|
|
48
48
|
expect(container.querySelectorAll('ul')).toHaveLength(0);
|
|
49
49
|
expect(container.querySelectorAll('li')).toHaveLength(0);
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
test('Rating no value in two column', () => {
|
|
53
|
-
const { getAllByText } = render(<Ratings item={page()} type="operator" />);
|
|
54
|
-
expect(getAllByText('TBA')).toHaveLength(2);
|
|
55
|
-
});
|
|
56
51
|
});
|
|
57
52
|
|
|
58
53
|
afterEach(() => {
|
package/src/components/molecules/header/variants/default/template-two/template-two.module.scss
CHANGED
|
@@ -1,181 +1,184 @@
|
|
|
1
1
|
.templateTwo {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
flex-direction: column-reverse;
|
|
6
|
+
padding: 0 1.6rem;
|
|
7
|
+
|
|
8
|
+
&::before,
|
|
9
|
+
&::after {
|
|
10
|
+
content: '';
|
|
11
|
+
display: block;
|
|
12
|
+
position: absolute;
|
|
13
|
+
z-index: -1;
|
|
14
|
+
left: -1px;
|
|
15
|
+
right: -1px;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&::before {
|
|
20
|
+
background: white;
|
|
21
|
+
height: calc(100% - 300px);
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
right: auto;
|
|
25
|
-
left: 0;
|
|
26
|
-
width: 60%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
}
|
|
23
|
+
@include min(tablet) {
|
|
24
|
+
right: auto;
|
|
25
|
+
left: 0;
|
|
26
|
+
width: 60%;
|
|
27
|
+
height: 100%;
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
width: 40%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
max-height: none;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
31
|
+
&::after {
|
|
32
|
+
background-color: hsla(0, 100%, 50%, 0);
|
|
33
|
+
background-image: radial-gradient(at 0% 0%, hsla(165, 62%, 69%, 1) 0px, transparent 50%),
|
|
34
|
+
radial-gradient(at 100% 0%, hsla(221, 90%, 63%, 1) 0px, transparent 50%),
|
|
35
|
+
radial-gradient(at 100% 100%, hsla(50, 100%, 56%, 1) 0px, transparent 50%),
|
|
36
|
+
radial-gradient(at 0% 100%, hsla(249, 42%, 46%, 1) 0px, transparent 50%);
|
|
37
|
+
top: 0;
|
|
38
|
+
max-height: 268px;
|
|
44
39
|
|
|
45
40
|
@include min(tablet) {
|
|
46
|
-
|
|
41
|
+
right: 0;
|
|
42
|
+
left: auto;
|
|
43
|
+
width: 40%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
max-height: none;
|
|
47
46
|
}
|
|
47
|
+
}
|
|
48
48
|
|
|
49
|
+
@include min(tablet) {
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
.imgContainer {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
width: 100%;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
@include min(laptop) {
|
|
60
|
+
margin-right: 5.8rem;
|
|
61
|
+
width: auto;
|
|
62
|
+
}
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
img {
|
|
65
|
+
border-radius: 1.6rem;
|
|
63
66
|
|
|
64
|
-
@include min(tablet) {
|
|
65
|
-
padding: 5rem 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@include min(laptop) {
|
|
69
|
-
max-width: 64.1rem;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.headerContainer {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
|
|
79
67
|
@include min(tablet) {
|
|
80
|
-
|
|
81
|
-
width: 50%;
|
|
68
|
+
padding: 5rem 0;
|
|
82
69
|
}
|
|
83
70
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
font-size: 3.2rem;
|
|
87
|
-
line-height: 4.2rem;
|
|
88
|
-
text-transform: capitalize;
|
|
89
|
-
color: #1C1A28;
|
|
90
|
-
margin: 0 0 3.2rem;
|
|
91
|
-
|
|
92
|
-
@include min(tablet) {
|
|
93
|
-
font-size: 6rem;
|
|
94
|
-
line-height: 7rem;
|
|
95
|
-
padding: 0 1.6rem 4rem 0;
|
|
96
|
-
margin: 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
> a {
|
|
101
|
-
display: flex !important;
|
|
102
|
-
gap: 1.1rem;
|
|
103
|
-
margin-bottom: 6.7rem;
|
|
104
|
-
background-color: #5545A9 !important;
|
|
105
|
-
color: #ffffff !important;
|
|
106
|
-
font-size: 18px;
|
|
107
|
-
line-height: 20px;
|
|
108
|
-
padding: 2rem 2.4rem !important;
|
|
109
|
-
border-radius: 12px !important;
|
|
110
|
-
border: none !important;
|
|
71
|
+
@include min(laptop) {
|
|
72
|
+
max-width: 64.1rem;
|
|
111
73
|
}
|
|
74
|
+
}
|
|
112
75
|
}
|
|
113
76
|
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
77
|
+
.headerContainer {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
|
|
82
|
+
@include min(tablet) {
|
|
83
|
+
align-items: flex-start;
|
|
84
|
+
width: 50%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
h1 {
|
|
88
|
+
font-weight: 800;
|
|
89
|
+
font-size: 3.2rem;
|
|
90
|
+
line-height: 4.2rem;
|
|
91
|
+
text-transform: capitalize;
|
|
92
|
+
color: #1c1a28;
|
|
93
|
+
margin: 0 0 3.2rem;
|
|
122
94
|
|
|
123
95
|
@include min(tablet) {
|
|
124
|
-
|
|
125
|
-
|
|
96
|
+
font-size: 6rem;
|
|
97
|
+
line-height: 7rem;
|
|
98
|
+
padding: 0 1.6rem 4rem 0;
|
|
99
|
+
margin: 0;
|
|
126
100
|
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
> a {
|
|
104
|
+
display: flex !important;
|
|
105
|
+
gap: 1.1rem;
|
|
106
|
+
margin-bottom: 6.7rem;
|
|
107
|
+
background-color: #5545a9 !important;
|
|
108
|
+
color: #ffffff !important;
|
|
109
|
+
font-size: 18px;
|
|
110
|
+
line-height: 20px;
|
|
111
|
+
padding: 2rem 2.4rem !important;
|
|
112
|
+
border-radius: 12px !important;
|
|
113
|
+
border: none !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.bonusText {
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
font-size: 1.3rem;
|
|
120
|
+
line-height: 1.9rem;
|
|
121
|
+
letter-spacing: 0.16em;
|
|
122
|
+
text-transform: uppercase;
|
|
123
|
+
color: #6b6a72;
|
|
124
|
+
margin-bottom: 0.8rem;
|
|
125
|
+
|
|
126
|
+
@include min(tablet) {
|
|
127
|
+
font-size: 1.9rem;
|
|
128
|
+
line-height: 2.8rem;
|
|
129
|
+
}
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
.tnc {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
font-size: 1.2rem;
|
|
134
|
+
line-height: 2rem;
|
|
135
|
+
font-weight: 400;
|
|
136
|
+
|
|
137
|
+
@include min(tablet) {
|
|
138
|
+
position: absolute;
|
|
139
|
+
bottom: 3.2rem;
|
|
140
|
+
}
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
.blendColors {
|
|
141
|
-
|
|
142
|
-
|
|
144
|
+
&::after {
|
|
145
|
+
max-height: 300px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.headerContainer {
|
|
149
|
+
width: 100%;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.tnc {
|
|
153
|
+
position: relative;
|
|
154
|
+
bottom: 0;
|
|
155
|
+
margin-top: 1rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@media only screen and (max-width: 767px) {
|
|
159
|
+
padding-top: 15rem;
|
|
160
|
+
|
|
161
|
+
.bonusText,
|
|
162
|
+
h1 {
|
|
163
|
+
color: #ffffff;
|
|
143
164
|
}
|
|
144
165
|
|
|
145
|
-
.
|
|
146
|
-
|
|
166
|
+
.bonusText {
|
|
167
|
+
margin-bottom: 1.6rem;
|
|
147
168
|
}
|
|
148
169
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
170
|
+
h1 {
|
|
171
|
+
display: inline;
|
|
172
|
+
font-size: 4.5rem;
|
|
173
|
+
line-height: 6rem;
|
|
174
|
+
margin: 0 0 4rem;
|
|
175
|
+
background: linear-gradient(to bottom, white 0%, white 110px, black 10%);
|
|
176
|
+
-webkit-background-clip: text;
|
|
177
|
+
-webkit-text-fill-color: transparent;
|
|
153
178
|
}
|
|
154
179
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
.bonusText,
|
|
159
|
-
h1 {
|
|
160
|
-
color: #ffffff;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.bonusText {
|
|
164
|
-
margin-bottom: 1.6rem;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
h1 {
|
|
168
|
-
display: inline;
|
|
169
|
-
font-size: 4.5rem;
|
|
170
|
-
line-height: 6rem;
|
|
171
|
-
margin: 0 0 4rem;
|
|
172
|
-
background: linear-gradient(to bottom, white 0%, white 110px, black 10%);
|
|
173
|
-
-webkit-background-clip: text;
|
|
174
|
-
-webkit-text-fill-color: transparent;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
a {
|
|
178
|
-
margin-bottom: 9rem;
|
|
179
|
-
}
|
|
180
|
+
a {
|
|
181
|
+
margin-bottom: 9rem;
|
|
180
182
|
}
|
|
181
|
-
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -67,46 +67,51 @@ const TemplateFive = ({
|
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
|
-
<div className={styles.
|
|
71
|
-
<div className={styles.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
<div className={styles.background}>
|
|
71
|
+
<div className={styles.container}>
|
|
72
|
+
<div className={styles.topSection}>{logo()}</div>
|
|
73
|
+
{header()}
|
|
74
|
+
<div className={styles.main}>
|
|
75
|
+
{extraFields?.summary && (
|
|
76
|
+
<div
|
|
77
|
+
className={styles.decs}
|
|
78
|
+
dangerouslySetInnerHTML={{ __html: extraFields?.summary }}
|
|
79
|
+
/>
|
|
80
|
+
)}
|
|
81
|
+
<div className={styles.ratings}>
|
|
82
|
+
{operatorRatings[type]?.slice(0, 3)?.map((elm) => {
|
|
83
|
+
const value = getObjectValue(relation, elm?.fieldValue);
|
|
84
|
+
return (
|
|
85
|
+
<div className>
|
|
86
|
+
<span className={styles.ratingLabel}>
|
|
87
|
+
{translate(translations, elm?.translationKey, elm?.fieldLabel)}
|
|
88
|
+
</span>
|
|
89
|
+
<span className={styles.ratingValue}>
|
|
90
|
+
{value}
|
|
91
|
+
<span>/{numOfStars}</span>
|
|
92
|
+
</span>
|
|
93
|
+
<StarRating numOfStars={numOfStars} rating={value} />
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
})}
|
|
97
|
+
</div>
|
|
93
98
|
</div>
|
|
94
|
-
</div>
|
|
95
99
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
<div className={styles.featureImage}>
|
|
101
|
+
{featureImg?.filename && (
|
|
102
|
+
<LazyImage
|
|
103
|
+
src={imagePrettyUrl(featureImg?.filename, 413, 413)}
|
|
104
|
+
loading="eager"
|
|
105
|
+
width={413}
|
|
106
|
+
height={413}
|
|
107
|
+
alt={getAltText(featureImg)}
|
|
108
|
+
/>
|
|
109
|
+
)}
|
|
110
|
+
</div>
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
<div className={styles.operatorBanner}>
|
|
113
|
+
<OperatorBanner operator={relation} template={pageTemplate} />
|
|
114
|
+
</div>
|
|
110
115
|
</div>
|
|
111
116
|
</div>
|
|
112
117
|
);
|
package/src/components/molecules/header/variants/operator/template-five/template-five.module.scss
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
.background {
|
|
2
|
+
background: linear-gradient(16.92deg, #F9F6E7 -4.7%, #FFFFFF 52.33%, #DDDAEE 110.01%);
|
|
3
|
+
|
|
4
|
+
@include min(tablet) {
|
|
5
|
+
background: linear-gradient(98.12deg, #F9F6E7 0%, #FFFFFF 50.23%, #DDDAEE 100%);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
.container {
|
|
2
10
|
display: grid;
|
|
3
11
|
padding: 4rem 1.6rem;
|
|
4
|
-
|
|
12
|
+
|
|
5
13
|
margin: var(--operator-template-five-margin-mobile, 0rem);
|
|
6
14
|
|
|
7
15
|
@include min(tablet) {
|
|
8
|
-
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
max-width: 1620px;
|
|
18
|
+
|
|
9
19
|
grid-template-columns: 24rem;
|
|
10
20
|
}
|
|
11
21
|
|
|
@@ -17,6 +27,7 @@
|
|
|
17
27
|
|
|
18
28
|
@include min(desktop) {
|
|
19
29
|
padding: 5rem 12rem;
|
|
30
|
+
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
33
|
|
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import loadable from '@loadable/component';
|
|
5
5
|
import Breadcrumbs from 'gatsby-core-theme/src/components/atoms/breadcrumbs';
|
|
6
6
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
7
|
+
import { getSectionExtraField } from 'gatsby-core-theme/src/helpers/getters';
|
|
7
8
|
import styles from './header.module.scss';
|
|
8
9
|
|
|
9
10
|
export const relationContent = (section) => {
|
|
@@ -80,24 +81,25 @@ export const relationContent = (section) => {
|
|
|
80
81
|
return <ModuleComponent page={section.page} image="../../../../images/verify.svg" />;
|
|
81
82
|
}
|
|
82
83
|
case 'page': {
|
|
83
|
-
let props
|
|
84
|
+
let props = {
|
|
85
|
+
extraFields: section.page.extra_fields,
|
|
86
|
+
imageObj: section.page.featured_image_object,
|
|
87
|
+
};
|
|
88
|
+
|
|
84
89
|
if (section?.page?.page_styles?.short_name === 'template_two') {
|
|
85
90
|
ModuleComponent = loadable(() =>
|
|
86
91
|
import('../../../../components/molecules/header/variants/default/template-two')
|
|
87
92
|
);
|
|
88
|
-
props = {
|
|
89
|
-
extraFields: section.page.extra_fields,
|
|
90
|
-
imageObj: section.page.featured_image_object,
|
|
91
|
-
};
|
|
92
93
|
} else {
|
|
93
94
|
ModuleComponent = loadable(() =>
|
|
94
95
|
import('../../../../components/molecules/header/variants/default/template-one')
|
|
95
96
|
);
|
|
96
97
|
props = {
|
|
98
|
+
...props,
|
|
97
99
|
title: section.page.title,
|
|
98
|
-
description:
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
description:
|
|
101
|
+
section.page.description ||
|
|
102
|
+
getSectionExtraField(null, section.page.sections.header, 'header_text'),
|
|
101
103
|
};
|
|
102
104
|
}
|
|
103
105
|
return <ModuleComponent {...props} />;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { setIdleTimeout } from './popup';
|
|
2
|
+
|
|
3
|
+
// this help us to simulate setTimeout and cleraTimeOut
|
|
4
|
+
jest.useFakeTimers();
|
|
5
|
+
|
|
6
|
+
describe('setIdleTimeout', () => {
|
|
7
|
+
it('calls onIdle after the specified number of seconds of inactivity', () => {
|
|
8
|
+
const onIdle = jest.fn();
|
|
9
|
+
setIdleTimeout(1, onIdle);
|
|
10
|
+
|
|
11
|
+
jest.advanceTimersByTime(999);
|
|
12
|
+
expect(onIdle).not.toHaveBeenCalled();
|
|
13
|
+
|
|
14
|
+
jest.advanceTimersByTime(1);
|
|
15
|
+
expect(onIdle).toHaveBeenCalled();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('restarts the timer when activity is detected', () => {
|
|
19
|
+
const onIdle = jest.fn();
|
|
20
|
+
setIdleTimeout(1, onIdle);
|
|
21
|
+
|
|
22
|
+
jest.advanceTimersByTime(999);
|
|
23
|
+
document.dispatchEvent(new Event('mousemove'));
|
|
24
|
+
jest.advanceTimersByTime(1000);
|
|
25
|
+
|
|
26
|
+
jest.advanceTimersByTime(999);
|
|
27
|
+
expect(onIdle).not.toHaveBeenCalled();
|
|
28
|
+
|
|
29
|
+
jest.advanceTimersByTime(1);
|
|
30
|
+
expect(onIdle).toHaveBeenCalled();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -345,4 +345,4 @@
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"}];</script><script src="runtime~main.3c8ed572.iframe.bundle.js"></script><script src="371.33931d9d.iframe.bundle.js"></script><script src="main.
|
|
348
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"}];</script><script src="runtime~main.3c8ed572.iframe.bundle.js"></script><script src="371.33931d9d.iframe.bundle.js"></script><script src="main.314aafd1.iframe.bundle.js"></script></body></html>
|