gatsby-core-theme 2.0.11 → 2.0.15

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,47 @@
1
+ ## [2.0.15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.14...v2.0.15) (2022-01-05)
2
+
3
+
4
+ ### Code Refactoring
5
+
6
+ * update gatsby-node.esm page config before create pages ([1363dd6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1363dd6897771e29e3efea3d5afe59399791ff77))
7
+ * update lazy picture, collapse component ([259fffb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/259fffbc988d2caf811a594fe72e53f89d3ad2d2))
8
+ * update meta viewport for accessibility score ([6b59e12](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6b59e12068194701c683ef555f5ba401eee1f3bf))
9
+ * update slider main class ([fb95afc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fb95afc7cfc1520d08fdad90dc38d4487fd2177a))
10
+
11
+
12
+ * Merge branch 'hotfix-update-page-obj-before-create' into 'master' ([a2526c6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a2526c6926702a7ae2e392052d3b5fb965c1a560))
13
+ * Merge branch 'tm-2567-update-theme-for-w3-validator' into 'master' ([42583d8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/42583d876f364761e8eaf5a480989998ea700cb5))
14
+
15
+ ## [2.0.14](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.13...v2.0.14) (2022-01-05)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * lazy image no script tag ([3b47ad0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3b47ad093423a1ef58cd0b9dfedee22f83367552))
21
+
22
+
23
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([a60dbce](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a60dbce4848d3446f115001b5fea0c4269c1a233))
24
+
25
+ ## [2.0.13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.12...v2.0.13) (2022-01-05)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * author box logo fix ([5b74a2b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5b74a2bac4f8dd9efbcc0d29b2b79d640fa26978))
31
+
32
+
33
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([5c6735b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5c6735b01212e5e414afebacfdf70d359d34ca84))
34
+
35
+ ## [2.0.12](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.11...v2.0.12) (2022-01-04)
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * ppc tournaments data ([d9e66e9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d9e66e953da58a4c31885edd305e75d8f4c5fa18))
41
+
42
+
43
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([9ef964b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9ef964bbe20b037026abfcbb3e0289703f81d501))
44
+
1
45
  ## [2.0.11](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.10...v2.0.11) (2022-01-04)
2
46
 
3
47
 
@@ -194,24 +194,17 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
194
194
  const processedPage = page;
195
195
  processedPage.preconnect_links = preconnectLinks;
196
196
 
197
- page.translations = {};
198
-
199
- if (hasArchiveModule(page)) {
200
- createArchivePage(page, marketSections, prefilledModules, createPage);
201
- return;
202
- }
203
-
204
- if (page.type === 'event' && !page.relation.event) {
205
- return;
206
- }
207
197
  siteSchema = response.schema[page['market_id']];
208
198
  authors = response.authors;
199
+
200
+ page.translations = {};
209
201
  // siteSchema and authors are added to page for schemaGenerator()
210
202
  page.siteSchema = siteSchema;
211
203
  page.authors = Object.keys(authors || {}).map((key) =>
212
204
  pick(authors[key], pickAuthorsPageKeys)
213
205
  );
214
- // Done for matrix-theme sites for placeholders auto update
206
+
207
+ // replacing meta placehoders with year, month, date, etc.
215
208
  page.meta_title =
216
209
  page.meta_title &&
217
210
  generateMetaString(page.meta_title, translations, {
@@ -225,6 +218,15 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
225
218
  siteTitle: page.title,
226
219
  });
227
220
 
221
+ if (hasArchiveModule(page)) {
222
+ createArchivePage(page, marketSections, prefilledModules, createPage);
223
+ return;
224
+ }
225
+
226
+ if (page.type === 'event' && !page.relation.event) {
227
+ return;
228
+ }
229
+
228
230
  const contextData = {
229
231
  page,
230
232
  marketSections,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "2.0.11",
3
+ "version": "2.0.15",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -19,6 +19,7 @@
19
19
  margin: 3rem 0 0.5rem 0;
20
20
  font-weight: bold;
21
21
  font-size: var(--h3-mobile-size);
22
+ color: var(--heading-base-color);
22
23
  }
