gatsby-core-theme 2.0.14 → 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,17 @@
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
+
1
15
  ## [2.0.14](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.13...v2.0.14) (2022-01-05)
2
16
 
3
17
 
@@ -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.14",
3
+ "version": "2.0.15",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -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
@@ -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 && (