gatsby-core-theme 1.6.15 → 1.6.19
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
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
## [1.6.19](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.18...v1.6.19) (2021-12-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Config
|
|
5
|
+
|
|
6
|
+
* removed minifier ([814cb53](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/814cb532146b2d4b71f8ab3878859520b29bf757))
|
|
7
|
+
|
|
8
|
+
## [1.6.18](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.17...v1.6.18) (2021-12-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add watchfooty prefix ([d7111a7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d7111a754744f8c765d56a068bc323eefcf996c4))
|
|
14
|
+
* added passive scrolling ([9098cb7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9098cb715400f38035bf29f2dc597f24d2b62672))
|
|
15
|
+
* configured touch events to be passive and added minify plugin ([cb73f96](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cb73f96a89a5c2bc07f7a85cc3e3233876d987ff))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Code Refactoring
|
|
19
|
+
|
|
20
|
+
* update schema author url ([1cf3346](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1cf33462031e0d2cb540fcb9e6913a7cb5545f08))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
* Merge branch 'tm-2589-update-schema-author-url' into 'master' ([40e8dbc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/40e8dbc0f3263dcecf012bfc3b3aa800c1dc7aff))
|
|
24
|
+
* Merge branch 'add_timezone_prefix' into 'master' ([cf13fc6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cf13fc69d6c896a018d58e96c7d0fc6721d5aef7))
|
|
25
|
+
* Merge branch 'tm-2558-passive-scroll' into 'master' ([741fff3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/741fff36ba62eb4f0d1d76821581d46c0a266293))
|
|
26
|
+
|
|
27
|
+
## [1.6.17](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.16...v1.6.17) (2021-12-03)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Code Refactoring
|
|
31
|
+
|
|
32
|
+
* fix the getUrl build errors for rage sites ([7a56fcc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7a56fcc4ed6b84908b3c9cabc39871c8dd612ca0))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
* Merge branch 'fix_path_error' into 'master' ([cbaeb02](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cbaeb02080991a4bb2f0e6e3cd50f4d977169509))
|
|
36
|
+
|
|
37
|
+
## [1.6.16](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.15...v1.6.16) (2021-12-03)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* fix event hour format based on site name ([d1c275c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d1c275ccc5ed429f04208c1cf8ae4c5d4841aac7))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
* Merge branch 'format_event_hour' into 'master' ([1b8c999](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1b8c999064676973c55360cc04820f0be122496e))
|
|
46
|
+
|
|
1
47
|
## [1.6.15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v1.6.14...v1.6.15) (2021-12-02)
|
|
2
48
|
|
|
3
49
|
|
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/package.json
CHANGED
|
@@ -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
|
|
package/src/helpers/getters.js
CHANGED
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
filterEvents,
|
|
7
7
|
findTournaments,
|
|
8
8
|
getSortedEvents,
|
|
9
|
+
formatEvents,
|
|
9
10
|
} from '../schedule';
|
|
10
11
|
|
|
11
12
|
export function prepareSportsData(sportsData) {
|
|
13
|
+
sportsData.events = formatEvents(sportsData.events);
|
|
12
14
|
Object.keys(sportsData.tournaments).forEach((key) => {
|
|
13
15
|
if (sportsData.tournaments[key].events) {
|
|
14
16
|
sportsData.tournaments[key].events = filterEvents(
|
package/src/helpers/schedule.js
CHANGED
|
@@ -120,3 +120,39 @@ export function filterEvents(tournamentEvents, events) {
|
|
|
120
120
|
|
|
121
121
|
return futureEvents;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
export function changeEventHour(event, hour = 1) {
|
|
125
|
+
if (!event || !event.date || !event.date.time) {
|
|
126
|
+
return event;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const timeArr = event.date.time.split(':');
|
|
130
|
+
timeArr[0] = Number(timeArr[0]) - hour;
|
|
131
|
+
event.date.time = timeArr.join(':');
|
|
132
|
+
|
|
133
|
+
return event;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function formatEvents(events) {
|
|
137
|
+
const eventsArr = Object.values(events);
|
|
138
|
+
const siteName = process.env.GATSBY_SITE_NAME;
|
|
139
|
+
let prefix = '0';
|
|
140
|
+
|
|
141
|
+
switch (siteName) {
|
|
142
|
+
case 'sefodbold.dk':
|
|
143
|
+
case 'sesport.dk':
|
|
144
|
+
case 'watchfooty.co.uk':
|
|
145
|
+
case 'bekijksport.nl':
|
|
146
|
+
case 'livestreamsvoetbal.nl':
|
|
147
|
+
prefix = 1;
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
prefix = 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return eventsArr.reduce((acc, current) => {
|
|
154
|
+
const event = changeEventHour(current, prefix);
|
|
155
|
+
acc[event.id] = event;
|
|
156
|
+
return acc;
|
|
157
|
+
}, {});
|
|
158
|
+
}
|
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',
|