gatsby-core-theme 1.6.17 → 1.6.21
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 +52 -0
- package/gatsby-browser.js +1 -1
- package/gatsby-node.esm.js +9 -11
- package/package.json +1 -1
- package/src/components/atoms/menu/items/item/index.js +9 -1
- package/src/components/molecules/menu/index.js +6 -1
- package/src/components/molecules/slider/index.js +6 -6
- package/src/components/organisms/navigation/index.js +9 -1
- package/src/helpers/schedule.js +1 -6
- package/src/helpers/schema.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
## [1.6.21](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.20...v1.6.21) (2021-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* trackers ([5ad12eb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5ad12ebc2492172f7a94d680315f67b8e19fc4f9))
|
|
7
|
+
|
|
8
|
+
## [1.6.20](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.19...v1.6.20) (2021-12-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* close menu onclick a link ([ce4d9bb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ce4d9bbf8733bdbe3b09f7fd84226e6a084b42a7))
|
|
14
|
+
* implement for all core sites ([e5c46c0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e5c46c0bee4cf5555990d7c9c5d53bc43a2c6722))
|
|
15
|
+
* small issue ([30fd7e3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/30fd7e305935a00ec514321a5ca8e5a79545681c))
|
|
16
|
+
* small issue ([c1c29ce](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c1c29cedca7be589e2b3f23a7d25a399f1cb7ca5))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Code Refactoring
|
|
20
|
+
|
|
21
|
+
* add custom styles to menu ([f686a60](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f686a6059786b6c4f43cf24041f383a5bd19c0d7))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
* Merge branch 'tm-navigation-sticky' into 'master' ([0593868](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/05938683ca72db7677d3052f72fadbc26a2db613))
|
|
25
|
+
* Merge branch 'navigation-menu' into 'master' ([d812530](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d8125309b039694c6e35b54d3629134697b407f4))
|
|
26
|
+
|
|
27
|
+
## [1.6.19](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.18...v1.6.19) (2021-12-06)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Config
|
|
31
|
+
|
|
32
|
+
* removed minifier ([814cb53](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/814cb532146b2d4b71f8ab3878859520b29bf757))
|
|
33
|
+
|
|
34
|
+
## [1.6.18](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.17...v1.6.18) (2021-12-06)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* add watchfooty prefix ([d7111a7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d7111a754744f8c765d56a068bc323eefcf996c4))
|
|
40
|
+
* added passive scrolling ([9098cb7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9098cb715400f38035bf29f2dc597f24d2b62672))
|
|
41
|
+
* configured touch events to be passive and added minify plugin ([cb73f96](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cb73f96a89a5c2bc07f7a85cc3e3233876d987ff))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Code Refactoring
|
|
45
|
+
|
|
46
|
+
* update schema author url ([1cf3346](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1cf33462031e0d2cb540fcb9e6913a7cb5545f08))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
* Merge branch 'tm-2589-update-schema-author-url' into 'master' ([40e8dbc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/40e8dbc0f3263dcecf012bfc3b3aa800c1dc7aff))
|
|
50
|
+
* Merge branch 'add_timezone_prefix' into 'master' ([cf13fc6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cf13fc69d6c896a018d58e96c7d0fc6721d5aef7))
|
|
51
|
+
* Merge branch 'tm-2558-passive-scroll' into 'master' ([741fff3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/741fff36ba62eb4f0d1d76821581d46c0a266293))
|
|
52
|
+
|
|
1
53
|
## [1.6.17](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.16...v1.6.17) (2021-12-03)
|
|
2
54
|
|
|
3
55
|
|
package/gatsby-browser.js
CHANGED
|
@@ -53,5 +53,5 @@ exports.onClientEntry = () => {
|
|
|
53
53
|
|
|
54
54
|
document.addEventListener('scroll', initGTMOnEvent);
|
|
55
55
|
document.addEventListener('mousemove', initGTMOnEvent);
|
|
56
|
-
document.addEventListener('touchstart', initGTMOnEvent);
|
|
56
|
+
document.addEventListener('touchstart', initGTMOnEvent, { passive: true });
|
|
57
57
|
};
|
package/gatsby-node.esm.js
CHANGED
|
@@ -253,16 +253,6 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
const trackerPageObject = {
|
|
257
|
-
meta_title: 'Tracker',
|
|
258
|
-
template: 'tracker',
|
|
259
|
-
title: 'Tracker',
|
|
260
|
-
type: 'page',
|
|
261
|
-
language: languageKey,
|
|
262
|
-
path: '',
|
|
263
|
-
meta_robots: ['noindex', 'nofollow'],
|
|
264
|
-
};
|
|
265
|
-
|
|
266
256
|
// Operator tracker pages
|
|
267
257
|
if (page.type === 'operator') {
|
|
268
258
|
const operator = operators[page.relation_id];
|
|
@@ -272,7 +262,15 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
272
262
|
);
|
|
273
263
|
tracker.forEach((trackerPath) => {
|
|
274
264
|
// Create splash page
|
|
275
|
-
trackerPageObject
|
|
265
|
+
const trackerPageObject = {
|
|
266
|
+
meta_title: 'Tracker',
|
|
267
|
+
template: 'tracker',
|
|
268
|
+
title: 'Tracker',
|
|
269
|
+
type: 'page',
|
|
270
|
+
language: languageKey,
|
|
271
|
+
path: trackerPath,
|
|
272
|
+
meta_robots: ['noindex', 'nofollow'],
|
|
273
|
+
};
|
|
276
274
|
createPage({
|
|
277
275
|
path: trackerPath,
|
|
278
276
|
component: require.resolve('./src/components/app.js'),
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Link from '~hooks/link';
|
|
4
4
|
import useIsMobile from '~hooks/useIsMobile';
|
|
5
5
|
import ConditionalWrapper from '~atoms/conditional-wrapper';
|
|
6
6
|
import { imagePrettyUrl } from '~helpers/getters';
|
|
7
|
+
import { NavigationContext } from '~organisms/navigation/navigationContext';
|
|
7
8
|
|
|
8
9
|
import styles from './item.module.scss';
|
|
9
10
|
|
|
@@ -21,6 +22,8 @@ export default function Item({
|
|
|
21
22
|
const [active, setActive] = useState('');
|
|
22
23
|
const [opened, setOpened] = useState(false);
|
|
23
24
|
|
|
25
|
+
const { setShowMenu } = useContext(NavigationContext);
|
|
26
|
+
|
|
24
27
|
useEffect(() => {
|
|
25
28
|
const url = typeof window !== 'undefined' ? new URL(window.location.href) : '';
|
|
26
29
|
setActive(
|
|
@@ -28,6 +31,10 @@ export default function Item({
|
|
|
28
31
|
);
|
|
29
32
|
}, [active, item]);
|
|
30
33
|
|
|
34
|
+
const handleClose = () => {
|
|
35
|
+
setShowMenu(false);
|
|
36
|
+
};
|
|
37
|
+
|
|
31
38
|
const toggleDropDown = (e) => {
|
|
32
39
|
e.target.classList.toggle(styles.active);
|
|
33
40
|
setOpened(e.target.classList.contains(styles.active));
|
|
@@ -84,6 +91,7 @@ export default function Item({
|
|
|
84
91
|
title={item.title}
|
|
85
92
|
rel={item.nofollow && 'nofollow'}
|
|
86
93
|
aria-label={`${item?.title} link`}
|
|
94
|
+
onClick={handleClose}
|
|
87
95
|
>
|
|
88
96
|
<ItemImage />
|
|
89
97
|
{item.title}
|
|
@@ -27,6 +27,7 @@ const Menu = ({
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
gtmClass = '',
|
|
30
|
+
customStyles,
|
|
30
31
|
}) => {
|
|
31
32
|
let menuObject;
|
|
32
33
|
|
|
@@ -62,7 +63,10 @@ const Menu = ({
|
|
|
62
63
|
return (
|
|
63
64
|
<div className={styles.menuContainer}>
|
|
64
65
|
<MenuIcon onClick={handleMenuIconClick} gtmClass="main-menu-gtm" />
|
|
65
|
-
<ul
|
|
66
|
+
<ul
|
|
67
|
+
ref={menuListRef}
|
|
68
|
+
className={`${menuListClasses} ${showMenu && styles.show} ${styles[customStyles]}`}
|
|
69
|
+
>
|
|
66
70
|
{menuObject &&
|
|
67
71
|
menuObject.children.map((child) => {
|
|
68
72
|
return (
|
|
@@ -113,6 +117,7 @@ Menu.propTypes = {
|
|
|
113
117
|
}).isRequired,
|
|
114
118
|
menu: PropTypes.string.isRequired,
|
|
115
119
|
gtmClass: PropTypes.string,
|
|
120
|
+
customStyles: PropTypes.string,
|
|
116
121
|
};
|
|
117
122
|
|
|
118
123
|
export default Menu;
|
|
@@ -162,20 +162,20 @@ function Slider({
|
|
|
162
162
|
sliderContentNode.addEventListener('mousedown', mousedown);
|
|
163
163
|
document.addEventListener('mousemove', mouseMoveDebounce);
|
|
164
164
|
document.addEventListener('mouseup', mouseUpDebounce);
|
|
165
|
-
sliderContentNode.addEventListener('touchstart', mousedown);
|
|
166
|
-
sliderContentNode.addEventListener('touchmove', mouseMoveDebounce);
|
|
165
|
+
sliderContentNode.addEventListener('touchstart', mousedown, { passive: true });
|
|
166
|
+
sliderContentNode.addEventListener('touchmove', mouseMoveDebounce, { passive: true });
|
|
167
167
|
sliderContentNode.addEventListener('touchend', mouseUpDebounce);
|
|
168
|
-
sliderContainerRef.current.addEventListener('wheel', onWheel);
|
|
168
|
+
sliderContainerRef.current.addEventListener('wheel', onWheel, { passive: true });
|
|
169
169
|
|
|
170
170
|
return () => {
|
|
171
171
|
sliderContentNode?.removeEventListener('click', click);
|
|
172
172
|
sliderContentNode?.removeEventListener('mousedown', mousedown);
|
|
173
173
|
document.removeEventListener('mousemove', mouseMoveDebounce);
|
|
174
174
|
document.removeEventListener('mouseup', mouseUpDebounce);
|
|
175
|
-
sliderContentNode?.removeEventListener('touchstart', mousedown);
|
|
176
|
-
sliderContentNode?.removeEventListener('touchmove', mouseMoveDebounce);
|
|
175
|
+
sliderContentNode?.removeEventListener('touchstart', mousedown, { passive: true });
|
|
176
|
+
sliderContentNode?.removeEventListener('touchmove', mouseMoveDebounce, { passive: true });
|
|
177
177
|
sliderContentNode?.removeEventListener('touchend', mouseUpDebounce);
|
|
178
|
-
sliderContainerRef?.current?.removeEventListener('wheel', onWheel);
|
|
178
|
+
sliderContainerRef?.current?.removeEventListener('wheel', onWheel, { passive: true });
|
|
179
179
|
};
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -33,6 +33,7 @@ const Navigation = ({
|
|
|
33
33
|
},
|
|
34
34
|
sticky = true,
|
|
35
35
|
template,
|
|
36
|
+
customStyles,
|
|
36
37
|
}) => {
|
|
37
38
|
const navRef = useRef(React.createRef());
|
|
38
39
|
const showMenu = template !== 'ppc';
|
|
@@ -72,7 +73,13 @@ const Navigation = ({
|
|
|
72
73
|
</Link>
|
|
73
74
|
{showMenu && (
|
|
74
75
|
<>
|
|
75
|
-
<Menu
|
|
76
|
+
<Menu
|
|
77
|
+
section={section}
|
|
78
|
+
menu={menu}
|
|
79
|
+
options={options}
|
|
80
|
+
customStyles={customStyles}
|
|
81
|
+
gtmClass="main-menu-gtm"
|
|
82
|
+
/>
|
|
76
83
|
{hasSearch && <Search className={styles.search} searchIcon={searchIcon} />}
|
|
77
84
|
</>
|
|
78
85
|
)}
|
|
@@ -116,6 +123,7 @@ Navigation.propTypes = {
|
|
|
116
123
|
}),
|
|
117
124
|
}),
|
|
118
125
|
sticky: PropTypes.bool,
|
|
126
|
+
customStyles: PropTypes.string,
|
|
119
127
|
};
|
|
120
128
|
|
|
121
129
|
export default Navigation;
|
package/src/helpers/schedule.js
CHANGED
|
@@ -140,14 +140,9 @@ export function formatEvents(events) {
|
|
|
140
140
|
|
|
141
141
|
switch (siteName) {
|
|
142
142
|
case 'sefodbold.dk':
|
|
143
|
-
prefix = 1;
|
|
144
|
-
break;
|
|
145
143
|
case 'sesport.dk':
|
|
146
|
-
|
|
147
|
-
break;
|
|
144
|
+
case 'watchfooty.co.uk':
|
|
148
145
|
case 'bekijksport.nl':
|
|
149
|
-
prefix = 1;
|
|
150
|
-
break;
|
|
151
146
|
case 'livestreamsvoetbal.nl':
|
|
152
147
|
prefix = 1;
|
|
153
148
|
break;
|
package/src/helpers/schema.js
CHANGED
|
@@ -128,7 +128,7 @@ export function webPageSchema(page, pageImage) {
|
|
|
128
128
|
contactType: 'Author',
|
|
129
129
|
name: author.name || '',
|
|
130
130
|
email: author.email_address || '',
|
|
131
|
-
url:
|
|
131
|
+
url: getUrl(author.profile_page_path || '/'),
|
|
132
132
|
})),
|
|
133
133
|
sameAs: socialLinks
|
|
134
134
|
.map((socialLink) => page.siteSchema?.[socialLink])
|
|
@@ -216,7 +216,7 @@ export function templateSchemas(page) {
|
|
|
216
216
|
author: {
|
|
217
217
|
'@type': 'Person',
|
|
218
218
|
name: page.author?.name?.substring(0, 100),
|
|
219
|
-
url:
|
|
219
|
+
url: getUrl(page.author?.profile_page_path || '/'),
|
|
220
220
|
},
|
|
221
221
|
publisher: {
|
|
222
222
|
'@type': 'Organization',
|
|
@@ -247,7 +247,7 @@ export function templateSchemas(page) {
|
|
|
247
247
|
author: {
|
|
248
248
|
'@type': 'Person',
|
|
249
249
|
name: page.author?.name?.substring(0, 100),
|
|
250
|
-
url:
|
|
250
|
+
url: getUrl(page.author?.profile_page_path || '/'),
|
|
251
251
|
},
|
|
252
252
|
publisher: {
|
|
253
253
|
'@type': 'Organization',
|
|
@@ -289,7 +289,7 @@ export function templateSchemas(page) {
|
|
|
289
289
|
author: {
|
|
290
290
|
'@type': 'Person',
|
|
291
291
|
name: page.author?.name?.substring(0, 100),
|
|
292
|
-
url:
|
|
292
|
+
url: getUrl(page.author?.profile_page_path || '/'),
|
|
293
293
|
},
|
|
294
294
|
publisher: {
|
|
295
295
|
'@type': 'Organization',
|