gatsby-matrix-theme 7.0.0 → 7.0.3
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 +42 -0
- package/package.json +2 -2
- package/src/gatsby-core-theme/components/atoms/author/author.module.scss +63 -4
- package/src/gatsby-core-theme/components/atoms/author/index.js +1 -1
- package/src/gatsby-core-theme/components/molecules/main/index.js +1 -1
- package/src/gatsby-core-theme/components/organisms/toplist/index.js +4 -1
- package/src/gatsby-core-theme/components/organisms/toplist/list/index.js +4 -0
- package/src/gatsby-core-theme/helpers/schema.js +6 -4
- package/src/hooks/tabs/index.js +29 -29
- package/src/hooks/tabs/tabs.module.scss +21 -6
- package/storybook/public/{152.6cc82cda.iframe.bundle.js → 152.4e420b8c.iframe.bundle.js} +3 -3
- package/storybook/public/{152.6cc82cda.iframe.bundle.js.LICENSE.txt → 152.4e420b8c.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/{152.6cc82cda.iframe.bundle.js.map → 152.4e420b8c.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## [7.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.0.2...v7.0.3) (2022-05-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* author box null check ([2b2352c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2b2352c71be0e9657cbfb4d9a4fdb36b72fc5550))
|
|
7
|
+
* breadcrumb schema ([0ceb45c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0ceb45c946e94f08831d2c35fe60f51dd50d956b))
|
|
8
|
+
|
|
9
|
+
## [7.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.0.1...v7.0.2) (2022-05-09)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* alignment for toplist tabs ([37c0f39](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/37c0f39a5e9d35bfff0a11c94d102793cfc38de4))
|
|
15
|
+
* moved tabs aboved module-introduction and fixed layout ([480edba](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/480edbaf6e1ed588923996e099fea31484d70a8c))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Code Refactoring
|
|
19
|
+
|
|
20
|
+
* author card alignment ([c856e84](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c856e84877e496b136fb13714c224c5f4894d3f1))
|
|
21
|
+
* theme styles to match IL ([8099473](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/80994733d4227f38f7999cea67654a70d6a783f4))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
* Merge branch 'tm-2689-include-a-paragraph-in-all-module' into 'master' ([0e3e26b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0e3e26b203a3b708834a5415253804c80c62f917))
|
|
25
|
+
* Merge branch 'tm-2801-fact-checker' into 'master' ([29ea252](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/29ea252b432f524a8592c339f2a870fbe483cab0))
|
|
26
|
+
|
|
27
|
+
## [7.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.0.0...v7.0.1) (2022-05-05)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* aded page path to toplist row ([0169dc1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0169dc16798874635f4cb61b708f68f2bd40b2a1))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Code Refactoring
|
|
36
|
+
|
|
37
|
+
* update nsa specific schema ([ee5bd71](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ee5bd7134baf71dc3aba62f8c833e4dbc7007933))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* Merge branch 'tm-2814-toplist-extra-prop' into 'master' ([78975b6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/78975b654605f831f78ecc0805d91a234a40a262))
|
|
41
|
+
* Merge branch 'tm-2708-update-nsa-specific-schema' into 'master' ([90821d2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/90821d27e7d8c218bee5c590a2dc997798f7912c))
|
|
42
|
+
|
|
1
43
|
# [7.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v6.0.7...v7.0.0) (2022-05-05)
|
|
2
44
|
|
|
3
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -29,7 +29,7 @@
|
|
|
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": "^7.0.
|
|
32
|
+
"gatsby-core-theme": "^7.0.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.13.1",
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
.authorWraper {
|
|
2
|
-
display:
|
|
3
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
4
|
align-items: center;
|
|
5
|
+
justify-content: flex-end;
|
|
5
6
|
font-size: var(--author-text-fontSize);
|
|
6
7
|
color: var(--author-primary-text-color);
|
|
8
|
+
max-width: 370px;
|
|
9
|
+
column-gap: 0.5rem;
|
|
10
|
+
|
|
11
|
+
> div {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: flex-end;
|
|
14
|
+
}
|
|
15
|
+
|
|
7
16
|
.infoContainer {
|
|
8
17
|
display: flex;
|
|
9
18
|
align-items: center;
|
|
10
19
|
white-space: nowrap;
|
|
20
|
+
order: 1;
|
|
21
|
+
flex: 1 1 auto;
|
|
22
|
+
|
|
11
23
|
.prefixStyle {
|
|
12
24
|
margin: 0px;
|
|
13
25
|
}
|
|
@@ -34,21 +46,64 @@
|
|
|
34
46
|
padding: 0px 2px;
|
|
35
47
|
}
|
|
36
48
|
}
|
|
49
|
+
|
|
50
|
+
@include max(mobile) {
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
37
53
|
}
|
|
38
54
|
.dateTimeWrapper {
|
|
39
55
|
display: flex;
|
|
40
56
|
align-items: center;
|
|
41
57
|
white-space: nowrap;
|
|
58
|
+
order: 4;
|
|
59
|
+
flex: 0 0 auto;
|
|
60
|
+
gap: 0.5rem;
|
|
61
|
+
|
|
42
62
|
.readingWithBorder {
|
|
43
63
|
&:before {
|
|
44
64
|
content: '|';
|
|
45
65
|
padding: 0px 3px;
|
|
46
66
|
}
|
|
47
67
|
}
|
|
68
|
+
|
|
69
|
+
@include max(mobile){
|
|
70
|
+
order: 2;
|
|
71
|
+
|
|
72
|
+
span {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.readingWithBorder {
|
|
79
|
+
order: 2;
|
|
80
|
+
flex: 0 0 auto;
|
|
81
|
+
gap: 0.5rem;
|
|
82
|
+
|
|
83
|
+
@include max(mobile){
|
|
84
|
+
order: 4;
|
|
85
|
+
}
|
|
48
86
|
}
|
|
49
87
|
|
|
50
|
-
|
|
51
|
-
|
|
88
|
+
.reviewer {
|
|
89
|
+
order: 3;
|
|
90
|
+
flex: 1 1 auto;
|
|
91
|
+
gap: 0.5rem;
|
|
92
|
+
|
|
93
|
+
> a {
|
|
94
|
+
color: var(--author-link-text-color);
|
|
95
|
+
font-weight: var(--author-fontweight);
|
|
96
|
+
text-decoration: underline;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include max(mobile) {
|
|
100
|
+
justify-content: flex-start;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@include max(mobile) {
|
|
105
|
+
max-width: 100%;
|
|
106
|
+
margin: 0.8rem 0 0.2rem;
|
|
52
107
|
}
|
|
53
108
|
}
|
|
54
109
|
|
|
@@ -58,6 +113,10 @@
|
|
|
58
113
|
justify-content: space-between;
|
|
59
114
|
color: var( --author-card-text-color);
|
|
60
115
|
|
|
116
|
+
.infoContainer {
|
|
117
|
+
justify-content: flex-start;
|
|
118
|
+
}
|
|
119
|
+
|
|
61
120
|
@include min(tablet){
|
|
62
121
|
display: flex;
|
|
63
122
|
justify-content: space-between;
|
|
@@ -27,7 +27,7 @@ const Main = ({ section = {}, pageContext = {}, showNewsletter = true }) => {
|
|
|
27
27
|
const NotFound = page.path.includes('404')
|
|
28
28
|
? loadable(() => import(`gatsby-core-theme/src/components/atoms/not-found`))
|
|
29
29
|
: null;
|
|
30
|
-
const AuthorBox = page.
|
|
30
|
+
const AuthorBox = page.author_id ? loadable(() => import(`~atoms/author-box`)) : null;
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<main className={styles.modulePage}>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/* eslint-disable react/forbid-prop-types */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
6
|
import keygen from '~helpers/keygen';
|
|
@@ -16,6 +18,7 @@ const TopList = ({ module, toplistHeading, CustomRow, page }) => {
|
|
|
16
18
|
<div label={toplist.title} key={keygen()}>
|
|
17
19
|
{toplistHeading}
|
|
18
20
|
<List
|
|
21
|
+
pagePath={page.path}
|
|
19
22
|
toplist={toplist}
|
|
20
23
|
CustomRow={Row}
|
|
21
24
|
hasLoadMoreButton={toplist.show_load_more}
|
|
@@ -37,7 +40,7 @@ TopList.propTypes = {
|
|
|
37
40
|
}),
|
|
38
41
|
toplistHeading: PropTypes.element,
|
|
39
42
|
CustomRow: PropTypes.func,
|
|
40
|
-
page: PropTypes.shape({ template: PropTypes.string }),
|
|
43
|
+
page: PropTypes.shape({ template: PropTypes.string, path: PropTypes.string }),
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
export default TopList;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-bind */
|
|
1
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
3
|
/* eslint-disable react/prop-types */
|
|
3
4
|
import React, { useRef, useContext } from 'react';
|
|
@@ -11,6 +12,7 @@ import Button from '~atoms/button';
|
|
|
11
12
|
import styles from './list.module.scss';
|
|
12
13
|
|
|
13
14
|
export default function List({
|
|
15
|
+
pagePath,
|
|
14
16
|
toplist,
|
|
15
17
|
CustomRow,
|
|
16
18
|
hasLoadMoreButton,
|
|
@@ -62,6 +64,7 @@ export default function List({
|
|
|
62
64
|
>
|
|
63
65
|
{CustomRow ? (
|
|
64
66
|
<CustomRow
|
|
67
|
+
pagePath={pagePath}
|
|
65
68
|
item={item}
|
|
66
69
|
tracker={toplist.tracker}
|
|
67
70
|
oneliner={toplist.one_liner}
|
|
@@ -92,6 +95,7 @@ export default function List({
|
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
List.propTypes = {
|
|
98
|
+
pagePath: PropTypes.string,
|
|
95
99
|
toplist: PropTypes.shape({
|
|
96
100
|
items: PropTypes.arrayOf(
|
|
97
101
|
PropTypes.shape({
|
|
@@ -56,6 +56,7 @@ export function breadcrumbsSchema({
|
|
|
56
56
|
const schema = {
|
|
57
57
|
'@context': 'https://schema.org',
|
|
58
58
|
'@type': 'BreadcrumbList',
|
|
59
|
+
'@id': `${getUrl(path)}#breadcrumblist`,
|
|
59
60
|
itemListElement: [
|
|
60
61
|
{
|
|
61
62
|
'@type': 'ListItem',
|
|
@@ -110,22 +111,23 @@ export function breadcrumbsSchema({
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
export function schemaGenerator(page = {}, pageImage) {
|
|
113
|
-
|
|
114
|
+
const isNSA = process.env.GATSBY_SITE_NAME === 'norskespilleautomater.com';
|
|
115
|
+
if (isNSA) {
|
|
114
116
|
page.knowsAbout = knowsAbout;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
// Temporary Change for removing webPageSchema
|
|
120
|
+
const hasWebPageSchema = (page.type !== 'operator' && page.type !== 'game') || isNSA;
|
|
118
121
|
const hasOrganisationSchema = page.path === '/' || page.path === 'about-us';
|
|
119
122
|
const jsonSchema = [
|
|
120
123
|
// Page Schema
|
|
121
124
|
page.seo_json_schema,
|
|
122
125
|
// Breadcrumbs Schema
|
|
123
126
|
page.breadcrumbs?.length ? breadcrumbsSchema(page) : null,
|
|
124
|
-
// Modules Schemas
|
|
125
|
-
// Temporary Change for removing webpageschema
|
|
126
127
|
hasWebPageSchema ? webPageSchema(page, pageImage) : null,
|
|
127
128
|
hasOrganisationSchema ? organizationSchema(page, pageImage) : null,
|
|
128
129
|
templateSchemas(page, pageImage),
|
|
130
|
+
// Modules Schemas
|
|
129
131
|
...(page.sections?.main?.modules
|
|
130
132
|
? moduleSchemas(page.sections.main.modules, page.path)
|
|
131
133
|
: [null]),
|
package/src/hooks/tabs/index.js
CHANGED
|
@@ -75,21 +75,15 @@ const Tabs = ({
|
|
|
75
75
|
|
|
76
76
|
if (module?.module_title_tag)
|
|
77
77
|
return (
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</CustomTag>
|
|
88
|
-
{module.module_introduction && (
|
|
89
|
-
// eslint-disable-next-line react/no-danger
|
|
90
|
-
<div dangerouslySetInnerHTML={{ __html: module?.module_introduction }} />
|
|
91
|
-
)}
|
|
92
|
-
</div>
|
|
78
|
+
<CustomTag className={styles.titleContainer}>
|
|
79
|
+
<div className={styles.title}>{module.module_title}</div>
|
|
80
|
+
{currentMonth ? (
|
|
81
|
+
<span className={styles.toplistDate}>
|
|
82
|
+
<small>•</small>
|
|
83
|
+
{`${currentMonth} ${year}`}
|
|
84
|
+
</span>
|
|
85
|
+
) : null}
|
|
86
|
+
</CustomTag>
|
|
93
87
|
);
|
|
94
88
|
return (
|
|
95
89
|
<span className={styles.noTag}>
|
|
@@ -111,20 +105,26 @@ const Tabs = ({
|
|
|
111
105
|
return (
|
|
112
106
|
<>
|
|
113
107
|
<div className={tabHeaderClass}>
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
108
|
+
<div className={styles.titleAndTab}>
|
|
109
|
+
{module.name === 'top_list' && getTitle(module)}
|
|
110
|
+
{TabList && (
|
|
111
|
+
<TabList
|
|
112
|
+
siteName={siteName}
|
|
113
|
+
title={title}
|
|
114
|
+
onClick={onClickTabItem}
|
|
115
|
+
items={children}
|
|
116
|
+
activeTab={activeTab}
|
|
117
|
+
activeTabClass={activeTabClass}
|
|
118
|
+
showAll={showAll}
|
|
119
|
+
alignRight={tabsAlign === 'right'}
|
|
120
|
+
module={module}
|
|
121
|
+
gtmClass={gtmClass}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
</div>
|
|
125
|
+
{module.module_introduction && (
|
|
126
|
+
// eslint-disable-next-line react/no-danger
|
|
127
|
+
<div dangerouslySetInnerHTML={{ __html: module?.module_introduction }} />
|
|
128
128
|
)}
|
|
129
129
|
{HeaderComp && <div className={styles.headerComp}>{HeaderComp}</div>}
|
|
130
130
|
</div>
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
margin-bottom: 2rem;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
.toplistDate{
|
|
31
|
+
.toplistDate {
|
|
32
32
|
color: var(--color-6);
|
|
33
33
|
font-weight: 300;
|
|
34
34
|
font-size: 1.4rem;
|
|
35
|
-
padding-left: .5rem;
|
|
35
|
+
padding-left: 0.5rem;
|
|
36
36
|
display: inline-block;
|
|
37
37
|
position: relative;
|
|
38
38
|
top: -4px;
|
|
39
|
-
small{
|
|
40
|
-
padding-right: .5rem;
|
|
39
|
+
small {
|
|
40
|
+
padding-right: 0.5rem;
|
|
41
41
|
font-size: 1.2rem;
|
|
42
42
|
font-weight: 400;
|
|
43
43
|
}
|
|
@@ -50,14 +50,15 @@
|
|
|
50
50
|
> div:first-child {
|
|
51
51
|
grid-column: 2;
|
|
52
52
|
}
|
|
53
|
-
@include min(laptop){
|
|
54
|
-
flex-direction: row;
|
|
53
|
+
@include min(laptop) {
|
|
54
|
+
// flex-direction: row;
|
|
55
55
|
align-items: center;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
> div:nth-child(2) {
|
|
59
59
|
grid-column: 1;
|
|
60
60
|
@include flex-align(center, flex-start);
|
|
61
|
+
display: block;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
@@ -66,6 +67,16 @@
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
.titleAndTab {
|
|
71
|
+
width: 100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.title {
|
|
77
|
+
margin: 2rem 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
.headerComp {
|
|
70
81
|
select {
|
|
71
82
|
margin: 2rem 0;
|
|
@@ -81,3 +92,7 @@
|
|
|
81
92
|
font-size: 1.6rem;
|
|
82
93
|
}
|
|
83
94
|
}
|
|
95
|
+
|
|
96
|
+
.titleContainer {
|
|
97
|
+
@include flex-align(center, center);
|
|
98
|
+
}
|