gatsby-core-theme 2.0.7 → 2.0.8

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,40 @@
1
+ ## [2.0.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.7...v2.0.8) (2022-01-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add the deposit on the JSON for comparison tabel ([ba91365](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ba9136579c612069001b7db3ad776085d0f54b3a))
7
+ * configured author name to use span insstead of h3 ([a09a058](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a09a058d13a047e496ddad7f4b6c06d016ff3614))
8
+ * spotlight test ([26c38dc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/26c38dc9bdffa194bc7514b94245cdd0d9dd2be3))
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * add index.html for demo site ([d409824](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d409824e054551ba933208e331062f068294eb0d))
14
+ * fix tests for head meta tags ([3c05e95](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3c05e956143f726615da87d2653a7248f65fba48))
15
+ * gray out stars of closed operators ([dc6a38c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dc6a38c1d4015e4a056db28a77247facf34c62b2))
16
+ * remove head charset meta tag ([c45f173](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c45f173ac56fca34cb294ebfd800d3a0730f8737))
17
+ * update conditional empty classes ([06b681d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/06b681d9cb0418dbab43016a777cc641a6f685b0))
18
+ * update conditional height/width on LazyLoad ([7ca4e13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7ca4e138fd1bc572dcfbe2ca153450f2525c2a87))
19
+ * update lazyLoad render component class for test ([fc2cac7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fc2cac7569a02979c2992fe6ee4950c5bace707b))
20
+ * update lazyLoad render component for test ([d442df1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d442df1dfff6f698f942e2e3b064935ee519f037))
21
+ * update lazyLoad render component to span for test ([64ddc5c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/64ddc5caadb0ae9301cab0b348a20e090c3cbced))
22
+ * update meta tags attributes in main html for demo ([aa1486b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/aa1486b4aa9f08da78d44788e831cf9591c20c8f))
23
+ * update search close icon to span ([cc0d1b4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cc0d1b4b553fff7ed03aa7dd598e6455b851a074))
24
+ * update slider container interact ([da08a28](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/da08a28a63ed389d3640fd5c8a72d3d2de4ab14d))
25
+
26
+
27
+ * Merge branch 'TM-2585-casino-comparison-module' into 'master' ([1fd52cc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1fd52cce08e66040dd84080a295230fee395dc86))
28
+ * Merge branch 'tm-2567-update-theme-for-w3-validator' into 'master' ([a6c9a9c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a6c9a9c85c56aff852b6feeb4d271848b5af7c72))
29
+ * Merge branch 'master' into TM-2585-casino-comparison-module ([fd0749b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fd0749b3a601eddb8946890f38d463bc02c7474d))
30
+ * Merge branch 'tm-2633-author-name' into 'master' ([2acc151](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2acc151fadc9c34723660d2e349b890b72b08c30))
31
+ * Merge branch 'grayout-star-rating' into 'master' ([09920fa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/09920fa9bd32b315e7b15cdf9843c0999a47e80f))
32
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([33adc57](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/33adc57a13a9bfc33e3ee1b27360f11f41691550))
33
+ * Merge branch 'master' into tm-2633-author-name ([712e1c9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/712e1c9662d27c77ae4618d3f703c203e4821af9))
34
+ * Merge branch 'master' into tm-2633-author-name ([db8c180](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/db8c1805d4d2e25640214caad97a22d5d78fc4a0))
35
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([fb3a0fa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fb3a0fa2a3edec0de8bb58b21e758b8c1c82dd01))
36
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([1e94ede](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1e94ede9bc51c2c6c43bb2d0ed55f08e37812523))
37
+
1
38
  ## [2.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.6...v2.0.7) (2021-12-23)
2
39
 
3
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -16,7 +16,9 @@
16
16
  border-radius: 50%;
17
17
  }
18
18
  .name {
19
- margin: 3rem 0 .5rem 0;
19
+ margin: 3rem 0 0.5rem 0;
20
+ font-weight: bold;
21
+ font-size: var(--h3-mobile-size);
20
22
  }