23
24
  .title {
24
25
  margin-bottom: 2rem;
@@ -19,12 +19,15 @@ export default function AuthorBox({ author }) {
19
19
  <div className={styles.container}>
20
20
  <div className={styles.innerContainer}>
21
21
  <div className={styles.information}>
22
- <LazyImage
23
- src={author.image_object?.url}
24
- alt={author.image_alt}
25
- width={author.image_object?.width}
26
- height={author.image_object?.height}
27
- />
22
+ <div>
23
+ {' '}
24
+ <LazyImage
25
+ src={author.image_object?.url}
26
+ alt={author.image_alt}
27
+ width={author.image_object?.width}
28
+ height={author.image_object?.height}
29
+ />
30
+ </div>
28
31
  <span className={styles.name}>{author.name}</span>
29
32
  <p className={styles.title}>{author.author_title}</p>
30
33
  </div>
@@ -38,7 +38,7 @@ const Collapse = ({
38
38
 
39
39
  return (
40
40
  <div className={styles.collapseContainer}>
41
- <div className={`${maxHeightStyle !== 0 ? styles.active : ''}`}>
41
+ <div className={maxHeightStyle !== 0 ? styles.active : null}>
42
42
  {showButton && (
43
43
  <button
44
44
  type="button"
@@ -52,7 +52,7 @@ const Collapse = ({
52
52
  )}
53
53
  <div
54
54
  ref={contentRef}
55
- className={`${showButton ? styles.content : ''}`}
55
+ className={showButton ? styles.content : null}
56
56
  style={showButton ? { maxHeight: maxHeightStyle } : {}}
57
57
  >
58
58
  {contentText}
@@ -31,9 +31,6 @@
31
31
  p {
32
32
  color: var(--color-22);
33
33
  }
34
- .label {
35
- font-size: bold;
36
- }
37
34
  .value {
38
35
  font-weight: 400;
39
36
  }
@@ -198,7 +198,7 @@ function Slider({
198
198
  onKeyDown: () => arrowHandler('next'),
199
199
  disabled: Math.abs(state.slideIndex) === state.length - 1 && true,
200
200
  })}
201
- <div className={`${styles.sliderContent}`} style={style} ref={sliderContentRef}>
201
+ <div className={styles.sliderContent} style={style} ref={sliderContentRef}>
202
202
  {children.map((slide, index) => (
203
203
  <div
204
204
  // eslint-disable-next-line react/no-array-index-key
@@ -55,7 +55,7 @@ function updateSchedule(schedule) {
55
55
 
56
56
  return Object.keys(schedule).reduce((acc, key) => {
57
57
  const { tournaments } = schedule[key] || {};
58
- if (!tournaments && ['soccer', 'handball', 'tennis', 'cricket'].includes(key)) {
58
+ if (!tournaments && ['soccer', 'handball', 'tennis', 'cricket', 'darts'].includes(key)) {
59
59
  const value = updateSchedule(schedule[key]);
60
60
  acc[key] = value;
61
61
  return acc;
@@ -23,21 +23,33 @@ export default function LazyImage({
23
23
  if (!isNativeImageLazyLoadingSupported()) {
24
24
  const LazyLoad = loadable(() => import(`react-lazyload`));
25
25
  return (
26
- <LazyLoad
27
- height={height ? `${height}px` : null}
28
- width={width ? `${width}px` : null}
29
- placeholder={<span className="lazyload-placeholder" />}
30
- debounce={0}
31
- >
32
- <img
33
- src={src}
34
- className={className}
35
- height={height}
36
- width={width}
37
- alt={alt}
38
- style={style}
39
- />
40
- </LazyLoad>
26
+ <>
27
+ <LazyLoad
28
+ height={height ? `${height}px` : null}
29
+ width={width ? `${width}px` : null}
30
+ placeholder={<span className="lazyload-placeholder" />}
31
+ debounce={0}
32
+ >
33
+ <img
34
+ src={src}
35
+ className={className}
36
+ height={height}
37
+ width={width}
38
+ alt={alt}
39
+ style={style}
40
+ />
41
+ </LazyLoad>
42
+ <noscript>
43
+ <img
44
+ src={src}
45
+ className={className}
46
+ height={height}
47
+ width={width}
48
+ alt={alt}
49
+ style={style}
50
+ />
51
+ </noscript>
52
+ </>
41
53
  );
42
54
  }
43
55
 
@@ -19,7 +19,13 @@ export default function LazyPicture({
19
19
  mobileBreakpoint = '768',
20
20
  }) {
21
21
  return (
22
- <LazyLoad height={`${height}px`} width={`${width}px`} offset={offset} debounce={0}>
22
+ <LazyLoad
23
+ height={height ? `${height}px` : null}
24
+ width={width ? `${width}px` : null}
25
+ placeholder={<span className="lazyload-placeholder" />}
26
+ offset={offset}
27
+ debounce={0}
28
+ >
23
29
  <picture className={className}>
24
30
  {webp && <source srcSet={webp} type="image/webp" />}
25
31
  {mobileSrc && desktopSrc && (