gatsby-matrix-theme 40.0.21 → 40.0.23
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 +23 -0
- package/package.json +2 -2
- package/src/components/atoms/review-credits/index.js +12 -12
- package/src/components/atoms/review-credits/review-credits.module.scss +22 -22
- package/src/components/atoms/review-credits/review-credits.test.js +4 -7
- package/src/gatsby-core-theme/components/pages/body/index.js +5 -2
- package/storybook/public/{728.ae4470e4.iframe.bundle.js → 728.b88f76a4.iframe.bundle.js} +3 -3
- package/storybook/public/{728.ae4470e4.iframe.bundle.js.map → 728.b88f76a4.iframe.bundle.js.map} +1 -1
- package/storybook/public/778.aa77fac1.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/{main.845fe2d1.iframe.bundle.js → main.920d76a6.iframe.bundle.js} +1 -1
- package/storybook/public/project.json +1 -1
- package/storybook/public/{runtime~main.2fdfdc96.iframe.bundle.js → runtime~main.c1a7e72a.iframe.bundle.js} +1 -1
- package/storybook/public/778.65a1be79.iframe.bundle.js +0 -1
- /package/storybook/public/{728.ae4470e4.iframe.bundle.js.LICENSE.txt → 728.b88f76a4.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## [40.0.23](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v40.0.22...v40.0.23) (2024-05-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* content piepline ([5e67696](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5e6769610c57d6d1f6ea732222a3401abc14fb31))
|
|
7
|
+
* update core version ([58a6c36](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/58a6c36dc6fd22e44cf107b4db82157488317d14))
|
|
8
|
+
* update navigation and breadcrumbs to not show on responsible gambling page type ([fca1e7c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fca1e7c140dcccd8b6bcb9924a3b6a11b938d6c7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Merge branch 'tm-4238-pcsa-changes-to-rg-page' into 'master' ([24a834e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/24a834ee86b0be426f2cf78c823da3e813d8a0c7))
|
|
12
|
+
|
|
13
|
+
## [40.0.22](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v40.0.21...v40.0.22) (2024-04-30)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
* change link to author name only, remove arrow and fix test ([338157c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/338157cf18940acb8246ee586c24aaf208d756d5))
|
|
19
|
+
* set hide prefix as default ([2498496](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/249849657fdd21889a8a3cc07b4573c42339a0ac))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* Merge branch 'tm-4330-author-review-credits' into 'master' ([5dd707d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5dd707d8921e51a63d87159739654237bfaa93d6))
|
|
23
|
+
|
|
1
24
|
## [40.0.21](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v40.0.20...v40.0.21) (2024-04-29)
|
|
2
25
|
|
|
3
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "40.0.
|
|
3
|
+
"version": "40.0.23",
|
|
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": "30.1.
|
|
28
|
+
"gatsby-core-theme": "30.1.1",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/* eslint-disable arrow-body-style */
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
5
|
-
import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
|
|
6
4
|
import { IoOpenOutline } from '@react-icons/all-files/io5/IoOpenOutline';
|
|
7
5
|
import { formatDate } from '~helpers/date-time';
|
|
8
6
|
import { translate, imagePrettyUrl } from '~helpers/getters';
|
|
@@ -73,7 +71,7 @@ const ReviewCredits = ({
|
|
|
73
71
|
{(author || reviewer) && (
|
|
74
72
|
<div className={styles.people || ''}>
|
|
75
73
|
{author && (
|
|
76
|
-
<
|
|
74
|
+
<div className={`${styles.authorCommon || ''} ${styles.author}`}>
|
|
77
75
|
{authorImg && (
|
|
78
76
|
<LazyImage
|
|
79
77
|
alt={authorName}
|
|
@@ -83,20 +81,21 @@ const ReviewCredits = ({
|
|
|
83
81
|
src={imagePrettyUrl(authorImg, authorImageWidth, authorImageHeight)}
|
|
84
82
|
/>
|
|
85
83
|
)}
|
|
86
|
-
<div className={
|
|
84
|
+
<div className={styles.authorDataContainer}>
|
|
87
85
|
{showPrefix && (
|
|
88
86
|
<span className={`${styles.prefixCommon} ${styles.authorPrefix}`}>
|
|
89
87
|
{translate(translations, prefix, prefix) || getPrefixBasedOnPage}
|
|
90
88
|
</span>
|
|
91
89
|
)}
|
|
92
|
-
<
|
|
90
|
+
<Link to={authorLink} title={authorName} className={styles.authorName}>
|
|
91
|
+
{authorName}
|
|
92
|
+
</Link>
|
|
93
93
|
{showTitle && <span className={styles.authorTitle}>{authorTitle}</span>}
|
|
94
94
|
</div>
|
|
95
|
-
|
|
96
|
-
</Link>
|
|
95
|
+
</div>
|
|
97
96
|
)}
|
|
98
97
|
{reviewer && (
|
|
99
|
-
<
|
|
98
|
+
<div className={`${styles.authorCommon || ''} ${styles.reviewer}`}>
|
|
100
99
|
{reviewerImg && (
|
|
101
100
|
<LazyImage
|
|
102
101
|
alt={reviewerName}
|
|
@@ -106,7 +105,7 @@ const ReviewCredits = ({
|
|
|
106
105
|
src={imagePrettyUrl(reviewerImg, authorImageWidth, authorImageHeight)}
|
|
107
106
|
/>
|
|
108
107
|
)}
|
|
109
|
-
<div className={
|
|
108
|
+
<div className={styles.authorDataContainer}>
|
|
110
109
|
{showPrefix && (
|
|
111
110
|
<span className={`${styles.prefixCommon} ${styles.reviewerPrefix}`}>{`${translate(
|
|
112
111
|
translations,
|
|
@@ -114,7 +113,9 @@ const ReviewCredits = ({
|
|
|
114
113
|
'Fact checked by'
|
|
115
114
|
)}`}</span>
|
|
116
115
|
)}
|
|
117
|
-
<
|
|
116
|
+
<Link to={reviewerLink} title={reviewerName} className={styles.authorName}>
|
|
117
|
+
{reviewerName}
|
|
118
|
+
</Link>
|
|
118
119
|
{showTitle && (
|
|
119
120
|
<span className={styles.reviewerTitle}>
|
|
120
121
|
{showVerification && (
|
|
@@ -129,8 +130,7 @@ const ReviewCredits = ({
|
|
|
129
130
|
</span>
|
|
130
131
|
)}
|
|
131
132
|
</div>
|
|
132
|
-
|
|
133
|
-
</Link>
|
|
133
|
+
</div>
|
|
134
134
|
)}
|
|
135
135
|
</div>
|
|
136
136
|
)}
|
|
@@ -94,35 +94,35 @@
|
|
|
94
94
|
.people {
|
|
95
95
|
@include flex-direction(column);
|
|
96
96
|
gap: 0.8rem;
|
|
97
|
+
}
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
.authorCommon {
|
|
100
|
+
@include flex-align(center, center);
|
|
101
|
+
display: grid;
|
|
102
|
+
grid-template-columns: 4.8rem 1fr 2rem;
|
|
103
|
+
background: var(--review-credits-author-background-color, #ffffff);
|
|
104
|
+
padding: 0.6rem 0.8rem 0.6rem 0.6rem;
|
|
105
|
+
gap: 0.8rem;
|
|
106
|
+
border-radius: var(--review-credits-author-border-radius, 1.2rem);
|
|
107
|
+
border: var(--review-credits-author-border, var(--review-credits-border, none));
|
|
108
|
+
text-decoration: none;
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
> img {
|
|
111
|
+
border-radius: 10rem;
|
|
112
|
+
border: var(--review-credits-author-img-border, 1px solid #ececec);
|
|
113
|
+
}
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
> svg {
|
|
116
|
+
grid-column: 3;
|
|
117
|
+
fill: var(--review-credits-color, #64646d);
|
|
118
|
+
}
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
120
|
+
@include min(tablet) {
|
|
121
|
+
padding-right: 1.6rem;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
.authorDataContainer {
|
|
126
126
|
@include flex-direction(column);
|
|
127
127
|
@include flex-align(flex-start, space-between);
|
|
128
128
|
height: 100%;
|
|
@@ -135,8 +135,8 @@ describe('Author Component', () => {
|
|
|
135
135
|
const { container } = render(<Author author={authorData} reviewer={reviewerData} showPrefix />);
|
|
136
136
|
|
|
137
137
|
expect(container.querySelector('.author')).toBeTruthy();
|
|
138
|
-
expect(container.
|
|
139
|
-
expect(container.querySelector('.author
|
|
138
|
+
expect(container.querySelector('.author a')).toHaveTextContent('John Author');
|
|
139
|
+
expect(container.querySelector('.author a')).toHaveAttribute('href', '/john-author');
|
|
140
140
|
});
|
|
141
141
|
test('Show Reviewer data', () => {
|
|
142
142
|
reviewerData = {
|
|
@@ -147,11 +147,8 @@ describe('Author Component', () => {
|
|
|
147
147
|
const { container } = render(<Author author={authorData} reviewer={reviewerData} showPrefix />);
|
|
148
148
|
|
|
149
149
|
expect(container.querySelector('.reviewer')).toBeTruthy();
|
|
150
|
-
expect(container.
|
|
151
|
-
expect(container.querySelector('.reviewer').
|
|
152
|
-
'href',
|
|
153
|
-
'/jane-reviewer'
|
|
154
|
-
);
|
|
150
|
+
expect(container.querySelector('.reviewer a')).toHaveTextContent('Jane Reviewer');
|
|
151
|
+
expect(container.querySelector('.reviewer a')).toHaveAttribute('href', '/jane-reviewer');
|
|
155
152
|
});
|
|
156
153
|
test('No reading time or date', () => {
|
|
157
154
|
const { container } = render(<Author author={authorData} />);
|
|
@@ -28,6 +28,7 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], serverData }
|
|
|
28
28
|
|
|
29
29
|
const main = getBodySection('main');
|
|
30
30
|
const navigation = getBodySection('navigation');
|
|
31
|
+
const rgNavigation = getBodySection('rg_navigation');
|
|
31
32
|
const footer = getBodySection('footer');
|
|
32
33
|
|
|
33
34
|
const links = getBodySection('links');
|
|
@@ -46,17 +47,19 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], serverData }
|
|
|
46
47
|
|
|
47
48
|
const { template } = pageContext.page;
|
|
48
49
|
|
|
50
|
+
const isRGpage = template === 'responsible_gambling_guide';
|
|
51
|
+
|
|
49
52
|
const showExclusiveOperator = excOperator && pageType !== 'operator';
|
|
50
53
|
|
|
51
54
|
const popupData = pageContext?.marketSections?.popup?.modules?.find((m) => m.name === 'top_list');
|
|
52
55
|
|
|
53
56
|
return (
|
|
54
57
|
<>
|
|
55
|
-
{navigation && (
|
|
58
|
+
{(rgNavigation || navigation) && (
|
|
56
59
|
<Navigation
|
|
57
60
|
template={template}
|
|
58
61
|
pageContext={pageContext}
|
|
59
|
-
section={navigation}
|
|
62
|
+
section={isRGpage ? rgNavigation : navigation}
|
|
60
63
|
searchIcon="../../../../../../images/search.svg"
|
|
61
64
|
menu="main_menu"
|
|
62
65
|
options={{
|