21
23
  .title {
22
24
  margin-bottom: 2rem;
@@ -34,7 +36,7 @@
34
36
  color: var(--text-link-color);
35
37
  order: 2;
36
38
  a {
37
- padding: 0 .5rem;
39
+ padding: 0 0.5rem;
38
40
  line-height: 1.5rem;
39
41
  &:hover {
40
42
  text-decoration: underline;
@@ -47,7 +49,7 @@
47
49
  .socialIcons {
48
50
  order: 3;
49
51
  svg {
50
- margin: 0 .3rem;
52
+ margin: 0 0.3rem;
51
53
  }
52
54
  }
53
55
  .biography {
@@ -59,9 +61,9 @@
59
61
  }
60
62
  .button {
61
63
  border: 2px solid var(--color-3);
62
- padding: .8rem 3rem;
64
+ padding: 0.8rem 3rem;
63
65
  color: var(--color-3);
64
- border-radius: .5rem;
66
+ border-radius: 0.5rem;
65
67
  font-weight: bold;
66
68
  margin-top: 2rem;
67
69
  &:hover {
@@ -89,4 +91,4 @@
89
91
  }
90
92
  }
91
93
  }
92
- }
94
+ }
@@ -25,7 +25,7 @@ export default function AuthorBox({ author }) {
25
25
  width={author.image_object?.width}
26
26
  height={author.image_object?.height}
27
27
  />
28
- <h3 className={styles.name}>{author.name}</h3>
28
+ <span className={styles.name}>{author.name}</span>
29
29
  <p className={styles.title}>{author.author_title}</p>
30
30
  </div>
31
31
  <div className={styles.description}>
@@ -12,7 +12,7 @@ describe('Spotlights Component', () => {
12
12
  expect(container.querySelector('div.spotlightstext')).toBeTruthy();
13
13
  expect(container.querySelector('ul.image_text')).toBeTruthy();
14
14
  expect(container.querySelectorAll('li.spotlightItem')).toHaveLength(4);
15
- expect(container.querySelectorAll('p.text')).toHaveLength(4);
15
+ expect(container.querySelectorAll('div.text')).toHaveLength(4);
16
16
  expect(container.querySelectorAll('.readMore')).toHaveLength(4);
17
17
  expect(container.querySelectorAll('.label')).toHaveLength(4);
18
18
  expect(container.querySelectorAll('.itemImage')).toHaveLength(4);
@@ -198,14 +198,7 @@ function Slider({
198
198
  onKeyDown: () => arrowHandler('next'),
199
199
  disabled: Math.abs(state.slideIndex) === state.length - 1 && true,
200
200
  })}
201
- <div
202
- tabIndex="0"
203
- role="button"
204
- className={`${styles.sliderContent}`}
205
- style={style}
206
- ref={sliderContentRef}
207
- aria-label="Slider Content Button"
208
- >
201
+ <div className={`${styles.sliderContent}`} style={style} ref={sliderContentRef}>
209
202
  {children.map((slide, index) => (
210
203
  <div
211
204
  // eslint-disable-next-line react/no-array-index-key
@@ -5,7 +5,7 @@ import styles from './star-rating.module.scss';
5
5
  import keygen from '~helpers/keygen';
6
6
  import { getRating } from '~helpers/rating';
7
7
 
8
- const StarRating = ({ numOfStars, rating, halfStars = true }) => {
8
+ const StarRating = ({ numOfStars, rating, halfStars = true, active = true }) => {
9
9
  const renderFarm = () => {
10
10
  const output = [];
11
11
  const rate = getRating(rating);
@@ -35,7 +35,9 @@ const StarRating = ({ numOfStars, rating, halfStars = true }) => {
35
35
  };
36
36
  return (
37
37
  <LazyLoad>
38
- <div className={styles.starRatingContainer}>{renderFarm()}</div>
38
+ <div className={`${styles.starRatingContainer} ${!active && styles.inactive}`}>
39
+ {renderFarm()}
40
+ </div>
39
41
  </LazyLoad>
40
42
  );
41
43
  };
@@ -44,6 +46,7 @@ StarRating.propTypes = {
44
46
  numOfStars: PropTypes.oneOf([5, 10]).isRequired,
45
47
  rating: PropTypes.oneOfType([PropTypes.array, PropTypes.number, PropTypes.string]).isRequired,
46
48
  halfStars: PropTypes.bool,
49
+ active: PropTypes.bool,
47
50
  };
48
51
 
49
52
  export default StarRating;
@@ -19,4 +19,14 @@
19
19
  .emptyStar{
20
20
  @include star(var(--empty-star-border-color), var(--empty-star-fill-color))
21
21
  }
22
+
23
+ &.inactive {
24
+ .fullStar{
25
+ @include star(var(--empty-star-border-color), var(--empty-star-border-color))
26
+ }
27
+
28
+ .halfStar{
29
+ @include half-star(var(--empty-star-border-color), var(--empty-star-border-color), var(--halfEmpty-star-fill-color))
30
+ }
31
+ }
22
32
  }
@@ -51,7 +51,7 @@ const Sticky = ({
51
51
  !isScrolled && showOnScroll ? styles.notScrolled : ''
52
52
  } ${className}`}
53
53
  >
54
- <div className={!fullWidth ? styles.container : ''}>{children}</div>
54
+ <div className={!fullWidth ? styles.container : null}>{children}</div>
55
55
  </div>
56
56
  );
57
57
  };
@@ -58,10 +58,10 @@ describe('Head Component', () => {
58
58
  expect(document.title).toEqual('my meta title');
59
59
  expect(document.documentElement.lang).toEqual('en');
60
60
  expect(document.querySelectorAll('link[rel=preconnect]')).toHaveLength(3);
61
- expect(document.getElementsByTagName('meta')[1].getAttribute('content')).toEqual(
61
+ expect(document.getElementsByTagName('meta')[0].getAttribute('content')).toEqual(
62
62
  'my meta description'
63
63
  );
64
- expect(document.getElementsByTagName('meta')[2].getAttribute('content')).toEqual(
64
+ expect(document.getElementsByTagName('meta')[1].getAttribute('content')).toEqual(
65
65
  'one,two,three'
66
66
  );
67
67
 
@@ -42,7 +42,6 @@ const Head = ({ page = {}, siteInfo }) => {
42
42
  // When google re-indexes dev NSA and IRL, remove lines 28, 41, 42, 43 and process.env.GATSBY_ACTIVE_ENV !== 'development' from lines 24, 25, 27, 29, 43
43
43
  return (
44
44
  <Helmet>
45
- <meta charSet="utf-8" />
46
45
  <title>{page.meta_title}</title>
47
46
  <html lang={getLanguage(page.language)} />
48
47
  <meta name="description" content={page.meta_description} />
@@ -52,7 +52,7 @@ const SearchForm = ({ className, searchIcon, iconWidth = 24, iconHeight = 24 })
52
52
  ) : (
53
53
  <img alt="search" src={searchIcon} width={iconWidth} height={iconHeight} />
54
54
  )}
55
- <div className={styles.close} />
55
+ {styles.close && <span className={styles.close} />}
56
56
  </button>
57
57
  {showSearch && (
58
58
  <div
@@ -43,7 +43,7 @@ export default function List({
43
43
  <ul className={styles.list} key={keygen()}>
44
44
  {toplist.items.map((item, index) => (
45
45
  <li
46
- className={index + 1 <= initLoadItems ? styles.show : ''}
46
+ className={index + 1 <= initLoadItems ? styles.show : null}
47
47
  key={keygen()}
48
48
  ref={(el) => (elRefs.current[index] = el)}
49
49
  >
@@ -23,14 +23,13 @@ export function groupBy(list, keyName = 'author_id', single = false) {
23
23
  return newObj;
24
24
  }
25
25
 
26
- export function clonePageForCards(item) {
26
+ export function clonePageForCards(item, style) {
27
27
  const siteName = process.env.GATSBY_SITE_NAME;
28
28
  if (item.type === 'operator') {
29
29
  if (settings.delete_operator_software[siteName]) {
30
30
  delete item.relation.software;
31
31
  }
32
32
  }
33
-
34
33
  // remove unwanted sections
35
34
  if (settings.keep_sections[item.type] && settings.keep_sections[item.type][siteName]) {
36
35
  const keepSections = settings.keep_sections[item.type][siteName];
@@ -69,7 +68,7 @@ export function clonePageForCards(item) {
69
68
 
70
69
  const object = pick(item, pickPageKeys);
71
70
  object.relation = pick(item.relation, pickRelationKeys[item.type]);
72
- if (item.type === 'operator') {
71
+ if (item.type === 'operator' && style !== 'comparison_table') {
73
72
  delete object.relation.bonus.deposit_methods;
74
73
  }
75
74
 
@@ -179,7 +179,7 @@ export function processCardsV2(module, pagesCloned, pagesMappedById) {
179
179
  }
180
180
  }
181
181
  // modify page so it doesn't have too much data
182
- module.items = module.items.map((item) => clonePageForCards(cloneDeep(item)));
182
+ module.items = module.items.map((item) => clonePageForCards(cloneDeep(item), module.style));
183
183
  }
184
184
 
185
185
  export function processBonus(module, relations) {
@@ -23,7 +23,12 @@ export default function LazyImage({
23
23
  if (!isNativeImageLazyLoadingSupported()) {
24
24
  const LazyLoad = loadable(() => import(`react-lazyload`));
25
25
  return (
26
- <LazyLoad height={`${height}px`} width={`${width}px`} debounce={0}>
26
+ <LazyLoad
27
+ height={height ? `${height}px` : null}
28
+ width={width ? `${width}px` : null}
29
+ placeholder={<span className="lazyload-placeholder" />}
30
+ debounce={0}
31
+ >
27
32
  <img
28
33
  src={src}
29
34
  className={className}