gatsby-core-theme 7.0.3 → 7.0.4
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
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [7.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v7.0.3...v7.0.4) (2022-05-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix bug when we don't have the post type what is selected ([e5676fe](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e5676fed6d558caa83edf9a7db70b9f17d29d1f5))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* add loading eager to image ([03f5049](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/03f5049d17ec540f02f779eac0462a941bb0b238))
|
|
12
|
+
* add width and height to lazy image ([3177e0b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3177e0b9e5affe747823fa5ff4044023e6ba1a7d))
|
|
13
|
+
* correction to coming soon casino translation key ([28cbea5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/28cbea5f8a3163c54b524b99fa8955d867400b95))
|
|
14
|
+
* correction to duplicate ([cea1daf](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cea1daf727d94a2601e95299aa43f370aa7cdd08))
|
|
15
|
+
* operatorCTA placeholder changes ([b35c777](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b35c777918275fc6153ad38b43eb8fa92d32c547))
|
|
16
|
+
* remove width and height ([8472e2d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8472e2db10981631681e7a3d0c8b4b8987cc8257))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* Merge branch 'tm-2893-operator-img-fix' into 'master' ([17c5061](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/17c5061216dbf8fc72cce6e94906b3821c9c0eb7))
|
|
20
|
+
* Merge branch 'tm-2819-operator-placeholder' into 'master' ([e483605](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e483605921a4d99c92abdf0a0c447c2e3e5c43b2))
|
|
21
|
+
* Merge branch 'tm-2884-archive-module' into 'master' ([935cd5e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/935cd5ec1bed85a616c819e264e98ffb852cd65e))
|
|
22
|
+
|
|
1
23
|
## [7.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v7.0.2...v7.0.3) (2022-05-11)
|
|
2
24
|
|
|
3
25
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -45,10 +45,8 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
|
|
49
48
|
if (!archivePages) {
|
|
50
49
|
console.log(`Archive for ${pageObject.path} broken`);
|
|
51
|
-
return;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
if (archiveModule.pagination_type !== 'load_more') {
|
|
@@ -57,28 +55,37 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
|
|
|
57
55
|
const numOfItemsPerPage = Math.sign(archiveModule.num_of_items)
|
|
58
56
|
? archiveModule.num_of_items
|
|
59
57
|
: calDefaultNrOfItems;
|
|
60
|
-
const chunked = chunk(cloneDeep(archivePages), numOfItemsPerPage);
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
archive.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
58
|
+
const chunked = archivePages && chunk(cloneDeep(archivePages), numOfItemsPerPage);
|
|
59
|
+
const page = cloneDeep(pageObject);
|
|
60
|
+
|
|
61
|
+
if (chunked) {
|
|
62
|
+
chunked.forEach((value, index) => {
|
|
63
|
+
const numOfPages = chunked.length;
|
|
64
|
+
const archive = cloneDeep(page.sections.main.modules[archiveModuleIndex]);
|
|
65
|
+
archive.currentPage = 1 + index; // 0 skip 0
|
|
66
|
+
archive.numOfPages = numOfPages;
|
|
67
|
+
archive.rootPath =
|
|
68
|
+
pageObject.path.charAt(0) !== '/' ? `/${pageObject.path}` : pageObject.path;
|
|
69
|
+
archive.items = value.map((item) => processor.clonePage(item));
|
|
70
|
+
page.path =
|
|
71
|
+
archive.currentPage === 1
|
|
72
|
+
? pageObject.path
|
|
73
|
+
: `${pageObject.path}/page/${archive.currentPage}`;
|
|
74
|
+
page.sections.main.modules[archiveModuleIndex] = archive;
|
|
75
75
|
|
|
76
|
+
createPage({
|
|
77
|
+
path: page.path,
|
|
78
|
+
component: require.resolve(appName),
|
|
79
|
+
context: { page, marketSections, prefilledModules, siteInfo, translations },
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
76
83
|
createPage({
|
|
77
84
|
path: page.path,
|
|
78
85
|
component: require.resolve(appName),
|
|
79
86
|
context: { page, marketSections, prefilledModules, siteInfo, translations },
|
|
80
87
|
});
|
|
81
|
-
}
|
|
88
|
+
}
|
|
82
89
|
} else {
|
|
83
90
|
const page = cloneDeep(pageObject);
|
|
84
91
|
const archive = cloneDeep(page.sections.main.modules[archiveModuleIndex]);
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ import styles from './operator-cta.module.scss';
|
|
|
9
9
|
|
|
10
10
|
export default function OperatorCta({
|
|
11
11
|
operator,
|
|
12
|
-
placeholderText = '
|
|
13
|
-
closedCasinoText = '
|
|
12
|
+
placeholderText = 'Soon Available',
|
|
13
|
+
closedCasinoText = 'Not Accepting New Players',
|
|
14
14
|
playText = 'Visit',
|
|
15
15
|
translationKey = 'play_now',
|
|
16
16
|
tracker = 'main',
|
|
@@ -21,26 +21,18 @@ export default function OperatorCta({
|
|
|
21
21
|
const isPlaceHolder = status === 'coming_soon';
|
|
22
22
|
const isClosed = status === 'inactive';
|
|
23
23
|
const renderCta = () => {
|
|
24
|
-
if (isPlaceHolder) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
aria-label={placeholderText}
|
|
29
|
-
className={`${styles.operatorCtaPlaceholder} ${gtmClass} operator-cta-gtm`}
|
|
30
|
-
>
|
|
31
|
-
{placeholderText}
|
|
32
|
-
</a>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
24
|
+
if (isPlaceHolder || isClosed) {
|
|
25
|
+
const translateBtn = isPlaceHolder
|
|
26
|
+
? translate(translations, 'coming_soon', placeholderText)
|
|
27
|
+
: translate(translations, 'closed_casino', closedCasinoText);
|
|
35
28
|
|
|
36
|
-
if (isClosed) {
|
|
37
29
|
return (
|
|
38
30
|
<a
|
|
39
|
-
title={
|
|
40
|
-
aria-label={
|
|
31
|
+
title={translateBtn}
|
|
32
|
+
aria-label={translateBtn}
|
|
41
33
|
className={`${styles.operatorCtaClosed} ${gtmClass} operator-cta-gtm`}
|
|
42
34
|
>
|
|
43
|
-
{
|
|
35
|
+
{translateBtn}
|
|
44
36
|
</a>
|
|
45
37
|
);
|
|
46
38
|
}
|
|
@@ -49,7 +49,13 @@ export default function OperatorBanner({
|
|
|
49
49
|
rel="noreferrer"
|
|
50
50
|
aria-label={`${operator?.name} Link`}
|
|
51
51
|
>
|
|
52
|
-
<LazyImage
|
|
52
|
+
<LazyImage
|
|
53
|
+
alt={operator?.name}
|
|
54
|
+
src={imagePrettyUrl(logo)}
|
|
55
|
+
loading="eager"
|
|
56
|
+
height={120}
|
|
57
|
+
width={100}
|
|
58
|
+
/>
|
|
53
59
|
</a>
|
|
54
60
|
) : (
|
|
55
61
|
<div className={styles.nameTitle}>
|