gatsby-core-theme 2.0.5 → 2.0.9

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,70 @@
1
+ ## [2.0.9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.8...v2.0.9) (2022-01-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added translatable text in author ([8a3c5e5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8a3c5e5491f45077f7e97e869097cadbd30c719b))
7
+
8
+
9
+ ### Tests
10
+
11
+ * added sample data ([6d930cf](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6d930cfa577cd58a583594f64e7658a77ad4d6af))
12
+
13
+ ## [2.0.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.7...v2.0.8) (2022-01-03)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * add the deposit on the JSON for comparison tabel ([ba91365](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ba9136579c612069001b7db3ad776085d0f54b3a))
19
+ * configured author name to use span insstead of h3 ([a09a058](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a09a058d13a047e496ddad7f4b6c06d016ff3614))
20
+ * spotlight test ([26c38dc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/26c38dc9bdffa194bc7514b94245cdd0d9dd2be3))
21
+
22
+
23
+ ### Code Refactoring
24
+
25
+ * add index.html for demo site ([d409824](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d409824e054551ba933208e331062f068294eb0d))
26
+ * fix tests for head meta tags ([3c05e95](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3c05e956143f726615da87d2653a7248f65fba48))
27
+ * gray out stars of closed operators ([dc6a38c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dc6a38c1d4015e4a056db28a77247facf34c62b2))
28
+ * remove head charset meta tag ([c45f173](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c45f173ac56fca34cb294ebfd800d3a0730f8737))
29
+ * update conditional empty classes ([06b681d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/06b681d9cb0418dbab43016a777cc641a6f685b0))
30
+ * update conditional height/width on LazyLoad ([7ca4e13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7ca4e138fd1bc572dcfbe2ca153450f2525c2a87))
31
+ * update lazyLoad render component class for test ([fc2cac7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fc2cac7569a02979c2992fe6ee4950c5bace707b))
32
+ * update lazyLoad render component for test ([d442df1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d442df1dfff6f698f942e2e3b064935ee519f037))
33
+ * update lazyLoad render component to span for test ([64ddc5c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/64ddc5caadb0ae9301cab0b348a20e090c3cbced))
34
+ * update meta tags attributes in main html for demo ([aa1486b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/aa1486b4aa9f08da78d44788e831cf9591c20c8f))
35
+ * update search close icon to span ([cc0d1b4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cc0d1b4b553fff7ed03aa7dd598e6455b851a074))
36
+ * update slider container interact ([da08a28](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/da08a28a63ed389d3640fd5c8a72d3d2de4ab14d))
37
+
38
+
39
+ * Merge branch 'TM-2585-casino-comparison-module' into 'master' ([1fd52cc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1fd52cce08e66040dd84080a295230fee395dc86))
40
+ * Merge branch 'tm-2567-update-theme-for-w3-validator' into 'master' ([a6c9a9c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a6c9a9c85c56aff852b6feeb4d271848b5af7c72))
41
+ * Merge branch 'master' into TM-2585-casino-comparison-module ([fd0749b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fd0749b3a601eddb8946890f38d463bc02c7474d))
42
+ * Merge branch 'tm-2633-author-name' into 'master' ([2acc151](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/2acc151fadc9c34723660d2e349b890b72b08c30))
43
+ * Merge branch 'grayout-star-rating' into 'master' ([09920fa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/09920fa9bd32b315e7b15cdf9843c0999a47e80f))
44
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([33adc57](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/33adc57a13a9bfc33e3ee1b27360f11f41691550))
45
+ * Merge branch 'master' into tm-2633-author-name ([712e1c9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/712e1c9662d27c77ae4618d3f703c203e4821af9))
46
+ * Merge branch 'master' into tm-2633-author-name ([db8c180](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/db8c1805d4d2e25640214caad97a22d5d78fc4a0))
47
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([fb3a0fa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fb3a0fa2a3edec0de8bb58b21e758b8c1c82dd01))
48
+ * Merge branch 'master' into tm-2567-update-theme-for-w3-validator ([1e94ede](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1e94ede9bc51c2c6c43bb2d0ed55f08e37812523))
49
+
50
+ ## [2.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.6...v2.0.7) (2021-12-23)
51
+
52
+
53
+ ### Bug Fixes
54
+
55
+ * spotlight ([07c238b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/07c238b0003de01cd6adf2c2c16080f734dc2029))
56
+ * spotlight test ([e649604](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e649604c45d6064d29ba022ac59f71f04ad0ed4b))
57
+
58
+ ## [2.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.5...v2.0.6) (2021-12-22)
59
+
60
+
61
+ ### Bug Fixes
62
+
63
+ * spotlights component ([04bb5db](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/04bb5dbb2fd3ce69c511a99b16e7747dcdc7c3f6))
64
+
65
+
66
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/gatsby-themes ([c7653a6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c7653a6da041061559855106cd6dfa7f9581a2c7))
67
+
1
68
  ## [2.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v2.0.4...v2.0.5) (2021-12-22)
2
69
 
3
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "2.0.5",
3
+ "version": "2.0.9",
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}>
@@ -38,7 +38,7 @@ export default function AuthorBox({ author }) {
38
38
  target="_blank"
39
39
  rel="noreferrer"
40
40
  >
41
- Email
41
+ {translate(translations, 'email', 'Email')}
42
42
  </a>
43
43
  )}
