gatsby-core-theme 8.0.10 → 8.0.13

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,31 @@
1
+ ## [8.0.13](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.12...v8.0.13) (2022-07-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * removed gtm on timeout ([d80c25c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d80c25c18a32c0d1cca37fb100fba78aa70ac7e5))
7
+
8
+ ## [8.0.12](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.11...v8.0.12) (2022-07-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * tracker content ([76f163f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/76f163f9ccb268b2f9eb217b343ec396800fd4c8))
14
+
15
+
16
+ * Merge branch 'tm-2929-tracker-content' into 'master' ([632ac8f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/632ac8fa2a80eefb6f9691fbf22cbd367ad92d6d))
17
+
18
+ ## [8.0.11](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.10...v8.0.11) (2022-07-22)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * default toplist row changes ([8de8355](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8de8355236c9d38c5888b8f7e6959950542b32ac))
24
+ * operator logo ([93e7021](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/93e70210ede704f43032021823030fe2c55cfa6d))
25
+
26
+
27
+ * Merge branch 'tm-2940-operator-logo' into 'master' ([b2b48ad](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b2b48ad6ce4dc3a80c63931e6fc5a5f47eb088ad))
28
+
1
29
  ## [8.0.10](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.9...v8.0.10) (2022-07-18)
2
30
 
3
31
 
package/gatsby-browser.js CHANGED
@@ -47,9 +47,9 @@ function initGTMOnEvent(event) {
47
47
  }
48
48
 
49
49
  exports.onClientEntry = () => {
50
- document.onreadystatechange = () => {
51
- if (document.readyState !== 'loading') setTimeout(initGTM, 4000);
52
- };
50
+ // document.onreadystatechange = () => {
51
+ // if (document.readyState !== 'loading') setTimeout(initGTM, 4000);
52
+ // };
53
53
 
54
54
  document.addEventListener('scroll', initGTMOnEvent);
55
55
  document.addEventListener('mousemove', initGTMOnEvent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "8.0.10",
3
+ "version": "8.0.13",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -1,6 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { MdCheck } from '@react-icons/all-files/md/MdCheck';
4
3
  import Bonus from '~atoms/bonus';
5
4
  import { Context } from '~context/TranslationsProvider';
6
5
  import SellingPoints from '~atoms/selling-points';
@@ -54,7 +53,7 @@ const Row = ({ item, oneliner = 'main', layout = 'list', tracker = 'main' }) =>
54
53
  <Bonus item={item} tracker={oneliner} />
55
54
  </a>
56
55
  <StarRating numOfStars={5} rating={itemRating} showLabel />
57
- <SellingPoints icon={<MdCheck />} sellingPoints={item.selling_points} />
56
+ <SellingPoints sellingPoints={item.selling_points} />
58
57
  <div>
59
58
  <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={item.review_link}>
60
59
  {`${translate(translations, 'read_review', 'Review')}`}
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Button from '~atoms/button';
4
4
  import LazyImage from '~hooks/lazy-image';
5
- import { prettyTracker } from '~helpers/getters';
5
+ import { prettyTracker, imagePrettyUrl, getAltText } from '~helpers/getters';
6
6
  import { generateTrackerLink } from '~helpers/generators';
7
7
  import { isMobileDevice } from '~helpers/device-detect';
8
8
  import styles from './tracker.module.scss';
@@ -19,6 +19,9 @@ const Tracker = ({
19
19
  logo = '../../../../../images/logo.svg',
20
20
  counter = false,
21
21
  isStory = false,
22
+ operatorLogo = false,
23
+ operatorLogoWidth = '80',
24
+ operatorLogoHeight = '80',
22
25
  }) => {
23
26
  const { operator } = pageContext;
24
27
 
@@ -88,6 +91,8 @@ const Tracker = ({
88
91
  background = <LazyImage className={styles.background} src={bgImage} alt="background image" />;
89
92
  }
90
93
 
94
+ const imageObject = operator?.standardised_logo_url_object || operator?.logo_url_object;
95
+
91
96
  return (
92
97
  <>
93
98
  {showSplashScreen && !isMobile && (
@@ -96,10 +101,23 @@ const Tracker = ({
96
101
  {background}
97
102
  <div className={styles.content}>
98
103
  <LazyImage alt="Site logo" src={logo} />
99
- <p className={styles.mainText}>{`${mainText.replace(
100
- '[operator_name]',
101
- operator.name
102
- )}`}</p>
104
+ <p
105
+ className={`${styles.mainText} ${operatorLogo && styles.mainTextWithlogo}`}
106
+ >{`${mainText.replace('[operator_name]', operator.name)}`}</p>
107
+ {operatorLogo && (
108
+ <LazyImage
109
+ src={imagePrettyUrl(
110
+ imageObject?.filename || operator?.logo_url,
111
+ operatorLogoWidth,
112
+ operatorLogoHeight
113
+ )}
114
+ alt={getAltText(imageObject, operator?.name)}
115
+ loading="eager"
116
+ width={operatorLogoWidth}
117
+ height={operatorLogoHeight}
118
+ className={styles.operatorlogo}
119
+ />
120
+ )}
103
121
  <div className={styles.bar} />
104
122
  {counter ? (
105
123
  redirectText
@@ -138,9 +156,15 @@ Tracker.propTypes = {
138
156
  counter: PropTypes.bool,
139
157
  redirectTimer: PropTypes.number,
140
158
  isStory: PropTypes.bool,
159
+ operatorLogo: PropTypes.bool,
160
+ operatorLogoWidth: PropTypes.string,
161
+ operatorLogoHeight: PropTypes.string,
141
162
  pageContext: PropTypes.shape({
142
163
  operator: PropTypes.shape({
143
164
  name: PropTypes.string,
165
+ standardised_logo_url_object: PropTypes.shape({}),
166
+ logo_url_object: PropTypes.shape({}),
167
+ logo_url: PropTypes.string,
144
168
  links: PropTypes.shape({
145
169
  main: PropTypes.string,
146
170
  terms_and_conditions: PropTypes.string,
@@ -50,6 +50,17 @@
50
50
  }
51
51
  }
52
52
 
53
+ .mainTextWithlogo {
54
+ margin: 2rem 0rem 1rem;
55
+ }
56
+
57
+ .operatorlogo {
58
+ width: 80px;
59
+ height: 80px;
60
+ object-fit: contain;
61
+ margin-bottom: 1rem;
62
+ }
63
+
53
64
  .bar {
54
65
  height: 0.8rem;
55
66
  background: #e1dbdb;