gatsby-matrix-theme 53.2.49 → 53.2.51
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 +20 -0
- package/package.json +2 -2
- package/src/components/atoms/cards/game-cards/template-six/index.js +123 -0
- package/src/components/atoms/cards/game-cards/template-six/template-six.module.scss +144 -0
- package/src/components/atoms/cards/game-cards/template-six/template-six.stories.js +91 -0
- package/src/components/atoms/cards/operator-card/template-five/index.js +123 -0
- package/src/components/atoms/cards/operator-card/template-five/template-five.module.scss +144 -0
- package/src/components/atoms/cards/operator-card/template-five/template-five.stories.js +54 -0
- package/src/components/organisms/cards/template-one/index.js +4 -2
- package/src/helpers/cards.js +7 -3
- package/storybook/public/127.9de94daa.iframe.bundle.js +1 -0
- package/storybook/public/591.8443d5a0.iframe.bundle.js +1 -0
- package/storybook/public/693.99b1fa25.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.d93776b2.iframe.bundle.js +1 -0
- package/storybook/public/project.json +1 -1
- package/storybook/public/{runtime~main.d6077abf.iframe.bundle.js → runtime~main.da64157a.iframe.bundle.js} +1 -1
- package/storybook/public/127.5e3a1d21.iframe.bundle.js +0 -1
- package/storybook/public/591.d001ec8b.iframe.bundle.js +0 -1
- package/storybook/public/693.bafcff12.iframe.bundle.js +0 -1
- package/storybook/public/main.7326bf32.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [53.2.51](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.50...v53.2.51) (2025-09-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added card type to slots ([55fe46c](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/55fe46c0490a0b91a12bf19e69f811ed449df74d))
|
|
7
|
+
* added template for eeat cards ([46eb848](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/46eb848f3f88ad0569a596a36cd952c678668eea))
|
|
8
|
+
* removed date from cards ([220c7a6](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/220c7a6a6d5a04c0821a522dd82a4b423dda2018))
|
|
9
|
+
* storybook ([76a20c8](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/76a20c80b38b6f456d3a7d45c6b36ac6440a99bc))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* Merge branch 'en-55-eeat-cards' into 'master' ([8e52e15](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/8e52e15fb16fa391453ef826bc90c0260d495686))
|
|
13
|
+
|
|
14
|
+
## [53.2.50](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.49...v53.2.50) (2025-09-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* update theme ([20388fe](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/20388fe6d11ad50b45b893f31998560d4ad9cc9a))
|
|
20
|
+
|
|
1
21
|
## [53.2.49](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.48...v53.2.49) (2025-09-10)
|
|
2
22
|
|
|
3
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "53.2.
|
|
3
|
+
"version": "53.2.51",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@react-icons/all-files": "^4.1.0",
|
|
27
27
|
"gatsby": "^5.11.0",
|
|
28
|
-
"gatsby-core-theme": "44.4.
|
|
28
|
+
"gatsby-core-theme": "44.4.57",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
31
31
|
"gatsby-plugin-sitemap": "^6.13.1",
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
7
|
+
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
8
|
+
import { formatDate } from '~helpers/date-time';
|
|
9
|
+
|
|
10
|
+
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
11
|
+
import styles from './template-six.module.scss';
|
|
12
|
+
|
|
13
|
+
const TemplateSix = ({
|
|
14
|
+
item,
|
|
15
|
+
width = 277,
|
|
16
|
+
height = 140,
|
|
17
|
+
showDate = false,
|
|
18
|
+
showAuthorAsLink = true,
|
|
19
|
+
verifyIcon = '',
|
|
20
|
+
showImageAsLink = false,
|
|
21
|
+
showByLabel = false
|
|
22
|
+
}) => {
|
|
23
|
+
const { title, path, relation, author } = item;
|
|
24
|
+
const date = item?.updated_at || item?.created_at;
|
|
25
|
+
const formatedDate = date && formatDate(date, 'DD.MM.YYYY', '/', 'en-GB');
|
|
26
|
+
|
|
27
|
+
const defaultImg = (
|
|
28
|
+
<LazyImage width={width} height={height} src="/images/default-article.jpg" alt={title} />
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const imageElement = (
|
|
32
|
+
<LazyImage
|
|
33
|
+
width={width}
|
|
34
|
+
height={height}
|
|
35
|
+
defaultImg={defaultImg}
|
|
36
|
+
src={relation ? imagePrettyUrl(relation?.logo?.filename, width, height) : undefined}
|
|
37
|
+
alt={title}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
return (
|
|
41
|
+
<div className={styles.article || ''}>
|
|
42
|
+
{showImageAsLink ? (
|
|
43
|
+
<Link
|
|
44
|
+
to={path}
|
|
45
|
+
className={`${styles.image || ''} article-card-gtm`}
|
|
46
|
+
aria-label={useTranslate(`ariaLabel-${title}Link`, `${title} Link`)}
|
|
47
|
+
>
|
|
48
|
+
{imageElement}
|
|
49
|
+
</Link>
|
|
50
|
+
) : (
|
|
51
|
+
<div className={styles.image || ''}>{imageElement}</div>
|
|
52
|
+
)}
|
|
53
|
+
<>
|
|
54
|
+
<Link to={path} className={styles?.cardTitle || ''}>
|
|
55
|
+
{title}
|
|
56
|
+
</Link>
|
|
57
|
+
{typeof author === 'object' && (
|
|
58
|
+
<div
|
|
59
|
+
className={styles?.showAuthorOnOneLine}
|
|
60
|
+
>
|
|
61
|
+
{!!author?.image && (
|
|
62
|
+
<div className={styles.authorImages}>
|
|
63
|
+
<LazyImage
|
|
64
|
+
alt={author?.name}
|
|
65
|
+
width={40}
|
|
66
|
+
height={40}
|
|
67
|
+
src={imagePrettyUrl(author?.image, 40, 40)}
|
|
68
|
+
/>
|
|
69
|
+
{verifyIcon && verifyIcon}
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
<div className={styles.authorContainer}>
|
|
73
|
+
{showByLabel && (
|
|
74
|
+
<p>
|
|
75
|
+
<span className={styles.byText}>{useTranslate('by', 'By')}</span>
|
|
76
|
+
</p>
|
|
77
|
+
)}
|
|
78
|
+
{showAuthorAsLink ? (
|
|
79
|
+
<Link to={author?.profile_page_path} title={author?.name}>
|
|
80
|
+
{author?.name}
|
|
81
|
+
</Link>
|
|
82
|
+
) : (
|
|
83
|
+
<span className={styles.authorName}>{author?.name}</span>
|
|
84
|
+
)}
|
|
85
|
+
{showDate && <span className={styles?.noLink || ''}>{formatedDate}</span>}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
</>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
TemplateSix.propTypes = {
|
|
95
|
+
item: PropTypes.shape({
|
|
96
|
+
author: PropTypes.shape({
|
|
97
|
+
name: PropTypes.string,
|
|
98
|
+
profile_page_path: PropTypes.string,
|
|
99
|
+
twitter_profile: PropTypes.string,
|
|
100
|
+
image: PropTypes.string,
|
|
101
|
+
}),
|
|
102
|
+
relation: PropTypes.shape({
|
|
103
|
+
logo: PropTypes.shape({
|
|
104
|
+
filename: PropTypes.string
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
title: PropTypes.string,
|
|
108
|
+
updated_at: PropTypes.string,
|
|
109
|
+
created_at: PropTypes.string,
|
|
110
|
+
path: PropTypes.string,
|
|
111
|
+
banner: PropTypes.string,
|
|
112
|
+
reading_time: PropTypes.string,
|
|
113
|
+
}).isRequired,
|
|
114
|
+
width: PropTypes.number,
|
|
115
|
+
height: PropTypes.number,
|
|
116
|
+
showDate: PropTypes.bool,
|
|
117
|
+
showAuthorAsLink: PropTypes.bool,
|
|
118
|
+
verifyIcon: PropTypes.string,
|
|
119
|
+
showImageAsLink: PropTypes.bool,
|
|
120
|
+
showByLabel: PropTypes.bool
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export default TemplateSix;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
.article {
|
|
2
|
+
width: 100%;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
background: var(--eeat-cards-background-color, #fff);
|
|
5
|
+
border-radius: var(--eeat-cards-border-radius, 1rem);
|
|
6
|
+
border: var(--eeat-cards-border, none);
|
|
7
|
+
box-shadow: 0 6px 8px -2px rgb(27 27 28 / 8%), 0 4px 4px -2px rgb(27 27 28 / 6%);
|
|
8
|
+
position: relative;
|
|
9
|
+
height: auto;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-rows: 14rem 1fr;
|
|
12
|
+
padding: 1.6rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cardContent {
|
|
16
|
+
@include flex-direction(column);
|
|
17
|
+
@include flex-align(flex-start, space-between);
|
|
18
|
+
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
> a {
|
|
22
|
+
margin-bottom: 3.2rem;
|
|
23
|
+
margin-top: 1.6rem;
|
|
24
|
+
|
|
25
|
+
span {
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
font-size: 2.4rem;
|
|
29
|
+
text-transform: capitalize;
|
|
30
|
+
color: #1c1a28;
|
|
31
|
+
display: flex;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.image {
|
|
37
|
+
height: 14rem;
|
|
38
|
+
|
|
39
|
+
img {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
border-radius: 1.2rem;
|
|
44
|
+
border: .1rem solid #E2E8F0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.showAuthorOnOneLine {
|
|
49
|
+
@include flex-align(center, space-between);
|
|
50
|
+
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
line-height: 22px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
gap: 0.8rem;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
border-radius: 10rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> div {
|
|
61
|
+
@include flex-align(flex-start, flex-start);
|
|
62
|
+
|
|
63
|
+
gap: 0.2rem;
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.cardTitle {
|
|
69
|
+
padding-top: 1.6rem;
|
|
70
|
+
color: var(--heading-base-color) !important;;
|
|
71
|
+
font-size: 2rem;
|
|
72
|
+
line-height: 2rem;
|
|
73
|
+
margin-bottom: 2.4rem !important;
|
|
74
|
+
margin-top: 0 !important;
|
|
75
|
+
text-transform: capitalize;
|
|
76
|
+
font-weight: bold
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.showAuthorBlock {
|
|
81
|
+
@include flex-align(center, flex-start);
|
|
82
|
+
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
line-height: 22px;
|
|
85
|
+
width: 100%;
|
|
86
|
+
gap: 0.5rem;
|
|
87
|
+
|
|
88
|
+
img {
|
|
89
|
+
border-radius: 10rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> div {
|
|
93
|
+
@include flex-align(flex-start, flex-start);
|
|
94
|
+
|
|
95
|
+
gap: 0.2rem;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
> span {
|
|
99
|
+
flex-grow: 1;
|
|
100
|
+
|
|
101
|
+
@include flex-align(flex-end, flex-end);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.authorImages {
|
|
107
|
+
position: relative;
|
|
108
|
+
flex-grow: 0 !important;
|
|
109
|
+
|
|
110
|
+
svg {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 1rem;
|
|
113
|
+
height: 1rem;
|
|
114
|
+
bottom: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
> img {
|
|
119
|
+
border: 0.1rem solid #ececec;
|
|
120
|
+
width: 4.8rem;
|
|
121
|
+
height: 4.8rem;
|
|
122
|
+
min-width: 4.8rem;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.authorContainer {
|
|
127
|
+
> p {
|
|
128
|
+
color: #515156;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
> a {
|
|
132
|
+
text-decoration: underline;
|
|
133
|
+
color: #000EEE;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
> span {
|
|
137
|
+
font-size: 1.4rem;
|
|
138
|
+
line-height: 2.2rem;
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
color: #1b1b1c;
|
|
141
|
+
text-align: right;
|
|
142
|
+
margin-left: auto;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TemplateSix from '.';
|
|
3
|
+
import { sampleOperatorCards } from '../../../../../../tests/factories/modules/matrix/card.factory';
|
|
4
|
+
import gameCardBgThumb from '../../../../../../storybook-images/game-card-bg-thumb.png';
|
|
5
|
+
|
|
6
|
+
const card = sampleOperatorCards.items[0];
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Theme/Modules/Cards/Game/Template Six',
|
|
10
|
+
component: TemplateSix,
|
|
11
|
+
argTypes: {
|
|
12
|
+
showAuthorAsLink: {
|
|
13
|
+
name: 'showAuthorAsLink',
|
|
14
|
+
type: { name: 'boolean', required: false },
|
|
15
|
+
defaultValue: true,
|
|
16
|
+
description: 'Show author as a link?',
|
|
17
|
+
},
|
|
18
|
+
hasVariableComponent: {
|
|
19
|
+
name: 'hasVariableComponent',
|
|
20
|
+
type: { name: 'boolean', required: false },
|
|
21
|
+
defaultValue: true,
|
|
22
|
+
description:
|
|
23
|
+
'if needs to show extra details, display them on a separate component at site level',
|
|
24
|
+
},
|
|
25
|
+
showDate: {
|
|
26
|
+
name: 'showDate',
|
|
27
|
+
type: { name: 'boolean', required: false },
|
|
28
|
+
defaultValue: true,
|
|
29
|
+
description: 'Show/hide date',
|
|
30
|
+
},
|
|
31
|
+
verifyIcon: {
|
|
32
|
+
name: 'verifyIcon',
|
|
33
|
+
type: { name: 'boolean', required: false },
|
|
34
|
+
defaultValue: false,
|
|
35
|
+
description: 'Show verify icon',
|
|
36
|
+
},
|
|
37
|
+
item: {
|
|
38
|
+
name: 'item',
|
|
39
|
+
type: { name: 'object', required: false },
|
|
40
|
+
defaultValue: null,
|
|
41
|
+
description: 'The card object.',
|
|
42
|
+
},
|
|
43
|
+
translations: {
|
|
44
|
+
name: 'translations',
|
|
45
|
+
type: { name: 'object', required: false },
|
|
46
|
+
defaultValue: {
|
|
47
|
+
play_now_slots: 'Play Slots LANG',
|
|
48
|
+
},
|
|
49
|
+
description: 'The translations object',
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const Template = (args) => (
|
|
55
|
+
<div
|
|
56
|
+
style={{
|
|
57
|
+
maxWidth: '30rem',
|
|
58
|
+
margin: '0 auto',
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
<TemplateSix {...args} />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
export const Default = Template.bind({});
|
|
65
|
+
Default.args = {
|
|
66
|
+
item: {
|
|
67
|
+
...card,
|
|
68
|
+
banner: '',
|
|
69
|
+
title: 'Wolf Gold',
|
|
70
|
+
author: {
|
|
71
|
+
name: 'Melissa Kruger',
|
|
72
|
+
profile_page_path: '/about-us/melissa-kruger',
|
|
73
|
+
image_alt: 'Melissa Kruger author at playcasino.co.za',
|
|
74
|
+
image: 'melissa-kruger.png',
|
|
75
|
+
},
|
|
76
|
+
relation: {
|
|
77
|
+
...card.relation,
|
|
78
|
+
game_provider: {
|
|
79
|
+
name: 'NetEnt',
|
|
80
|
+
path: 'netent-casinos',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
translations: {
|
|
85
|
+
play_now_slots: 'Play Slots LANG',
|
|
86
|
+
},
|
|
87
|
+
storybookImage: gameCardBgThumb,
|
|
88
|
+
page: {
|
|
89
|
+
reading_time: '5', // Add the reading_time value here (replace '5 mins' with the actual value)
|
|
90
|
+
},
|
|
91
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
7
|
+
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
8
|
+
import { formatDate } from '~helpers/date-time';
|
|
9
|
+
|
|
10
|
+
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
11
|
+
import styles from './template-five.module.scss';
|
|
12
|
+
|
|
13
|
+
const TemplateFive = ({
|
|
14
|
+
item,
|
|
15
|
+
width = 277,
|
|
16
|
+
height = 140,
|
|
17
|
+
showDate = false,
|
|
18
|
+
showAuthorAsLink = true,
|
|
19
|
+
verifyIcon = '',
|
|
20
|
+
showImageAsLink = false,
|
|
21
|
+
showByLabel = false
|
|
22
|
+
}) => {
|
|
23
|
+
const { title, path, relation, author } = item;
|
|
24
|
+
const date = item?.updated_at || item?.created_at;
|
|
25
|
+
const formatedDate = date && formatDate(date, 'DD.MM.YYYY', '/', 'en-GB');
|
|
26
|
+
|
|
27
|
+
const defaultImg = (
|
|
28
|
+
<LazyImage width={width} height={height} src="/images/default-article.jpg" alt={title} />
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const imageElement = (
|
|
32
|
+
<LazyImage
|
|
33
|
+
width={width}
|
|
34
|
+
height={height}
|
|
35
|
+
defaultImg={defaultImg}
|
|
36
|
+
src={relation ? imagePrettyUrl(relation?.logo?.filename, width, height) : undefined}
|
|
37
|
+
alt={title}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
return (
|
|
41
|
+
<div className={styles.article || ''}>
|
|
42
|
+
{showImageAsLink ? (
|
|
43
|
+
<Link
|
|
44
|
+
to={path}
|
|
45
|
+
className={`${styles.image || ''} article-card-gtm`}
|
|
46
|
+
aria-label={useTranslate(`ariaLabel-${title}Link`, `${title} Link`)}
|
|
47
|
+
>
|
|
48
|
+
{imageElement}
|
|
49
|
+
</Link>
|
|
50
|
+
) : (
|
|
51
|
+
<div className={styles.image || ''}>{imageElement}</div>
|
|
52
|
+
)}
|
|
53
|
+
<>
|
|
54
|
+
<Link to={path} className={styles?.cardTitle || ''}>
|
|
55
|
+
{title}
|
|
56
|
+
</Link>
|
|
57
|
+
{typeof author === 'object' && (
|
|
58
|
+
<div
|
|
59
|
+
className={styles?.showAuthorOnOneLine}
|
|
60
|
+
>
|
|
61
|
+
{!!author?.image && (
|
|
62
|
+
<div className={styles.authorImages}>
|
|
63
|
+
<LazyImage
|
|
64
|
+
alt={author?.name}
|
|
65
|
+
width={40}
|
|
66
|
+
height={40}
|
|
67
|
+
src={imagePrettyUrl(author?.image, 40, 40)}
|
|
68
|
+
/>
|
|
69
|
+
{verifyIcon && verifyIcon}
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
<div className={styles.authorContainer}>
|
|
73
|
+
{showByLabel && (
|
|
74
|
+
<p>
|
|
75
|
+
<span className={styles.byText}>{useTranslate('by', 'By')}</span>
|
|
76
|
+
</p>
|
|
77
|
+
)}
|
|
78
|
+
{showAuthorAsLink ? (
|
|
79
|
+
<Link to={author?.profile_page_path} title={author?.name}>
|
|
80
|
+
{author?.name}
|
|
81
|
+
</Link>
|
|
82
|
+
) : (
|
|
83
|
+
<span className={styles.authorName}>{author?.name}</span>
|
|
84
|
+
)}
|
|
85
|
+
{showDate && <span className={styles?.noLink || ''}>{formatedDate}</span>}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
</>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
TemplateFive.propTypes = {
|
|
95
|
+
item: PropTypes.shape({
|
|
96
|
+
author: PropTypes.shape({
|
|
97
|
+
name: PropTypes.string,
|
|
98
|
+
profile_page_path: PropTypes.string,
|
|
99
|
+
twitter_profile: PropTypes.string,
|
|
100
|
+
image: PropTypes.string,
|
|
101
|
+
}),
|
|
102
|
+
relation: PropTypes.shape({
|
|
103
|
+
logo: PropTypes.shape({
|
|
104
|
+
filename: PropTypes.string
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
title: PropTypes.string,
|
|
108
|
+
updated_at: PropTypes.string,
|
|
109
|
+
created_at: PropTypes.string,
|
|
110
|
+
path: PropTypes.string,
|
|
111
|
+
banner: PropTypes.string,
|
|
112
|
+
reading_time: PropTypes.string,
|
|
113
|
+
}).isRequired,
|
|
114
|
+
width: PropTypes.number,
|
|
115
|
+
height: PropTypes.number,
|
|
116
|
+
showDate: PropTypes.bool,
|
|
117
|
+
showAuthorAsLink: PropTypes.bool,
|
|
118
|
+
verifyIcon: PropTypes.string,
|
|
119
|
+
showImageAsLink: PropTypes.bool,
|
|
120
|
+
showByLabel: PropTypes.bool
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export default TemplateFive;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
.article {
|
|
2
|
+
width: 100%;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
background: var(--eeat-cards-background-color, #fff);
|
|
5
|
+
border-radius: var(--eeat-cards-border-radius, 1rem);
|
|
6
|
+
border: var(--eeat-cards-border, none);
|
|
7
|
+
box-shadow: 0 6px 8px -2px rgb(27 27 28 / 8%), 0 4px 4px -2px rgb(27 27 28 / 6%);
|
|
8
|
+
position: relative;
|
|
9
|
+
height: auto;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-rows: 14rem 1fr;
|
|
12
|
+
padding: 1.6rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cardContent {
|
|
16
|
+
@include flex-direction(column);
|
|
17
|
+
@include flex-align(flex-start, space-between);
|
|
18
|
+
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
> a {
|
|
22
|
+
margin-bottom: 3.2rem;
|
|
23
|
+
margin-top: 1.6rem;
|
|
24
|
+
|
|
25
|
+
span {
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
font-size: 2.4rem;
|
|
29
|
+
text-transform: capitalize;
|
|
30
|
+
color: #1c1a28;
|
|
31
|
+
display: flex;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.image {
|
|
37
|
+
height: 14rem;
|
|
38
|
+
|
|
39
|
+
img {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
border-radius: 1.2rem;
|
|
44
|
+
border: .1rem solid #E2E8F0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.showAuthorOnOneLine {
|
|
49
|
+
@include flex-align(center, space-between);
|
|
50
|
+
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
line-height: 22px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
gap: 0.8rem;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
border-radius: 10rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> div {
|
|
61
|
+
@include flex-align(flex-start, flex-start);
|
|
62
|
+
|
|
63
|
+
gap: 0.2rem;
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.cardTitle {
|
|
69
|
+
padding-top: 1.6rem;
|
|
70
|
+
color: var(--heading-base-color) !important;;
|
|
71
|
+
font-size: 2rem;
|
|
72
|
+
line-height: 2rem;
|
|
73
|
+
margin-bottom: 2.4rem !important;
|
|
74
|
+
margin-top: 0 !important;
|
|
75
|
+
text-transform: capitalize;
|
|
76
|
+
font-weight: bold
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.showAuthorBlock {
|
|
81
|
+
@include flex-align(center, flex-start);
|
|
82
|
+
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
line-height: 22px;
|
|
85
|
+
width: 100%;
|
|
86
|
+
gap: 0.5rem;
|
|
87
|
+
|
|
88
|
+
img {
|
|
89
|
+
border-radius: 10rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> div {
|
|
93
|
+
@include flex-align(flex-start, flex-start);
|
|
94
|
+
|
|
95
|
+
gap: 0.2rem;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
> span {
|
|
99
|
+
flex-grow: 1;
|
|
100
|
+
|
|
101
|
+
@include flex-align(flex-end, flex-end);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.authorImages {
|
|
107
|
+
position: relative;
|
|
108
|
+
flex-grow: 0 !important;
|
|
109
|
+
|
|
110
|
+
svg {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 1rem;
|
|
113
|
+
height: 1rem;
|
|
114
|
+
bottom: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
> img {
|
|
119
|
+
border: 0.1rem solid #ececec;
|
|
120
|
+
width: 4.8rem;
|
|
121
|
+
height: 4.8rem;
|
|
122
|
+
min-width: 4.8rem;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.authorContainer {
|
|
127
|
+
> p {
|
|
128
|
+
color: #515156;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
> a {
|
|
132
|
+
text-decoration: underline;
|
|
133
|
+
color: #000EEE;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
> span {
|
|
137
|
+
font-size: 1.4rem;
|
|
138
|
+
line-height: 2.2rem;
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
color: #1b1b1c;
|
|
141
|
+
text-align: right;
|
|
142
|
+
margin-left: auto;
|
|
143
|
+
}
|
|
144
|
+
}
|