gatsby-core-theme 44.4.51 → 44.5.0-poc.1
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/.ci.yml +26 -0
- package/CHANGELOG.md +27 -123
- package/gatsby-browser.js +96 -59
- package/gatsby-node.mjs +21 -25
- package/package.json +1 -1
- package/release.config.js +5 -0
- package/src/components/atoms/author/index.js +5 -6
- package/src/components/atoms/collapse/collapse.test.js +26 -113
- package/src/components/atoms/collapse/index.js +1 -23
- package/src/components/molecules/comment/comment.module.scss +57 -7
- package/src/components/molecules/comment/index.js +79 -5
- package/src/components/molecules/header/variants/operator/template-one-two/index.js +3 -4
- package/src/components/molecules/header/variants/operator/template-one-two/template-one-two.stories.js +3 -4
- package/src/components/molecules/header/variants/slot/template-one/index.js +3 -4
- package/src/components/molecules/header/variants/slot/template-one/template-one.stories.js +3 -4
- package/src/components/molecules/leave-comment-form/index.js +0 -1
- package/src/components/organisms/anchor/template-one/anchor.module.scss +11 -19
- package/src/components/organisms/archive/index.js +2 -5
- package/src/components/organisms/comments/comment-tree/index.js +7 -8
- package/src/components/organisms/comments/index.js +24 -13
- package/src/components/organisms/cookie-consent/index.js +34 -48
- package/src/components/organisms/form/fields/fields.module.scss +2 -5
- package/src/components/organisms/form/fields/index.js +4 -2
- package/src/components/organisms/form/form.module.scss +39 -76
- package/src/components/organisms/form/index.js +1 -0
- package/src/constants/forms.js +1 -1
- package/src/helpers/tracker.mjs +2 -2
- package/src/resolver/redirect.mjs +0 -23
- package/src/resolver/redirect.test.js +1 -65
- package/gatsby-ssr.js +0 -52
- package/src/components/atoms/comment-votes/comment-votes.module.scss +0 -34
- package/src/components/atoms/comment-votes/index.js +0 -92
- package/src/components/organisms/comments/comment-tree/comment-tree.module.scss +0 -47
- package/src/context/VotesProvider.js +0 -49
package/.ci.yml
CHANGED
|
@@ -49,6 +49,8 @@ Theme Beta Publish:
|
|
|
49
49
|
tags:
|
|
50
50
|
- gatsby-runner-dev-docker
|
|
51
51
|
before_script:
|
|
52
|
+
- echo "@gigmedia:registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
53
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> ~/.npmrc
|
|
52
54
|
- git config --global http.sslverify false
|
|
53
55
|
- git config --global user.email "floyd@gig.com"
|
|
54
56
|
- git config --global user.name "floyd"
|
|
@@ -64,3 +66,27 @@ Theme Beta Publish:
|
|
|
64
66
|
- beta
|
|
65
67
|
variables:
|
|
66
68
|
- $PIPELINE != "content-trigger"
|
|
69
|
+
|
|
70
|
+
Theme POC Publish:
|
|
71
|
+
image: node:18.17.0
|
|
72
|
+
stage: publish-poc
|
|
73
|
+
tags:
|
|
74
|
+
- gatsby-runner-dev-docker
|
|
75
|
+
before_script:
|
|
76
|
+
- echo "@gigmedia:registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
77
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> ~/.npmrc
|
|
78
|
+
- git config --global http.sslverify false
|
|
79
|
+
- git config --global user.email "floyd@gig.com"
|
|
80
|
+
- git config --global user.name "floyd"
|
|
81
|
+
script:
|
|
82
|
+
- export HUSKY=0
|
|
83
|
+
- yarn config set cache-folder .yarn
|
|
84
|
+
- yarn
|
|
85
|
+
- cd gatsby-theme/
|
|
86
|
+
- npx semantic-release@22.0.0
|
|
87
|
+
when: manual
|
|
88
|
+
only:
|
|
89
|
+
refs:
|
|
90
|
+
- poc
|
|
91
|
+
variables:
|
|
92
|
+
- $PIPELINE != "content-trigger"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,146 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
# [44.5.0-poc.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.35-poc.2...v44.5.0-poc.1) (2025-09-04)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* deploy fix ([42e33b3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/42e33b3a434cde10e899afef41852dff49fe9700))
|
|
7
|
+
* gtm id ([52c86e7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/52c86e77884fc12da1db4f1aea6ef739d44d224b))
|
|
8
|
+
* test deploy ([fa38562](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/fa3856257c8149dc84bf72e57e0fcc5ece8839af))
|
|
9
|
+
* test deploy ([6d649ce](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/6d649ce3343a61792522be16a792fcc2c7aa158d))
|
|
10
|
+
* yield only on one place ([52acd92](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/52acd92131461b781f1b8e60e9f366239878ca3e))
|
|
7
11
|
|
|
8
|
-
## [44.4.50](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.49...v44.4.50) (2025-09-02)
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* testing INP ([397a9cd](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/397a9cda61065a81b9d596a07679a722e534d788))
|
|
14
|
-
|
|
15
|
-
## [44.4.49](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.48...v44.4.49) (2025-09-02)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Bug Fixes
|
|
19
|
-
|
|
20
|
-
* updated gtm inclusion ([b7f0360](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b7f03605d1984351042fa06a1cd67812d39e435e))
|
|
21
|
-
|
|
22
|
-
## [44.4.48](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.47...v44.4.48) (2025-09-02)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* add lazy for comoponents ([732fdf7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/732fdf7c10c3bbd1e46ca1d2f4bef04d879c8409))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* Merge branch 'en-8-cwv-unused-js' into 'master' ([bcc5448](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/bcc5448cfce871e8189c7fbd42493c6f1d4c477e))
|
|
31
|
-
|
|
32
|
-
## [44.4.47](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.46...v44.4.47) (2025-09-01)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### Bug Fixes
|
|
36
|
-
|
|
37
|
-
* checkbox issue ([dac5349](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/dac5349111ebd0c38bf1d84f05a35f34280dfe31))
|
|
38
|
-
|
|
39
|
-
## [44.4.46](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.45...v44.4.46) (2025-09-01)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* comment vote logic ([a09a3bd](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/a09a3bd5ef047976362b12099fb37e84c682cb69))
|
|
45
|
-
|
|
46
|
-
## [44.4.45](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.44...v44.4.45) (2025-08-29)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Bug Fixes
|
|
50
|
-
|
|
51
|
-
* voting logic ([15a7af0](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/15a7af00ac73f71837d083c913d83fb9d6c95ca9))
|
|
52
|
-
|
|
53
|
-
## [44.4.44](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.43...v44.4.44) (2025-08-29)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Bug Fixes
|
|
57
|
-
|
|
58
|
-
* bug ([47ff70b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/47ff70b136bbcbd7efe441637dbd28d5ff0a3818))
|
|
59
|
-
* bug ([2c76971](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2c76971d6dca396f1c793786e9907d84f7b8fc15))
|
|
60
|
-
* styling fixes ([da45e7d](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/da45e7d745c79953f5f2d830d0c7c86c8a72f4a6))
|
|
61
|
-
|
|
62
|
-
## [44.4.43](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.42...v44.4.43) (2025-08-29)
|
|
13
|
+
* Merge branch 'poc' of gitlab.com:g2m-gentoo/team-floyd/themes/gatsby-themes into poc ([cb72402](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/cb72402d1e34e427742f6ae335f77bbb9ad77785))
|
|
14
|
+
* Merge branch 'revert-2a55f352' into 'poc' ([eb0069c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/eb0069cd14b7a01c85e911cf6bf4abf8b4bb0fce))
|
|
15
|
+
* Revert "fix: remove multiple templates" ([0e1a8ca](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0e1a8ca0d1f7d21d059eff734aa040ef02f0e9b9))
|
|
63
16
|
|
|
64
17
|
|
|
65
|
-
###
|
|
66
|
-
|
|
67
|
-
* voting ([2c38c8f](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2c38c8ff3e2ee8b9aadeceb2e2318b47359d11b5))
|
|
68
|
-
|
|
69
|
-
## [44.4.42](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.41...v44.4.42) (2025-08-29)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### Bug Fixes
|
|
73
|
-
|
|
74
|
-
* outside click ([8b88022](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8b88022dafe14a4c7c7d3d8efe08207a76659724))
|
|
75
|
-
* test collapse ([a5dc747](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/a5dc7471eae5df4ab4b3eda3e91856a2e728476c))
|
|
76
|
-
* test coverage ([bbd1138](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/bbd1138c1c668e745923917ddc5b08c5d994f64d))
|
|
77
|
-
* test outside click ([c616f66](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c616f66192927bc53366f5ede49827614dcdf847))
|
|
78
|
-
* voting ([2f2eb5c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2f2eb5c696d96c591af536a81f45bc7d4484e632))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
* Merge branch 'collapse-outside-click' into 'master' ([ade0483](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ade0483aef0a470638e1b3132e11c850db0662b2))
|
|
82
|
-
|
|
83
|
-
## [44.4.41](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.40...v44.4.41) (2025-08-28)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### Bug Fixes
|
|
87
|
-
|
|
88
|
-
* removed logs ([8930faa](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8930faa83e1561dfb9c9bbb993fc167a2527363a))
|
|
89
|
-
|
|
90
|
-
## [44.4.40](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.39...v44.4.40) (2025-08-28)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Bug Fixes
|
|
94
|
-
|
|
95
|
-
* changed limit of chars ([c1649bf](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c1649bf408e3f14bbb070f2988306d5e84ba15a2))
|
|
96
|
-
* test ([0d6646b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0d6646be600d5c977b8f0c4ee90ab4326f604eed))
|
|
97
|
-
* update env ([849fc61](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/849fc61d6f0f33b2be2c2336061344b4a39c6f91))
|
|
98
|
-
|
|
99
|
-
## [44.4.39](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.38...v44.4.39) (2025-08-26)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
### Bug Fixes
|
|
103
|
-
|
|
104
|
-
* env handling ([149b8f2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/149b8f2de79af7532ce434223d12ef9249ba2047))
|
|
105
|
-
|
|
106
|
-
## [44.4.38](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.37...v44.4.38) (2025-08-26)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
### Bug Fixes
|
|
110
|
-
|
|
111
|
-
* redirect logic for affiliates ([f88bc07](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f88bc07ac8e48f90cc25c57ddecb75eed774a284))
|
|
112
|
-
* redirects ([c6ba3a0](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c6ba3a00e7a794e7d7d816611bc72ae4531bf4ce))
|
|
113
|
-
* redirects ([c8358be](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c8358be986550b149677e7ec0eee484db913120e))
|
|
114
|
-
* tests ([9e90c50](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/9e90c50ef0a77ae246033225f111a3ecc6d5f302))
|
|
115
|
-
|
|
116
|
-
## [44.4.37](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.36...v44.4.37) (2025-08-25)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
### Bug Fixes
|
|
18
|
+
### Features
|
|
120
19
|
|
|
121
|
-
*
|
|
122
|
-
* test ([7630b92](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/7630b92b621e6117c400af243d2b4c300422a833))
|
|
123
|
-
* test ([385538b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/385538b233d94cb8416f31eedd5f509efa1d1c1e))
|
|
20
|
+
* yield scripts and gtm crossOrigin ([88858d5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/88858d558d516f267cce68056a43513c18248ba6))
|
|
124
21
|
|
|
125
|
-
## [44.4.
|
|
22
|
+
## [44.4.35-poc.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.35-poc.1...v44.4.35-poc.2) (2025-09-01)
|
|
126
23
|
|
|
127
24
|
|
|
128
25
|
### Bug Fixes
|
|
129
26
|
|
|
130
|
-
*
|
|
131
|
-
* added env var to enable server redirects instead of splash screens ([c67368f](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c67368f1f11184ba52d2a32ea35e78e53e79b1a4))
|
|
132
|
-
* updated env ([dde7f3b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/dde7f3b11987fa88f018bd69b96b8ca4db1765d8))
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
* Merge branch 'tm-5657-redirect-logic' into 'master' ([04f2c5b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/04f2c5b863246c0889f232d65a7c375ea8e417d4))
|
|
136
|
-
* Merge branch 'tm-5331-load-more-archive' into 'master' ([22da05c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/22da05cf57b9bc77fe5f37bb5fc955ad7ec9351e))
|
|
27
|
+
* remove multiple templates ([2a55f35](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2a55f3521f55a51f11200b098abec0e978f7ecfa))
|
|
137
28
|
|
|
138
|
-
## [44.4.35](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.34...v44.4.35) (2025-08-
|
|
29
|
+
## [44.4.35-poc.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.34...v44.4.35-poc.1) (2025-08-22)
|
|
139
30
|
|
|
140
31
|
|
|
141
32
|
### Bug Fixes
|
|
142
33
|
|
|
34
|
+
* added commit pipelines ([0d583de](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0d583de2d5683794918c6bb89e59a2a7ab88848f))
|
|
35
|
+
* added stage ci cd ([9fa7040](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/9fa7040c89379832385b0d0a0fb4830c093601fa))
|
|
36
|
+
* added utils to publush script ([2c78e6e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2c78e6e276e034739b8fb08228ad637cf8a96122))
|
|
143
37
|
* added validation to comments ([64cd409](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/64cd40908393328d83fa10d933b834b74b418894))
|
|
38
|
+
* ci cd ([86d0f72](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/86d0f725b51853c019d4c492136e525b29d50285))
|
|
39
|
+
* deploy pm2 name ([0574aa7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0574aa77c25be5eda6a8f5131965ad36680d3152))
|
|
40
|
+
* deploy pm2 name ([70fbbe7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/70fbbe7026b584967bffcb9b3d169150e834a9fd))
|
|
41
|
+
* deploy pm2 name ([e937f5f](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e937f5f9183d9f050211079a65b6c22b8e3c7f32))
|
|
42
|
+
* deploy pm2 name ([a384b54](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/a384b545c3112742c9d9126cac655aa20a2aadbc))
|
|
43
|
+
* deploy pm2 name ([ef636b1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ef636b125cccc81158298bd0a2ca3f3c2e9be2ed))
|
|
44
|
+
* deploy pm2 name ([24662d5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/24662d5464dd6227da04c25c9a4a07ce2ab4fbfc))
|
|
45
|
+
* pm2 name ([9c26e31](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/9c26e3103a4f01313a2aa67812eaa699e6fb6ddd))
|
|
46
|
+
* poc stages added ([502f386](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/502f386fe8f7a9444daab822e798db48a5873a1b))
|
|
47
|
+
* semantic release ([ccc3375](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ccc3375e46d8c563cd62f6268c61c6d6394f6676))
|
|
144
48
|
* tnc validation ([f4bb891](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f4bb8914e4f73e8f33952df2209f212ca677cafb))
|
|
145
49
|
|
|
146
50
|
## [44.4.34](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.33...v44.4.34) (2025-08-21)
|
package/gatsby-browser.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-lonely-if */
|
|
2
1
|
/* eslint-disable no-sequences */
|
|
3
2
|
/* eslint-disable one-var */
|
|
4
3
|
/* eslint-disable no-var */
|
|
@@ -10,42 +9,58 @@
|
|
|
10
9
|
/* eslint-disable prefer-destructuring */
|
|
11
10
|
|
|
12
11
|
// Main Vars
|
|
13
|
-
require(
|
|
14
|
-
require(
|
|
15
|
-
require(
|
|
16
|
-
require(
|
|
17
|
-
require(
|
|
18
|
-
require(
|
|
12
|
+
require("./src/styles/utils/variables/_colors.scss");
|
|
13
|
+
require("./src/styles/utils/variables/_main.scss");
|
|
14
|
+
require("./src/styles/base/_typography.scss");
|
|
15
|
+
require("./src/styles/base/_reset.scss");
|
|
16
|
+
require("./src/styles/base/_spacing.scss");
|
|
17
|
+
require("./src/styles/layouts/_grid.scss");
|
|
18
|
+
|
|
19
|
+
async function yieldToMain() {
|
|
20
|
+
if (globalThis.scheduler?.yield) {
|
|
21
|
+
return scheduler.yield();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Fall back to yielding with setTimeout.
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
setTimeout(resolve, 0);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
19
29
|
|
|
20
30
|
function initGTM() {
|
|
21
|
-
if (
|
|
31
|
+
if (
|
|
32
|
+
window.loadGTM === false ||
|
|
33
|
+
window.gtmDidInit ||
|
|
34
|
+
process.env.DISABLE_GTM === "true"
|
|
35
|
+
) {
|
|
22
36
|
return false;
|
|
23
37
|
}
|
|
24
38
|
|
|
25
39
|
window.gtmDidInit = true; // flag to ensure script does not get added to DOM more than once.
|
|
26
40
|
const trackingLink = `https://www.googletagmanager.com/gtm.js?id=${process.env.GA_TRACKING_ID}`;
|
|
27
41
|
|
|
28
|
-
const script = document.createElement(
|
|
29
|
-
script.type =
|
|
42
|
+
const script = document.createElement("script");
|
|
43
|
+
script.type = "text/javascript";
|
|
30
44
|
script.async = true;
|
|
45
|
+
script.crossOrigin = "anonymous";
|
|
31
46
|
script.src = trackingLink;
|
|
32
47
|
|
|
33
48
|
script.onload = () => {
|
|
34
49
|
// eslint-disable-next-line no-undef
|
|
35
50
|
dataLayer.push({
|
|
36
51
|
// ensure PageViews are always tracked
|
|
37
|
-
event:
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
event: "gtm.js",
|
|
53
|
+
"gtm.start": new Date().getTime(),
|
|
54
|
+
"gtm.uniqueEventId": 0,
|
|
40
55
|
});
|
|
41
56
|
};
|
|
42
57
|
document.head.appendChild(script);
|
|
43
58
|
|
|
44
|
-
const noscript = document.createElement(
|
|
45
|
-
const iframe = document.createElement(
|
|
59
|
+
const noscript = document.createElement("noscript");
|
|
60
|
+
const iframe = document.createElement("iframe");
|
|
46
61
|
iframe.src = trackingLink;
|
|
47
|
-
iframe.style.display =
|
|
48
|
-
iframe.style.visibility =
|
|
62
|
+
iframe.style.display = "none";
|
|
63
|
+
iframe.style.visibility = "hidden";
|
|
49
64
|
iframe.height = 0;
|
|
50
65
|
iframe.width = 0;
|
|
51
66
|
noscript.innerHTML += iframe.outerHTML;
|
|
@@ -53,16 +68,15 @@ function initGTM() {
|
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
function optinMonster() {
|
|
56
|
-
const script = document.createElement(
|
|
57
|
-
script.id =
|
|
58
|
-
script.setAttribute(
|
|
59
|
-
script.setAttribute(
|
|
60
|
-
script.src =
|
|
71
|
+
const script = document.createElement("script");
|
|
72
|
+
script.id = "optin-monstr";
|
|
73
|
+
script.setAttribute("data-user", process.env.OPTINMONSTR_USER);
|
|
74
|
+
script.setAttribute("data-account", process.env.OPTINMONSTR_ACC);
|
|
75
|
+
script.src = "https://a.omappapi.com/app/js/api.min.js";
|
|
61
76
|
script.async = true;
|
|
62
77
|
document.head.appendChild(script);
|
|
63
78
|
}
|
|
64
79
|
|
|
65
|
-
|
|
66
80
|
const loadFacebookPixel = () => {
|
|
67
81
|
!(function (f, b, e, v, n, t, s) {
|
|
68
82
|
// eslint-disable-next-line no-multi-assign
|
|
@@ -76,15 +90,20 @@ const loadFacebookPixel = () => {
|
|
|
76
90
|
if (!f._fbq) f._fbq = n;
|
|
77
91
|
n.push = n;
|
|
78
92
|
n.loaded = !0;
|
|
79
|
-
n.version =
|
|
93
|
+
n.version = "2.0";
|
|
80
94
|
n.queue = [];
|
|
81
95
|
t = b.createElement(e);
|
|
82
96
|
t.async = !0;
|
|
83
|
-
t.id =
|
|
97
|
+
t.id = "pixel-code";
|
|
84
98
|
t.src = v;
|
|
85
99
|
s = b.getElementsByTagName(e)[0];
|
|
86
100
|
s.parentNode.insertBefore(t, s);
|
|
87
|
-
})(
|
|
101
|
+
})(
|
|
102
|
+
window,
|
|
103
|
+
document,
|
|
104
|
+
"script",
|
|
105
|
+
"https://connect.facebook.net/en_US/fbevents.js"
|
|
106
|
+
);
|
|
88
107
|
};
|
|
89
108
|
|
|
90
109
|
const microsoftAdvertising = () => {
|
|
@@ -92,77 +111,95 @@ const microsoftAdvertising = () => {
|
|
|
92
111
|
var f, n, i;
|
|
93
112
|
(w[u] = w[u] || []),
|
|
94
113
|
(f = function () {
|
|
95
|
-
var o = { ti:
|
|
96
|
-
(o.q = w[u]), (w[u] = new UET(o)), w[u].push(
|
|
114
|
+
var o = { ti: "187106455", enableAutoSpaTracking: true };
|
|
115
|
+
(o.q = w[u]), (w[u] = new UET(o)), w[u].push("pageLoad");
|
|
97
116
|
}),
|
|
98
117
|
(n = d.createElement(t)),
|
|
99
118
|
(n.src = r),
|
|
100
119
|
(n.async = 1),
|
|
101
|
-
(n.id =
|
|
120
|
+
(n.id = "microsoft-code"),
|
|
102
121
|
(n.onload = n.onreadystatechange =
|
|
103
122
|
function () {
|
|
104
123
|
var s = this.readyState;
|
|
105
|
-
(s && s !==
|
|
124
|
+
(s && s !== "loaded" && s !== "complete") ||
|
|
106
125
|
(f(), (n.onload = n.onreadystatechange = null));
|
|
107
126
|
}),
|
|
108
127
|
(i = d.getElementsByTagName(t)[0]),
|
|
109
128
|
i.parentNode.insertBefore(n, i);
|
|
110
|
-
})(window, document,
|
|
129
|
+
})(window, document, "script", "//bat.bing.com/bat.js", "uetq");
|
|
111
130
|
};
|
|
112
131
|
|
|
113
|
-
const piguard = () =>{
|
|
132
|
+
const piguard = () => {
|
|
114
133
|
if (window.loadGTM === false) {
|
|
115
134
|
return false;
|
|
116
135
|
}
|
|
117
136
|
|
|
118
|
-
const script = document.createElement(
|
|
119
|
-
script.id =
|
|
137
|
+
const script = document.createElement("script");
|
|
138
|
+
script.id = "piguard";
|
|
120
139
|
script.src = `https://pg.${process.env.GATSBY_SITE_NAME}/analytics.js?tid=PP-${process.env.PIGUARD_ID}`;
|
|
121
140
|
script.async = true;
|
|
122
141
|
document.head.appendChild(script);
|
|
123
|
-
}
|
|
142
|
+
};
|
|
124
143
|
|
|
125
|
-
function
|
|
144
|
+
async function scrollEvent(event) {
|
|
145
|
+
await yieldToMain();
|
|
126
146
|
initGTM();
|
|
127
|
-
|
|
128
|
-
|
|
147
|
+
if (
|
|
148
|
+
!document.getElementById("piguard") &&
|
|
149
|
+
process.env.ENABLE_PIGUARD === "true"
|
|
150
|
+
) {
|
|
129
151
|
piguard();
|
|
130
152
|
}
|
|
131
153
|
|
|
132
|
-
if (
|
|
154
|
+
if (
|
|
155
|
+
process.env.ENABLE_MICROSOFT === "true" &&
|
|
156
|
+
!document.getElementById("microsoft-code")
|
|
157
|
+
)
|
|
133
158
|
microsoftAdvertising();
|
|
134
|
-
}
|
|
135
159
|
|
|
136
|
-
if (
|
|
160
|
+
if (
|
|
161
|
+
process.env.ENABLE_OPTINMONSTR === "true" &&
|
|
162
|
+
!document.getElementById("optin-monstr")
|
|
163
|
+
)
|
|
137
164
|
optinMonster();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
165
|
+
if (
|
|
166
|
+
process.env.ENABLE_PIXEL === "true" &&
|
|
167
|
+
!document.getElementById("pixel-code")
|
|
168
|
+
) {
|
|
141
169
|
if (
|
|
142
|
-
typeof window !==
|
|
170
|
+
typeof window !== "undefined" &&
|
|
143
171
|
window.location.pathname !== process.env.PAGE_EXCLUDE_PIXEL
|
|
144
172
|
) {
|
|
145
173
|
loadFacebookPixel();
|
|
146
174
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
175
|
+
fbq("init", process.env.PIXEL_ID);
|
|
176
|
+
|
|
177
|
+
// Initialize and track the PageView event
|
|
178
|
+
fbq("track", "PageView");
|
|
152
179
|
}
|
|
153
180
|
}
|
|
181
|
+
|
|
182
|
+
if (event) {
|
|
183
|
+
event.currentTarget?.removeEventListener(event.type, scrollEvent); // remove the event listener that got triggered
|
|
184
|
+
}
|
|
154
185
|
}
|
|
155
186
|
|
|
156
187
|
exports.onClientEntry = () => {
|
|
157
|
-
if (process.env.PPC ===
|
|
158
|
-
|
|
159
|
-
} else
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
188
|
+
if (process.env.PPC === "true") {
|
|
189
|
+
scrollEvent(null);
|
|
190
|
+
} else {
|
|
191
|
+
// detect if is mobile
|
|
192
|
+
if (
|
|
193
|
+
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
194
|
+
navigator.userAgent
|
|
195
|
+
)
|
|
196
|
+
) {
|
|
197
|
+
scrollEvent(null);
|
|
198
|
+
return;
|
|
166
199
|
}
|
|
200
|
+
|
|
201
|
+
document.addEventListener("scroll", scrollEvent);
|
|
202
|
+
document.addEventListener("mousemove", scrollEvent);
|
|
203
|
+
document.addEventListener("touchstart", scrollEvent, { passive: true });
|
|
167
204
|
}
|
|
168
205
|
};
|
package/gatsby-node.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
clean,
|
|
24
24
|
removeUnwantedSections,
|
|
25
25
|
} from "./src/resolver/common.mjs";
|
|
26
|
-
import { generateRedirects
|
|
26
|
+
import { generateRedirects } from "./src/resolver/redirect.mjs";
|
|
27
27
|
import { translate, is404Page } from "./src/helpers/getters.mjs";
|
|
28
28
|
import { getArchivePages, hasArchiveModule } from "./src/resolver/archive.mjs";
|
|
29
29
|
|
|
@@ -71,10 +71,12 @@ const relations = {};
|
|
|
71
71
|
|
|
72
72
|
// eslint-disable-next-line import/prefer-default-export
|
|
73
73
|
export const createPages = async (
|
|
74
|
-
{ actions: { createPage
|
|
74
|
+
{ actions: { createPage } },
|
|
75
75
|
themeOptions
|
|
76
76
|
) => {
|
|
77
77
|
process.env.GATSBY_SITE_NAME = String(themeOptions.siteName);
|
|
78
|
+
|
|
79
|
+
generateRedirects(siteSettingsData);
|
|
78
80
|
preconnectLinks = themeOptions.preconnectLinks || [];
|
|
79
81
|
console.log(chalk.magenta("info") + chalk.whiteBright(" starting processor"));
|
|
80
82
|
|
|
@@ -124,8 +126,6 @@ export const createPages = async (
|
|
|
124
126
|
streamRobotsTxt.write(robotsTxtContent);
|
|
125
127
|
streamRobotsTxt.end();
|
|
126
128
|
|
|
127
|
-
generateRedirects(siteSettingsData);
|
|
128
|
-
|
|
129
129
|
// create every single page
|
|
130
130
|
Object.keys(processed.site_markets).forEach((siteMarket) => {
|
|
131
131
|
if (!processed.pages[siteMarket]["page"]) {
|
|
@@ -282,27 +282,23 @@ export const createPages = async (
|
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
},
|
|
303
|
-
});
|
|
304
|
-
})
|
|
305
|
-
}
|
|
285
|
+
trackingPages.forEach(({ path, page, operator }) => {
|
|
286
|
+
createPage({
|
|
287
|
+
path,
|
|
288
|
+
component: `${__dirname}/src/components/${
|
|
289
|
+
process.env.IS_TRACKING_SSR === "true"
|
|
290
|
+
? "app-tracker-ssr.js"
|
|
291
|
+
: "app-tracker.js"
|
|
292
|
+
}`,
|
|
293
|
+
context: {
|
|
294
|
+
page,
|
|
295
|
+
siteGeneralData,
|
|
296
|
+
operator,
|
|
297
|
+
isTracker: true,
|
|
298
|
+
isLiveStreamProvider: false,
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
});
|
|
306
302
|
};
|
|
307
303
|
|
|
308
304
|
export const onCreatePage = async ({ page, actions }) => {
|
package/package.json
CHANGED
package/release.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
2
|
/* eslint-disable arrow-body-style */
|
|
3
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
6
|
import { formatDate } from '~helpers/date-time';
|
|
@@ -8,11 +8,10 @@ import { imagePrettyUrl } from '~helpers/getters';
|
|
|
8
8
|
import Link from '~hooks/link';
|
|
9
9
|
import LazyImage from '~hooks/lazy-image';
|
|
10
10
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
11
|
+
import Verify from '~images/icons/verify';
|
|
12
|
+
import Clock from '~images/icons/clock';
|
|
11
13
|
import styles from './author.module.scss';
|
|
12
14
|
|
|
13
|
-
const VerifyIcon = lazy(() => import('~images/icons/verify'));
|
|
14
|
-
const ClockIcon = lazy(() => import('~images/icons/clock'));
|
|
15
|
-
|
|
16
15
|
const Author = ({
|
|
17
16
|
name,
|
|
18
17
|
date,
|
|
@@ -27,11 +26,11 @@ const Author = ({
|
|
|
27
26
|
isCardsAuthor = false,
|
|
28
27
|
hasAuthorBox = false,
|
|
29
28
|
reviewer,
|
|
30
|
-
clock = <
|
|
29
|
+
clock = <Clock />,
|
|
31
30
|
authorImageWidth = 30,
|
|
32
31
|
authorImageHeight = 30,
|
|
33
32
|
showVerification = false,
|
|
34
|
-
verifyIcon = <
|
|
33
|
+
verifyIcon = <Verify />,
|
|
35
34
|
}) => {
|
|
36
35
|
const prefixstyle = !link || !authorImg;
|
|
37
36
|
|