gatsby-matrix-theme 51.0.2 → 51.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 +18 -0
- package/package.json +2 -2
- package/src/components/molecules/header/variants/default/template-two/template-two.test.js +2 -8
- package/src/gatsby-core-theme/components/molecules/header/header.module.scss +4 -0
- package/src/gatsby-core-theme/components/molecules/header/index.js +2 -2
- package/src/gatsby-core-theme/components/molecules/module/index.js +8 -3
- package/src/gatsby-core-theme/components/molecules/module/module.module.scss +21 -14
- package/storybook/public/{168.6cf2012c.iframe.bundle.js → 453.6bdb6c7f.iframe.bundle.js} +4 -4
- package/storybook/public/{168.6cf2012c.iframe.bundle.js.map → 453.6bdb6c7f.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.81c885e4.iframe.bundle.js +1 -0
- package/storybook/public/project.json +1 -1
- package/storybook/public/main.6c68b0dc.iframe.bundle.js +0 -1
- /package/storybook/public/{168.6cf2012c.iframe.bundle.js.LICENSE.txt → 453.6bdb6c7f.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [51.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v51.0.3...v51.0.4) (2024-09-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added admin feature ([7b043df](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7b043df83831e60610825392e8cd976aea5d9bd3))
|
|
7
|
+
* added admin feature ([e164e01](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e164e015674befd4ba0a9a0d6d6b921a5ad4d407))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
* Merge branch 'tm-4748-admin-bar' into 'master' ([98ef4c9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/98ef4c90fde0d0a7eb1926bca75d79a9ef7fc8ca))
|
|
11
|
+
|
|
12
|
+
## [51.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v51.0.2...v51.0.3) (2024-09-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* updated theme ([4ef3796](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4ef379613041942d60331ff3bbcd695463e9014b))
|
|
18
|
+
|
|
1
19
|
## [51.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v51.0.1...v51.0.2) (2024-09-05)
|
|
2
20
|
|
|
3
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "51.0.
|
|
3
|
+
"version": "51.0.4",
|
|
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": "39.0.
|
|
28
|
+
"gatsby-core-theme": "39.0.5",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
31
31
|
"prop-types": "15.7.2",
|
|
@@ -16,7 +16,6 @@ function renderComponent(pageData) {
|
|
|
16
16
|
return render(
|
|
17
17
|
<MainProvider
|
|
18
18
|
value={{
|
|
19
|
-
bannerIsActive: false,
|
|
20
19
|
cookieAccepted: true,
|
|
21
20
|
translations,
|
|
22
21
|
}}
|
|
@@ -32,10 +31,6 @@ beforeEach(() => {
|
|
|
32
31
|
data = getPageData();
|
|
33
32
|
});
|
|
34
33
|
describe('Show template two', () => {
|
|
35
|
-
test('render with props', () => {
|
|
36
|
-
const { container } = renderComponent(data);
|
|
37
|
-
expect(container.querySelector('.templateTwo')).toBeTruthy();
|
|
38
|
-
});
|
|
39
34
|
test('render without featured image', () => {
|
|
40
35
|
data.featured_image_object = null;
|
|
41
36
|
|
|
@@ -45,11 +40,11 @@ describe('Show template two', () => {
|
|
|
45
40
|
|
|
46
41
|
const { container } = renderComponent(data);
|
|
47
42
|
expect(container.querySelector('img')).toBeFalsy();
|
|
48
|
-
expect(container.querySelector('.blendColors')).
|
|
43
|
+
expect(container.querySelector('.blendColors')).toBeInTheDocument();
|
|
49
44
|
});
|
|
50
45
|
test('show correct oneLiner', () => {
|
|
51
46
|
const { container } = renderComponent(data);
|
|
52
|
-
expect(container.querySelector('.headerContainer').querySelector('h1')).
|
|
47
|
+
expect(container.querySelector('.headerContainer').querySelector('h1')).toBeInTheDocument();
|
|
53
48
|
expect(container.querySelector('.headerContainer').querySelector('h1').innerHTML).toBe(
|
|
54
49
|
getBonus('main', getExtraField(data?.extra_fields, 'operator'))
|
|
55
50
|
.one_liner.replace('+', '&')
|
|
@@ -70,7 +65,6 @@ describe('Show template two', () => {
|
|
|
70
65
|
func.isNativeImageLazyLoadingSupported = jest.fn(() => true);
|
|
71
66
|
const { container } = renderComponent(data);
|
|
72
67
|
|
|
73
|
-
expect(container.querySelector('img')).toBeTruthy();
|
|
74
68
|
expect(container.querySelector('img')).toHaveAttribute(
|
|
75
69
|
'src',
|
|
76
70
|
imagePrettyUrl(imgObj.filename, imgObj.width, imgObj.height)
|
|
@@ -13,7 +13,7 @@ import Verify from '~images/icons/verify';
|
|
|
13
13
|
import styles from './header.module.scss';
|
|
14
14
|
|
|
15
15
|
export default function Header({ section, numOfStarsRating = 5, showAuthor }) {
|
|
16
|
-
const {
|
|
16
|
+
const { admin } = useContext(Context) || {};
|
|
17
17
|
const customStyles = section.page.path === '/' ? 'homepage' : section.page.path.replace('/', '-');
|
|
18
18
|
const getDefaultHeader = () => {
|
|
19
19
|
let props = {
|
|
@@ -286,7 +286,7 @@ export default function Header({ section, numOfStarsRating = 5, showAuthor }) {
|
|
|
286
286
|
? styles[section?.page?.page_styles?.short_name] || ''
|
|
287
287
|
: ''
|
|
288
288
|
}
|
|
289
|
-
${
|
|
289
|
+
${admin ? styles.adminBar : ""}
|
|
290
290
|
${styles[customStyles] ? styles[customStyles] || '' : ''}
|
|
291
291
|
`}
|
|
292
292
|
>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
3
|
/* eslint-disable no-else-return */
|
|
4
|
-
import React, { lazy, Suspense } from 'react';
|
|
4
|
+
import React, { lazy, Suspense, useContext } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { anchorLink } from 'gatsby-core-theme/src/helpers/strings';
|
|
7
7
|
import { prettyTracker, getSectionExtraField } from 'gatsby-core-theme/src/helpers/getters';
|
|
8
8
|
import Content from 'gatsby-core-theme/src/components/molecules/content';
|
|
9
9
|
import Toplist from 'gatsby-core-theme/src/components/organisms/toplist';
|
|
10
10
|
import Anchor from 'gatsby-core-theme/src/components/organisms/anchor/template-one';
|
|
11
|
+
import { Context } from '~context/MainProvider.js';
|
|
11
12
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
12
13
|
import Cards from '../../../../components/organisms/cards';
|
|
13
14
|
import ModuleTitle from '../../atoms/module-title';
|
|
14
15
|
import InfoGrid from '../../../../components/atoms/info-grid/template-one';
|
|
15
16
|
import CountrySelector from '../../../../components/atoms/country-selector';
|
|
17
|
+
import AdminButton from '~atoms/admin/button';
|
|
16
18
|
import { getApiQueryParams } from '../../../helpers/sportstake';
|
|
17
19
|
import { removeSymbols } from '../../../../helpers/strings';
|
|
18
20
|
import { generateCustomHeadings } from '../../../helpers/lotto';
|
|
@@ -22,7 +24,7 @@ import styles from './module.module.scss';
|
|
|
22
24
|
const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
23
25
|
const { page } = pageContext;
|
|
24
26
|
const { siteSchema } = page || {};
|
|
25
|
-
|
|
27
|
+
const { admin } = useContext(Context) || {};
|
|
26
28
|
const socialIcons =
|
|
27
29
|
siteSchema &&
|
|
28
30
|
(({ instagram, facebook, twitter, linkedin, youtube }) => ({
|
|
@@ -343,7 +345,9 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
343
345
|
style={module.background_color && moduleBackgroundColor}
|
|
344
346
|
className={`${styles[moduleClassName] !== undefined ? styles[moduleClassName] || '' : ''} ${
|
|
345
347
|
module?.name || ''
|
|
346
|
-
} ${showModuleIntro ? '' : styles.noModuleIntro}
|
|
348
|
+
} ${showModuleIntro ? '' : styles.noModuleIntro}
|
|
349
|
+
${!showModuleIntro && module.name !== 'cards_v2' ? styles.noModuleIntroCards : ''}
|
|
350
|
+
${styles?.module || ''} ${
|
|
347
351
|
module?.style ? styles[module.style] || '' : ''
|
|
348
352
|
} module ${homepageFirstModule ? styles?.isHomepageFirstModule || '' : ''}`}
|
|
349
353
|
>
|
|
@@ -396,6 +400,7 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
396
400
|
/>
|
|
397
401
|
</Suspense>
|
|
398
402
|
)}
|
|
403
|
+
{admin && <AdminButton page={page} module={module} /> }
|
|
399
404
|
</div>
|
|
400
405
|
)
|
|
401
406
|
);
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
background-color: var(--module-background-color, #fff);
|
|
3
3
|
padding-bottom: var(--module-bottom-spacing);
|
|
4
4
|
scroll-margin-top: calc(var(--nav-height-mobile, 6rem) + var(--nav-anchor-height, 4rem));
|
|
5
|
+
|
|
5
6
|
@include min(laptop){
|
|
6
7
|
scroll-margin-top: calc(var(--nav-height-desktop, 8rem) + var(--nav-anchor-height, 4rem));
|
|
7
8
|
}
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
.widgetModule {
|
|
@@ -16,6 +19,7 @@
|
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
21
|
margin: 0 auto;
|
|
22
|
+
|
|
19
23
|
> h2 {
|
|
20
24
|
width: 100%;
|
|
21
25
|
}
|
|
@@ -24,6 +28,7 @@
|
|
|
24
28
|
.module_introduction {
|
|
25
29
|
font-weight: 400;
|
|
26
30
|
}
|
|
31
|
+
|
|
27
32
|
.cards_v2Module.template_two,
|
|
28
33
|
.cardsModule.template_two {
|
|
29
34
|
gap: 8rem;
|
|
@@ -31,7 +36,6 @@
|
|
|
31
36
|
padding: 0;
|
|
32
37
|
|
|
33
38
|
@include min(tablet) {
|
|
34
|
-
padding: 4rem 0 4rem 4rem;
|
|
35
39
|
display: grid;
|
|
36
40
|
grid-template-columns: 1fr 2fr;
|
|
37
41
|
justify-content: center;
|
|
@@ -53,23 +57,21 @@
|
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
> div {
|
|
60
|
+
margin: 0 !important;
|
|
61
|
+
padding: 0 !important;
|
|
62
|
+
|
|
56
63
|
@include min(desktop) {
|
|
57
64
|
max-width: 130rem !important;
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
> div:first-child {
|
|
63
|
-
> div {
|
|
64
|
-
margin: 0 !important;
|
|
65
|
-
padding: 0 !important;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
69
|
> div:last-of-type {
|
|
70
70
|
max-width: 100%;
|
|
71
71
|
flex-basis: 60%;
|
|
72
|
+
|
|
72
73
|
@include flex-direction(row);
|
|
74
|
+
|
|
73
75
|
overflow-x: auto;
|
|
74
76
|
|
|
75
77
|
&::-webkit-scrollbar {
|
|
@@ -77,6 +79,7 @@
|
|
|
77
79
|
width: 0.6rem;
|
|
78
80
|
display: none;
|
|
79
81
|
}
|
|
82
|
+
|
|
80
83
|
&::-webkit-scrollbar-track {
|
|
81
84
|
background: #bdc33f;
|
|
82
85
|
|
|
@@ -84,6 +87,7 @@
|
|
|
84
87
|
border-radius: 10rem;
|
|
85
88
|
}
|
|
86
89
|
}
|
|
90
|
+
|
|
87
91
|
&::-webkit-scrollbar-thumb {
|
|
88
92
|
background-color: #515156;
|
|
89
93
|
|
|
@@ -91,27 +95,26 @@
|
|
|
91
95
|
border-radius: 10rem;
|
|
92
96
|
}
|
|
93
97
|
}
|
|
98
|
+
|
|
94
99
|
@include min(tablet) {
|
|
95
|
-
padding: 2rem 0
|
|
100
|
+
padding: 2rem 0;
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
> div {
|
|
99
104
|
min-width: 29.6rem;
|
|
105
|
+
margin-right: 0.8rem;
|
|
100
106
|
|
|
101
107
|
@include min(tablet) {
|
|
102
108
|
min-width: 34.3rem;
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
|
-
|
|
106
|
-
> div {
|
|
107
|
-
margin-right: 0.8rem;
|
|
108
|
-
}
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
&.noModuleIntro {
|
|
112
114
|
@include flex-direction(column);
|
|
115
|
+
|
|
113
116
|
gap: 1.6rem;
|
|
114
|
-
padding: 4rem 0
|
|
117
|
+
padding: 4rem 0;
|
|
115
118
|
|
|
116
119
|
> div {
|
|
117
120
|
max-width: 130rem;
|
|
@@ -127,6 +130,7 @@
|
|
|
127
130
|
|
|
128
131
|
> div:last-of-type {
|
|
129
132
|
padding: 0 0 8rem 1.6rem;
|
|
133
|
+
|
|
130
134
|
&::-webkit-scrollbar {
|
|
131
135
|
display: none;
|
|
132
136
|
}
|
|
@@ -142,9 +146,12 @@
|
|
|
142
146
|
font-weight: 700;
|
|
143
147
|
line-height: 2.7rem;
|
|
144
148
|
text-transform: capitalize;
|
|
149
|
+
|
|
145
150
|
@include flex-align(center, flex-start);
|
|
151
|
+
|
|
146
152
|
color: #165AF8;
|
|
147
153
|
gap: .4rem;
|
|
154
|
+
|
|
148
155
|
svg{
|
|
149
156
|
margin-top: .2rem;
|
|
150
157
|
}
|