gatsby-core-theme 2.0.3 → 2.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.
- package/CHANGELOG.md +43 -0
- package/package.json +1 -1
- package/src/components/atoms/bonus/bonus.test.js +0 -2
- package/src/components/atoms/bonus/index.js +2 -5
- package/src/components/atoms/spotlights/index.js +24 -12
- package/src/components/atoms/spotlights/spotlights.module.scss +10 -6
- package/src/components/molecules/star-rating/index.js +3 -3
- package/src/components/molecules/toplist/default-row/toplist.test.js +2 -2
- package/src/components/organisms/toplist/toplist.test.js +1 -2
- package/src/helpers/processor/index.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
## [2.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.6...v2.0.7) (2021-12-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* spotlight ([07c238b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/07c238b0003de01cd6adf2c2c16080f734dc2029))
|
|
7
|
+
* spotlight test ([e649604](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e649604c45d6064d29ba022ac59f71f04ad0ed4b))
|
|
8
|
+
|
|
9
|
+
## [2.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.5...v2.0.6) (2021-12-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* spotlights component ([04bb5db](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/04bb5dbb2fd3ce69c511a99b16e7747dcdc7c3f6))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([c7653a6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c7653a6da041061559855106cd6dfa7f9581a2c7))
|
|
18
|
+
|
|
19
|
+
## [2.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.4...v2.0.5) (2021-12-22)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* spotlights component ([f6221a6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f6221a69e2941bba6d868af5e5c083a89f10a9ce))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([7952c78](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7952c78019d7220cca07b5516cb462ef620e6d38))
|
|
28
|
+
|
|
29
|
+
## [2.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.3...v2.0.4) (2021-12-22)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* operator bonus added dividor ([f191fd6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f191fd60fb0be440b7fa16b8d4415a0997c00608))
|
|
35
|
+
* sitemap bug in rage sites ([ce649bf](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ce649bfcce46d8b9bc5d732028555d68c6e800bc))
|
|
36
|
+
* spotlights component ([3154c2a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3154c2a89ed1da2231f4031e386166c0b408309f))
|
|
37
|
+
* star ratings ([884ba75](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/884ba7515f8835a20b673753887cd57173672f6a))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* Merge branch 'tm-2630-rage-sitemap' into 'master' ([f00efd3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f00efd3c5060bc3b55171052aa3e948e95caf8f9))
|
|
41
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([026b9ad](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/026b9adf17a058e64e7d81f588a03b36550c2de4))
|
|
42
|
+
* Merge branch 'tm-2610-operator-bonus' into 'master' ([6415f0e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6415f0ee7badb5e1435f2bcce2a85c6fbbe25826))
|
|
43
|
+
|
|
1
44
|
## [2.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.2...v2.0.3) (2021-12-18)
|
|
2
45
|
|
|
3
46
|
|
package/package.json
CHANGED
|
@@ -11,8 +11,6 @@ describe('Bonus Component', () => {
|
|
|
11
11
|
const { container, getByText } = render(<Bonus item={item} tracker="main" />);
|
|
12
12
|
expect(getByText('€100 welcome bonus')).toBeTruthy();
|
|
13
13
|
expect(getByText('€100 welcome bonus').getAttribute('class')).toEqual('title');
|
|
14
|
-
expect(getByText('150 free spins')).toBeTruthy();
|
|
15
|
-
expect(getByText('150 free spins').getAttribute('class')).toEqual('desc');
|
|
16
14
|
expect(container.querySelector('div.bonus')).toBeTruthy();
|
|
17
15
|
});
|
|
18
16
|
test('without oneLiner', () => {
|
|
@@ -17,7 +17,7 @@ const Bonus = ({ item, tracker = 'main' }) => {
|
|
|
17
17
|
<div className={styles.bonus}>
|
|
18
18
|
<div className={styles.title}>{onelinerSplitted[0]}</div>
|
|
19
19
|
{onelinerSplitted.length === 2 && (
|
|
20
|
-
<div className={styles.desc}>{
|
|
20
|
+
<div className={styles.desc}>{`+${onelinerSplitted[1]}`}</div>
|
|
21
21
|
)}
|
|
22
22
|
</div>
|
|
23
23
|
);
|
|
@@ -25,10 +25,7 @@ const Bonus = ({ item, tracker = 'main' }) => {
|
|
|
25
25
|
|
|
26
26
|
Bonus.propTypes = {
|
|
27
27
|
tracker: PropTypes.string,
|
|
28
|
-
item: PropTypes.shape({
|
|
29
|
-
one_liners: PropTypes.object,
|
|
30
|
-
bonus: PropTypes.object,
|
|
31
|
-
}),
|
|
28
|
+
item: PropTypes.shape({}),
|
|
32
29
|
};
|
|
33
30
|
|
|
34
31
|
export default Bonus;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { GrFormNextLink } from 'react-icons/gr';
|
|
6
|
-
|
|
6
|
+
import Button from '~atoms/button';
|
|
7
7
|
import LazyImage from '~hooks/lazy-image';
|
|
8
8
|
import keygen from '~helpers/keygen';
|
|
9
9
|
import { imagePrettyUrl } from '~helpers/getters';
|
|
@@ -18,15 +18,23 @@ const Spotlights = ({ module }) => {
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
20
|
<span className={styles.itemImage}>
|
|
21
|
-
<LazyImage
|
|
21
|
+
<LazyImage
|
|
22
|
+
width={100}
|
|
23
|
+
height={50}
|
|
24
|
+
alt={item.label || item?.link_text}
|
|
25
|
+
src={imagePrettyUrl(img)}
|
|
26
|
+
/>
|
|
22
27
|
</span>
|
|
23
|
-
<
|
|
28
|
+
<div className={styles.content}>
|
|
29
|
+
<span className={styles.label}>{item.label}</span>
|
|
30
|
+
{item.subtitle && <span className={styles.subtitle}>{item.subtitle}</span>}
|
|
31
|
+
</div>
|
|
24
32
|
</>
|
|
25
33
|
);
|
|
26
34
|
};
|
|
27
35
|
|
|
28
36
|
return (
|
|
29
|
-
<div className={styles.spotlightsContainer}>
|
|
37
|
+
<div className={`${styles.spotlightsContainer} ${module.style ? styles[module.style] : ''}`}>
|
|
30
38
|
{show_read_more === '1' && (
|
|
31
39
|
<div
|
|
32
40
|
className={styles.spotlightstext}
|
|
@@ -60,7 +68,7 @@ const Spotlights = ({ module }) => {
|
|
|
60
68
|
|
|
61
69
|
{mode === 'image_text' && (
|
|
62
70
|
<div className={styles.body}>
|
|
63
|
-
<
|
|
71
|
+
<div className={styles.text} dangerouslySetInnerHTML={{ __html: item.text }} />
|
|
64
72
|
{item.link.value && item.link.type === 'external' ? (
|
|
65
73
|
<a
|
|
66
74
|
href={item.link.value}
|
|
@@ -75,14 +83,17 @@ const Spotlights = ({ module }) => {
|
|
|
75
83
|
) : (
|
|
76
84
|
<>
|
|
77
85
|
{item.link.value && (
|
|
78
|
-
<
|
|
86
|
+
<Button
|
|
87
|
+
btnText={item.link_text ? item.link_text : 'Read More'}
|
|
88
|
+
invertColors
|
|
89
|
+
className={styles.readMore}
|
|
90
|
+
isAnchorLink
|
|
91
|
+
isInternalLink={item.link.type !== 'external'}
|
|
92
|
+
targetBlank={item.link.type === 'external'}
|
|
79
93
|
to={item.link.value}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{item.link_text ? item.link_text : 'Read More'}
|
|
84
|
-
<GrFormNextLink />
|
|
85
|
-
</Link>
|
|
94
|
+
primaryColor={false}
|
|
95
|
+
gtmClass="spotlights-gtm btn-cta"
|
|
96
|
+
/>
|
|
86
97
|
)}
|
|
87
98
|
</>
|
|
88
99
|
)}
|
|
@@ -96,6 +107,7 @@ const Spotlights = ({ module }) => {
|
|
|
96
107
|
};
|
|
97
108
|
Spotlights.propTypes = {
|
|
98
109
|
module: PropTypes.shape({
|
|
110
|
+
style: PropTypes.string,
|
|
99
111
|
mode: PropTypes.oneOf(['image', 'icon', 'image_text']).isRequired,
|
|
100
112
|
items: PropTypes.arrayOf(
|
|
101
113
|
PropTypes.shape({
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@include min(desktop) {
|
|
14
|
-
grid-template-columns: repeat(
|
|
14
|
+
grid-template-columns: repeat(3, 1fr);
|
|
15
15
|
column-gap: 1.6rem;
|
|
16
16
|
}
|
|
17
17
|
li {
|
|
@@ -29,17 +29,21 @@
|
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 15rem;
|
|
31
31
|
img {
|
|
32
|
-
width:
|
|
32
|
+
width: auto;
|
|
33
33
|
height: 100%;
|
|
34
34
|
object-fit: cover;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
font-size: 2rem;
|
|
40
|
-
color: black;
|
|
37
|
+
|
|
38
|
+
.content {
|
|
41
39
|
padding: 1rem;
|
|
40
|
+
.label {
|
|
41
|
+
font-weight: 700;
|
|
42
|
+
font-size: 2rem;
|
|
43
|
+
color: black;
|
|
44
|
+
}
|
|
42
45
|
}
|
|
46
|
+
|
|
43
47
|
.body {
|
|
44
48
|
padding: 0 1rem 1rem 1rem;
|
|
45
49
|
}
|
|
@@ -34,9 +34,9 @@ const StarRating = ({ numOfStars, rating, halfStars = true }) => {
|
|
|
34
34
|
return output;
|
|
35
35
|
};
|
|
36
36
|
return (
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
</
|
|
37
|
+
<LazyLoad>
|
|
38
|
+
<div className={styles.starRatingContainer}>{renderFarm()}</div>
|
|
39
|
+
</LazyLoad>
|
|
40
40
|
);
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -7,10 +7,10 @@ import { getToplistItem } from '~tests/factories/modules/toplist.factory';
|
|
|
7
7
|
|
|
8
8
|
describe('Molecules/TopList/Row', () => {
|
|
9
9
|
test('render with props', () => {
|
|
10
|
-
const { container
|
|
10
|
+
const { container } = render(<Row item={getToplistItem()} tracker="main" />);
|
|
11
11
|
expect(container).toBeTruthy();
|
|
12
12
|
expect(container.querySelector('.row.list')).toBeTruthy();
|
|
13
|
-
expect(getByText('150 free spins')).toBeTruthy();
|
|
13
|
+
// expect(getByText('150 free spins')).toBeTruthy();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
test('grid layout', () => {
|
|
@@ -9,10 +9,9 @@ import { getListToplistItems } from '~tests/factories/modules/toplist.factory';
|
|
|
9
9
|
|
|
10
10
|
describe('Organisms/TopList', () => {
|
|
11
11
|
test('render with props', () => {
|
|
12
|
-
const { container
|
|
12
|
+
const { container } = render(<TopList module={{ items: getListToplistItems(3) }} />);
|
|
13
13
|
expect(container).toBeTruthy();
|
|
14
14
|
expect(container.querySelector('.list')).toBeTruthy();
|
|
15
|
-
expect(getByText('150 free spins')).toBeTruthy();
|
|
16
15
|
});
|
|
17
16
|
|
|
18
17
|
test('headerExtra', () => {
|
|
@@ -39,9 +39,12 @@ export function processSitemapPages(pages, markets) {
|
|
|
39
39
|
pageListByMarket[market] = [];
|
|
40
40
|
let pageList = [];
|
|
41
41
|
Object.keys(pages[market]).forEach((pageType) => {
|
|
42
|
-
const filteredPages = pages[market][pageType].filter(
|
|
43
|
-
(page
|
|
44
|
-
|
|
42
|
+
const filteredPages = pages[market][pageType].filter((page) => {
|
|
43
|
+
if (page.type === 'event') {
|
|
44
|
+
return page.relation.event && page.robot_options && page.robot_options.page_index === 1;
|
|
45
|
+
}
|
|
46
|
+
return page.robot_options && page.robot_options.page_index === 1;
|
|
47
|
+
});
|
|
45
48
|
|
|
46
49
|
pageList = pageList.concat(filteredPages.map((row) => pick(row, pickHTMLSitemapPageKeys)));
|
|
47
50
|
});
|