44
44
  {author.personal_website && (
@@ -48,7 +48,7 @@ export default function AuthorBox({ author }) {
48
48
  target="_blank"
49
49
  rel="noreferrer"
50
50
  >
51
- Website
51
+ {translate(translations, 'website', 'Website')}
52
52
  </a>
53
53
  )}
54
54
  {author.additional_url && (
@@ -58,7 +58,7 @@ export default function AuthorBox({ author }) {
58
58
  target="_blank"
59
59
  rel="noreferrer"
60
60
  >
61
- Contact
61
+ {translate(translations, 'contact', 'Contact')}
62
62
  </a>
63
63
  )}
64
64
  </p>
@@ -18,7 +18,12 @@ const Spotlights = ({ module }) => {
18
18
  return (
19
19
  <>
20
20
  <span className={styles.itemImage}>
21
- <LazyImage alt={item.label || item?.link_text} src={imagePrettyUrl(img)} />
21
+ <LazyImage
22
+ width={100}
23
+ height={50}
24
+ alt={item.label || item?.link_text}
25
+ src={imagePrettyUrl(img)}
26
+ />
22
27
  </span>
23
28
  <div className={styles.content}>
24
29
  <span className={styles.label}>{item.label}</span>
@@ -29,7 +34,7 @@ const Spotlights = ({ module }) => {
29
34
  };
30
35
 
31
36
  return (
32
- <div className={styles.spotlightsContainer}>
37
+ <div className={`${styles.spotlightsContainer} ${module.style ? styles[module.style] : ''}`}>
33
38
  {show_read_more === '1' && (
34
39
  <div
35
40
  className={styles.spotlightstext}
@@ -63,7 +68,7 @@ const Spotlights = ({ module }) => {
63
68
 
64
69
  {mode === 'image_text' && (
65
70
  <div className={styles.body}>
66
- <p className={styles.text} dangerouslySetInnerHTML={{ __html: item.text }} />
71
+ <div className={styles.text} dangerouslySetInnerHTML={{ __html: item.text }} />
67
72
  {item.link.value && item.link.type === 'external' ? (
68
73
  <a
69
74
  href={item.link.value}
@@ -81,6 +86,7 @@ const Spotlights = ({ module }) => {
81
86
  <Button
82
87
  btnText={item.link_text ? item.link_text : 'Read More'}
83
88
  invertColors
89
+ className={styles.readMore}
84
90
  isAnchorLink
85
91
  isInternalLink={item.link.type !== 'external'}
86
92
  targetBlank={item.link.type === 'external'}
@@ -101,6 +107,7 @@ const Spotlights = ({ module }) => {
101
107
  };
102
108
  Spotlights.propTypes = {
103
109
  module: PropTypes.shape({
110
+ style: PropTypes.string,
104
111
  mode: PropTypes.oneOf(['image', 'icon', 'image_text']).isRequired,
105
112
  items: PropTypes.arrayOf(
106
113
  PropTypes.shape({
@@ -29,6 +29,7 @@
29
29
  width: 100%;
30
30
  height: 15rem;
31
31
  img {
32
+ width: auto;
32
33
  height: 100%;
33
34
  object-fit: cover;
34
35
  }
@@ -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}
@@ -183,6 +183,32 @@ export function getSampleOperatorCards(type) {
183
183
  'Great website and app design',
184
184
  'Wager-free free spins',
185
185
  ],
186
+ bonus: {
187
+ deposit_methods: [
188
+ {
189
+ logo_filename: 'apple.png',
190
+ },
191
+ {
192
+ logo_filename: 'visapng339205421f-original.png',
193
+ },
194
+ {
195
+ logo_filename: 'mastercard-logo.png',
196
+ },
197
+ ],
198
+ license_objects: [
199
+ {
200
+ logo_filename: 'mga-6.png',
201
+ },
202
+ ],
203
+ currencies: [
204
+ {
205
+ iso_code: 'ZAR',
206
+ },
207
+ {
208
+ iso_code: 'EUR',
209
+ },
210
+ ],
211
+ },
186
212
  },
187
213
  extra_fields: {
188
214
  card_background_image: '2831afbf54038c1266f8c7fbcff20857.png',
@@ -203,6 +229,26 @@ export function getSampleOperatorCards(type) {
203
229
  ribbon_color: '#FFC740',
204
230
  ribbon_text: 'Exclusive Bonus',
205
231
  },
232
+ bonus: {
233
+ deposit_methods: [
234
+ {
235
+ logo_filename: 'visapng339205421f-original.png',
236
+ },
237
+ {
238
+ logo_filename: 'mastercard-logo.png',
239
+ },
240
+ ],
241
+ license_objects: [
242
+ {
243
+ logo_filename: 'curacao-casino-license.png',
244
+ },
245
+ ],
246
+ currencies: [
247
+ {
248
+ iso_code: 'EUR',
249
+ },
250
+ ],
251
+ },
206
252
  selling_points: ['Over 1000 games', 'Loyalty Programme', 'Wager-free free spins'],
207
253
  },
208
254
  },
@@ -217,6 +263,32 @@ export function getSampleOperatorCards(type) {
217
263
  one_liner: '100% up to €500 + 400 spins',
218
264
  },
219
265
  },
266
+ bonus: {
267
+ deposit_methods: [
268
+ {
269
+ logo_filename: 'apple.png',
270
+ },
271
+ {
272
+ logo_filename: 'visapng339205421f-original.png',
273
+ },
274
+ ],
275
+ license_objects: [
276
+ {
277
+ logo_filename: 'mga-6.png',
278
+ },
279
+ {
280
+ logo_filename: 'curacao-casino-license.png',
281
+ },
282
+ ],
283
+ currencies: [
284
+ {
285
+ iso_code: 'GBP',
286
+ },
287
+ {
288
+ iso_code: 'EUR',
289
+ },
290
+ ],
291
+ },
220
292
  selling_points: ['Over 1000 games', 'Slick, modern interface'],
221
293
  },
222
294
  },