gatsby-matrix-theme 7.1.22 → 7.1.25
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 +36 -0
- package/jest.config.js +1 -1
- package/package.json +3 -3
- package/src/components/atoms/cards/game-card-two/game-card-two.module.scss +52 -0
- package/src/components/atoms/cards/game-card-two/index.js +112 -0
- package/src/components/molecules/toplist/row/variant-one.js +6 -1
- package/src/components/molecules/toplist/row/variant-one.module.scss +17 -0
- package/src/gatsby-core-theme/components/organisms/cards/index.js +9 -1
- package/storybook/public/40.a27a9692.iframe.bundle.js +7 -0
- package/storybook/public/{40.70a65204.iframe.bundle.js.LICENSE.txt → 40.a27a9692.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{40.70a65204.iframe.bundle.js.map → 40.a27a9692.iframe.bundle.js.map} +1 -1
- package/storybook/public/409.b960bde4.iframe.bundle.js +1 -0
- package/storybook/public/500.80972e07.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.b2beaee1.iframe.bundle.js +1 -0
- package/storybook/public/runtime~main.ecf205c7.iframe.bundle.js +1 -0
- package/storybook/public/40.70a65204.iframe.bundle.js +0 -7
- package/storybook/public/409.581bc372.iframe.bundle.js +0 -1
- package/storybook/public/main.6cff2794.iframe.bundle.js +0 -1
- package/storybook/public/runtime~main.4cc62ad1.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## [7.1.25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.24...v7.1.25) (2022-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* updated to latest gatsby version and latest core version ([b60944a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b60944aa3ea20bfbf9539c25f0bc195cb3b3e802))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([cbb80af](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cbb80af9c69c39a9513706961073cd0bc53dc62d))
|
|
10
|
+
|
|
11
|
+
## [7.1.24](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.23...v7.1.24) (2022-06-20)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* cards-v2-for-ogsa ([a10c8a3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a10c8a3c8fe686c47347b84141843fa6f59024eb))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Config
|
|
20
|
+
|
|
21
|
+
* update-core-version ([da78b14](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/da78b14adfbee21c9c2e27b85c3bbd5589e82012))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
* Merge branch 'update-core' into 'master' ([c3b1b8c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c3b1b8cf429fcd9cc0dd736139148f6dcd0cad73))
|
|
25
|
+
* Merge branch 'tm-2871-cards-v2' into 'master' ([c763403](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c763403ea4cab5caa690bb336f29ca39a9117c16))
|
|
26
|
+
|
|
27
|
+
## [7.1.23](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.22...v7.1.23) (2022-06-17)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* toplist launch date styling ([873e56a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/873e56ab9a0a70996ac7ac0d03169eafabfac3e1))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([7a37ab3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7a37ab3835dc8496b93fff3a0677d44b3e03205a))
|
|
36
|
+
|
|
1
37
|
## [7.1.22](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.21...v7.1.22) (2022-06-16)
|
|
2
38
|
|
|
3
39
|
|
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.25",
|
|
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",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.cardContent {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 1.6rem;
|
|
7
|
+
color: var(--color-44);
|
|
8
|
+
.cardTitle {
|
|
9
|
+
font-size: 1.6rem;
|
|
10
|
+
color: #000;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
.cardMeta {
|
|
14
|
+
@include flex-direction(row);
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
margin: 0.8rem 0 1rem;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.cardProvider {
|
|
20
|
+
font-size: 1.4rem;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
}
|
|
23
|
+
.playNow {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
&.featured {
|
|
27
|
+
color: #fff;
|
|
28
|
+
.cardTitle {
|
|
29
|
+
color: #fff;
|
|
30
|
+
font-size: 1.8rem;
|
|
31
|
+
}
|
|
32
|
+
.cardProvider {
|
|
33
|
+
font-size: 1.6rem;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.cardBanner {
|
|
38
|
+
position: absolute;
|
|
39
|
+
left: 0;
|
|
40
|
+
top: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
a {
|
|
43
|
+
display: block;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
img {
|
|
47
|
+
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
|
48
|
+
height: 13rem;
|
|
49
|
+
width: 100%;
|
|
50
|
+
object-fit: cover;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import loadable from '@loadable/component';
|
|
5
|
+
import Button from 'gatsby-core-theme/src/components/atoms/button';
|
|
6
|
+
import GatsbyImg from 'gatsby-core-theme/src/hooks/gatsby-img';
|
|
7
|
+
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
8
|
+
import {
|
|
9
|
+
imagePrettyUrl,
|
|
10
|
+
getSectionExtraField,
|
|
11
|
+
translate,
|
|
12
|
+
getAltText,
|
|
13
|
+
} from 'gatsby-core-theme/src/helpers/getters';
|
|
14
|
+
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
15
|
+
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
16
|
+
|
|
17
|
+
import BaseCard from '../base-card';
|
|
18
|
+
import styles from './game-card-two.module.scss';
|
|
19
|
+
|
|
20
|
+
const GameCard = ({
|
|
21
|
+
item,
|
|
22
|
+
button_text = 'play_now',
|
|
23
|
+
width = 300,
|
|
24
|
+
height = 250,
|
|
25
|
+
useOneStarRating = false,
|
|
26
|
+
}) => {
|
|
27
|
+
const { relation, title, path, banner } = item;
|
|
28
|
+
const cardBackgroundImage = getSectionExtraField(null, item, 'card_background_image');
|
|
29
|
+
const featured = !!cardBackgroundImage;
|
|
30
|
+
const { translations } = useContext(Context) || {};
|
|
31
|
+
|
|
32
|
+
const logUrlObject = relation?.thumbnail_filename_object;
|
|
33
|
+
const StarRating = useOneStarRating
|
|
34
|
+
? loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating/one-star'))
|
|
35
|
+
: loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating'));
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<BaseCard item={item} isLinked cardType="game">
|
|
39
|
+
{!featured && (
|
|
40
|
+
<Link
|
|
41
|
+
to={path}
|
|
42
|
+
className={`game-card-gtm ${styles.cardBanner}`}
|
|
43
|
+
aria-label={`${title} Link`}
|
|
44
|
+
>
|
|
45
|
+
{banner ? (
|
|
46
|
+
<LazyImage
|
|
47
|
+
width={width}
|
|
48
|
+
height={height}
|
|
49
|
+
src={imagePrettyUrl(banner, width, height)}
|
|
50
|
+
alt={getAltText(logUrlObject, title)}
|
|
51
|
+
/>
|
|
52
|
+
) : (
|
|
53
|
+
<GatsbyImg filename="default-slot.jpg" alt={title} />
|
|
54
|
+
)}
|
|
55
|
+
</Link>
|
|
56
|
+
)}
|
|
57
|
+
<div className={`${styles.cardContent} ${featured && styles.featured}`}>
|
|
58
|
+
<Link to={path} className="game-card-gtm">
|
|
59
|
+
<span className={styles.cardTitle}>{title}</span>
|
|
60
|
+
</Link>
|
|
61
|
+
<div className={styles.cardMeta}>
|
|
62
|
+
<div className={styles.cardProvider}>{relation && relation?.game_provider?.name}</div>
|
|
63
|
+
<div className={styles.cardRating}>
|
|
64
|
+
{relation && (
|
|
65
|
+
<StarRating
|
|
66
|
+
numOfStars={5}
|
|
67
|
+
halfStars={false}
|
|
68
|
+
rating={[
|
|
69
|
+
relation.first_rating,
|
|
70
|
+
relation.second_rating,
|
|
71
|
+
relation.third_rating,
|
|
72
|
+
relation.fourth_rating,
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<Button
|
|
79
|
+
to={path}
|
|
80
|
+
primaryColor={!featured}
|
|
81
|
+
btnText={translate(translations, button_text, 'Play now')}
|
|
82
|
+
className={styles.playNow}
|
|
83
|
+
gtmClass="game-card-gtm btn-cta"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</BaseCard>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
GameCard.propTypes = {
|
|
91
|
+
item: PropTypes.shape({
|
|
92
|
+
relation: PropTypes.shape({
|
|
93
|
+
first_rating: PropTypes.string,
|
|
94
|
+
second_rating: PropTypes.string,
|
|
95
|
+
third_rating: PropTypes.string,
|
|
96
|
+
fourth_rating: PropTypes.string,
|
|
97
|
+
game_provider: PropTypes.shape({ name: PropTypes.string }),
|
|
98
|
+
thumbnail_filename_object: PropTypes.shape({
|
|
99
|
+
alt: PropTypes.string,
|
|
100
|
+
}),
|
|
101
|
+
}),
|
|
102
|
+
title: PropTypes.string,
|
|
103
|
+
path: PropTypes.string,
|
|
104
|
+
banner: PropTypes.string,
|
|
105
|
+
}).isRequired,
|
|
106
|
+
button_text: PropTypes.string,
|
|
107
|
+
width: PropTypes.number,
|
|
108
|
+
height: PropTypes.number,
|
|
109
|
+
useOneStarRating: PropTypes.bool,
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default GameCard;
|
|
@@ -87,7 +87,7 @@ export default function Row({
|
|
|
87
87
|
>
|
|
88
88
|
<LazyImage
|
|
89
89
|
alt={getAltText(imageObject, item.name)}
|
|
90
|
-
src={imagePrettyUrl(imageObject?.filename || item?.logo_url, 80).replace(
|
|
90
|
+
src={imagePrettyUrl(imageObject?.filename || item?.logo_url, 80, 80).replace(
|
|
91
91
|
'filters:format(webp)/',
|
|
92
92
|
''
|
|
93
93
|
)}
|
|
@@ -122,6 +122,11 @@ export default function Row({
|
|
|
122
122
|
} ${hasRibbon ? styles.withRibbon : ''}`}
|
|
123
123
|
>
|
|
124
124
|
<Bonus item={item} tracker={oneliner} />
|
|
125
|
+
{showLaunchDate && (
|
|
126
|
+
<span>
|
|
127
|
+
{translate(translations, 'launch_date', 'Launch Date')}: {launchDate}
|
|
128
|
+
</span>
|
|
129
|
+
)}
|
|
125
130
|
</a>
|
|
126
131
|
<SellingPoints icon={<MdCheck />} sellingPoints={sellingPoints} limit={3} />
|
|
127
132
|
|
|
@@ -132,6 +132,23 @@
|
|
|
132
132
|
padding: 0;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
span:last-child {
|
|
136
|
+
font-weight: 700;
|
|
137
|
+
font-size: 16px;
|
|
138
|
+
line-height: 23px;
|
|
139
|
+
color: #150e06;
|
|
140
|
+
display: none;
|
|
141
|
+
|
|
142
|
+
@include min(tablet) {
|
|
143
|
+
display: block;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@include min(laptop) {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
135
152
|
&.withRibbon {
|
|
136
153
|
@include min(tablet) {
|
|
137
154
|
padding-top: 2rem !important;
|
|
@@ -31,7 +31,15 @@ export default (props) => {
|
|
|
31
31
|
}
|
|
32
32
|
break;
|
|
33
33
|
case 'game':
|
|
34
|
-
|
|
34
|
+
if (props.module.style === 'game_template_2') {
|
|
35
|
+
customCardComponent = loadable(() =>
|
|
36
|
+
import(`../../../../components/atoms/cards/game-card-two/index`)
|
|
37
|
+
);
|
|
38
|
+
} else {
|
|
39
|
+
customCardComponent = loadable(() =>
|
|
40
|
+
import(`../../../../components/atoms/cards/game-card`)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
35
43
|
break;
|
|
36
44
|
case 'payment_method':
|
|
37
45
|
// TODO change BaseCard to PaymetMethodCard
|