gatsby-matrix-theme 4.0.4 → 5.0.2
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 +50 -0
- package/package.json +2 -2
- package/src/components/atoms/author-card/index.js +7 -2
- package/src/components/molecules/carousel/screenshot-slide/index.js +3 -2
- package/src/gatsby-core-theme/components/atoms/spotlights/spotlights-theme.module.scss +3 -1
- package/src/gatsby-core-theme/components/molecules/content/content.module.scss +16 -16
- package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +0 -4
- package/src/gatsby-core-theme/components/organisms/anchor/index.js +16 -24
- package/src/gatsby-core-theme/components/organisms/carousel/index.js +18 -8
- package/src/gatsby-core-theme/helpers/schema.js +148 -0
- package/src/gatsby-core-theme/styles/utils/variables/_main.scss +3 -0
- package/storybook/public/{0.d24a0c90.iframe.bundle.js → 0.400d2cc7.iframe.bundle.js} +1 -1
- package/storybook/public/{5.d5718771.iframe.bundle.js → 5.69290c4d.iframe.bundle.js} +3 -3
- package/storybook/public/{5.d5718771.iframe.bundle.js.LICENSE.txt → 5.69290c4d.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/5.69290c4d.iframe.bundle.js.map +1 -0
- package/storybook/public/{6.064e5aae.iframe.bundle.js → 6.f9ecbc78.iframe.bundle.js} +1 -1
- package/storybook/public/{9.1c63a217.iframe.bundle.js → 9.16798c74.iframe.bundle.js} +3 -3
- package/storybook/public/{9.1c63a217.iframe.bundle.js.LICENSE.txt → 9.16798c74.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/9.16798c74.iframe.bundle.js.map +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.f82095a3.iframe.bundle.js +1 -0
- package/storybook/public/{runtime~main.c941bf72.iframe.bundle.js → runtime~main.49c0e350.iframe.bundle.js} +1 -1
- package/storybook/public/vendors~main.8dd0e863.iframe.bundle.js +7 -0
- package/storybook/public/{vendors~main.2ee68090.iframe.bundle.js.LICENSE.txt → vendors~main.8dd0e863.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.8dd0e863.iframe.bundle.js.map +1 -0
- package/storybook/public/5.d5718771.iframe.bundle.js.map +0 -1
- package/storybook/public/9.1c63a217.iframe.bundle.js.map +0 -1
- package/storybook/public/main.edf8e107.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.2ee68090.iframe.bundle.js +0 -7
- package/storybook/public/vendors~main.2ee68090.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
## [5.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v5.0.1...v5.0.2) (2022-03-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* content frame styling ([9bfb496](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9bfb4969fc1408b29a71300935a381fe7818eaa7))
|
|
7
|
+
* updated core theme ([71588bf](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/71588bfa5c26fc76ac9dbbadd64fc8215608ddd3))
|
|
8
|
+
|
|
9
|
+
## [5.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v5.0.0...v5.0.1) (2022-03-02)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* add alt tags for carousel and author card ([2f0f4be](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2f0f4bebd55391205b8580ebe0c6eaef7b7574f8))
|
|
15
|
+
* export the function, to use them in sites if needed ([74672e6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/74672e6453b2be210525461ab7f4cbc398494763))
|
|
16
|
+
* temporarily fix for schema ([a255ed9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a255ed92ffe4f60cc809201227594c33cf65b2d6))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Code Refactoring
|
|
20
|
+
|
|
21
|
+
* use isMobile instead of width ([8e9e4e3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8e9e4e31f01e7e59cebc769e6392011628be844e))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Config
|
|
25
|
+
|
|
26
|
+
* update theme version ([b1d896e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b1d896e7d1cd796ad23d848b33f0d50b107deb09))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* Merge branch 'tm-2747-remove-webschema' into 'master' ([e519030](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e5190308df96783c81c384b2afc46f8b3ff5ecb0))
|
|
30
|
+
* Merge branch 'tm-2729-alt-tags' into 'master' ([374c3aa](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/374c3aaba05826d915588359d7c03af61ebc9ba9))
|
|
31
|
+
|
|
32
|
+
# [5.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v4.0.4...v5.0.0) (2022-02-28)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* spotlight styling ([d329a15](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d329a15dc62e62aec155fd33e7d0d2a3a0d63fec))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Code Refactoring
|
|
41
|
+
|
|
42
|
+
* add active env for demo content deploy ([4f35c35](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4f35c3523b4318971422d942d24102bb8f722ca4))
|
|
43
|
+
* remove anchorTitle ([1bedbc5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1bedbc5925ef1a163a569901b55bc9aadf67dc3f))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([124e121](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/124e12144dbc7feaa11b6499bdf553d3d45337aa))
|
|
47
|
+
* Merge branch 'remove-anchorTitle' into 'master' ([2570a32](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2570a329997924cc37721bdce3bd8ad2aceeb78d))
|
|
48
|
+
* Merge branch 'tm-2706-custom-demo-deployment' into 'master' ([0f4d6ba](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0f4d6ba19a809a75cdfabee864c197f791439493))
|
|
49
|
+
* Merge branch 'master' into tm-2706-custom-demo-deployment ([aaf6237](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/aaf6237e6e5b64e1c30224d9ac19be9236c650f3))
|
|
50
|
+
|
|
1
51
|
## [4.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v4.0.3...v4.0.4) (2022-02-22)
|
|
2
52
|
|
|
3
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"cross-env": "^7.0.2",
|
|
32
32
|
"dotenv": "8.2.0",
|
|
33
33
|
"gatsby": "^3.3.1",
|
|
34
|
-
"gatsby-core-theme": "^
|
|
34
|
+
"gatsby-core-theme": "^5.0.1",
|
|
35
35
|
"gatsby-image": "^3.3.0",
|
|
36
36
|
"gatsby-plugin-image": "^1.3.1",
|
|
37
37
|
"gatsby-plugin-postcss": "^4.3.0",
|
|
@@ -6,12 +6,17 @@ import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
|
6
6
|
import styles from './author-card.module.scss';
|
|
7
7
|
|
|
8
8
|
const AuthorCard = ({ author, width = 60, height = 60 }) => {
|
|
9
|
-
const { name, author_title, email_address, image } = author || {};
|
|
9
|
+
const { name, author_title, email_address, image, image_alt } = author || {};
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div className={styles.authorCard}>
|
|
13
13
|
<div className={styles.img}>
|
|
14
|
-
<LazyImage
|
|
14
|
+
<LazyImage
|
|
15
|
+
src={imagePrettyUrl(image)}
|
|
16
|
+
alt={image_alt || name}
|
|
17
|
+
width={width}
|
|
18
|
+
height={height}
|
|
19
|
+
/>
|
|
15
20
|
</div>
|
|
16
21
|
<div className={styles.txt}>
|
|
17
22
|
<div className={styles.name}>{name}</div>
|
|
@@ -7,7 +7,7 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
|
7
7
|
import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
8
8
|
import styles from './screenshot-slide.module.scss';
|
|
9
9
|
|
|
10
|
-
const Slide = ({ item = {} }) => (
|
|
10
|
+
const Slide = ({ item = {}, slideTitle = '' }) => (
|
|
11
11
|
<>
|
|
12
12
|
{item.image && (
|
|
13
13
|
<LazyImage
|
|
@@ -15,7 +15,7 @@ const Slide = ({ item = {} }) => (
|
|
|
15
15
|
height={item?.image_object?.height}
|
|
16
16
|
className={styles.image}
|
|
17
17
|
src={imagePrettyUrl(item.image)}
|
|
18
|
-
alt={item.title}
|
|
18
|
+
alt={item.title || slideTitle}
|
|
19
19
|
/>
|
|
20
20
|
)}
|
|
21
21
|
{item.content && <p className={styles.content}>{parse(item.content)}</p>}
|
|
@@ -28,6 +28,7 @@ Slide.propTypes = {
|
|
|
28
28
|
content: PropTypes.string,
|
|
29
29
|
title: PropTypes.string,
|
|
30
30
|
}),
|
|
31
|
+
slideTitle: PropTypes.string,
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export default Slide;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
border: 1px solid var(--spotlight-boxes-border-color);
|
|
51
51
|
background-color: var(--spotlight-boxes-background-color);
|
|
52
52
|
box-sizing: border-box;
|
|
53
|
-
border-radius:
|
|
53
|
+
border-radius: var(--spotlight-boxes-border-radius);
|
|
54
54
|
position: relative;
|
|
55
55
|
max-width: 568px;
|
|
56
56
|
margin-left: 4.5rem;
|
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
> label {
|
|
85
85
|
font-size: var(--spotlight-boxes-label-size);
|
|
86
86
|
color: var(--spotlight-boxes-label-color);
|
|
87
|
+
line-height: var(--spotlight-boxes-label-line-height);
|
|
88
|
+
padding: var(--spotlight-boxes-label-padding);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
> div {
|
|
@@ -193,6 +193,22 @@
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
.contentFrame {
|
|
197
|
+
background-color: #E0EAEA;
|
|
198
|
+
padding: 1.6rem 2.4rem 2.4rem;
|
|
199
|
+
border-radius: .8rem;
|
|
200
|
+
box-sizing: border-box;
|
|
201
|
+
img {
|
|
202
|
+
border-radius: .8rem;
|
|
203
|
+
}
|
|
204
|
+
@include max(mobile) {
|
|
205
|
+
img {
|
|
206
|
+
margin-left: 0;
|
|
207
|
+
width: 100%;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
196
212
|
ul,
|
|
197
213
|
ol {
|
|
198
214
|
color: var(--color-6);
|
|
@@ -291,19 +307,3 @@
|
|
|
291
307
|
.alignRight {
|
|
292
308
|
@include content-img-align(right);
|
|
293
309
|
}
|
|
294
|
-
|
|
295
|
-
.contentFrame {
|
|
296
|
-
background-color: #E0EAEA;
|
|
297
|
-
padding: 1.6rem 2.4rem 2.4rem;
|
|
298
|
-
border-radius: .8rem;
|
|
299
|
-
box-sizing: border-box;
|
|
300
|
-
img {
|
|
301
|
-
border-radius: .8rem;
|
|
302
|
-
}
|
|
303
|
-
@include max(mobile) {
|
|
304
|
-
img {
|
|
305
|
-
margin-left: 0;
|
|
306
|
-
width: 100%;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
4
|
-
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
5
3
|
import keygen from '~helpers/keygen';
|
|
6
4
|
import { anchorLink } from '~helpers/strings';
|
|
7
5
|
import styles from './anchor.module.scss';
|
|
8
6
|
|
|
9
7
|
function Anchor({ module: { items }, headerOffset = 80, isFixed = false, icon = null }) {
|
|
10
8
|
const [isFixedMenu, setIsFixedMenu] = useState(false);
|
|
11
|
-
const { translations } = useContext(Context) || {};
|
|
12
9
|
|
|
13
10
|
if (isFixed && typeof window !== 'undefined') {
|
|
14
11
|
window.addEventListener('scroll', () => {
|
|
@@ -44,26 +41,21 @@ function Anchor({ module: { items }, headerOffset = 80, isFixed = false, icon =
|
|
|
44
41
|
};
|
|
45
42
|
|
|
46
43
|
return (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</a>
|
|
63
|
-
</li>
|
|
64
|
-
))}
|
|
65
|
-
</ul>
|
|
66
|
-
</>
|
|
44
|
+
<ul id="faq-container" className={`${styles.anchor} ${isFixedMenu && styles.isFixed}`}>
|
|
45
|
+
{items?.map((anchor) => (
|
|
46
|
+
<li>
|
|
47
|
+
<a
|
|
48
|
+
className={`${styles.link} anchor-carousel-gtm anchor-menu-gtm`}
|
|
49
|
+
key={keygen()}
|
|
50
|
+
onClick={handleClick}
|
|
51
|
+
href={`#${anchor.label && anchorLink(anchor?.label?.toLowerCase().trim())}`}
|
|
52
|
+
>
|
|
53
|
+
{anchor.label}
|
|
54
|
+
{icon}
|
|
55
|
+
</a>
|
|
56
|
+
</li>
|
|
57
|
+
))}
|
|
58
|
+
</ul>
|
|
67
59
|
);
|
|
68
60
|
}
|
|
69
61
|
|
|
@@ -3,21 +3,23 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import Slider from 'gatsby-core-theme/src/components/molecules/slider';
|
|
5
5
|
import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
6
|
-
import
|
|
6
|
+
import { isMobileDevice } from 'gatsby-core-theme/src/helpers/device-detect';
|
|
7
7
|
|
|
8
8
|
import Slide from '../../../../components/molecules/carousel/screenshot-slide';
|
|
9
9
|
|
|
10
10
|
import styles from './carousel.module.scss';
|
|
11
11
|
|
|
12
|
-
const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
|
|
13
|
-
const
|
|
12
|
+
const Carousel = ({ page = {}, module = {}, settings = {}, gtmClass = '' }) => {
|
|
13
|
+
const isMobile = isMobileDevice();
|
|
14
14
|
// render one item per slide
|
|
15
15
|
const renderOne = (items) => {
|
|
16
16
|
const arr = [];
|
|
17
17
|
for (let i = 0; i < items.length; i += 1) {
|
|
18
|
+
const slideTitle = `${page.title}-carousel-${i + 1}`;
|
|
19
|
+
|
|
18
20
|
arr.push(
|
|
19
21
|
<div key={keygen()} className={styles.carouselItem}>
|
|
20
|
-
<Slide item={items[i]} gtmClass={gtmClass} />
|
|
22
|
+
<Slide item={items[i]} slideTitle={slideTitle} gtmClass={gtmClass} />
|
|
21
23
|
</div>
|
|
22
24
|
);
|
|
23
25
|
}
|
|
@@ -30,11 +32,19 @@ const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
|
|
|
30
32
|
arr.push(
|
|
31
33
|
<div className={styles.slide} key={keygen()}>
|
|
32
34
|
<div key={keygen()} className={styles.carouselItem}>
|
|
33
|
-
<Slide
|
|
35
|
+
<Slide
|
|
36
|
+
item={items[i]}
|
|
37
|
+
slideTitle={`${page.title}-carousel-${i + 1}`}
|
|
38
|
+
gtmClass={gtmClass}
|
|
39
|
+
/>
|
|
34
40
|
</div>
|
|
35
41
|
{items[i + 1] && (
|
|
36
42
|
<div key={keygen()} className={styles.carouselItem}>
|
|
37
|
-
<Slide
|
|
43
|
+
<Slide
|
|
44
|
+
item={items[i + 1]}
|
|
45
|
+
slideTitle={`${page.title}-carousel-${i + 2}`}
|
|
46
|
+
gtmClass={gtmClass}
|
|
47
|
+
/>
|
|
38
48
|
</div>
|
|
39
49
|
)}
|
|
40
50
|
</div>
|
|
@@ -43,8 +53,7 @@ const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
|
|
|
43
53
|
return arr;
|
|
44
54
|
};
|
|
45
55
|
|
|
46
|
-
const renderedItems =
|
|
47
|
-
width < 991 && width > 0 ? renderOne(module.items) : renderTwo(module.items);
|
|
56
|
+
const renderedItems = isMobile ? renderOne(module.items) : renderTwo(module.items);
|
|
48
57
|
|
|
49
58
|
return (
|
|
50
59
|
<div className={styles.carouselContainer}>
|
|
@@ -61,6 +70,7 @@ const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
|
|
|
61
70
|
};
|
|
62
71
|
|
|
63
72
|
Carousel.propTypes = {
|
|
73
|
+
page: PropTypes.shape({}),
|
|
64
74
|
module: PropTypes.shape({
|
|
65
75
|
items: PropTypes.arrayOf(
|
|
66
76
|
PropTypes.shape({
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
import {
|
|
3
|
+
generateSchemaObject,
|
|
4
|
+
breadcrumbsSchema,
|
|
5
|
+
organizationSchema,
|
|
6
|
+
moduleSchemas,
|
|
7
|
+
templateSchemas,
|
|
8
|
+
} from 'gatsby-core-theme/src/helpers/schema';
|
|
9
|
+
import { getUrl, getLanguage } from 'gatsby-core-theme/src/helpers/getters';
|
|
10
|
+
|
|
11
|
+
/* HardCoded Start */
|
|
12
|
+
const isIL = process.env.GATSBY_SITE_NAME === 'irishluck.ie';
|
|
13
|
+
const isNSA = process.env.GATSBY_SITE_NAME === 'norskespilleautomater.com';
|
|
14
|
+
const publishingPrinciples = isIL
|
|
15
|
+
? 'https://www.irishluck.ie/editorial-principles'
|
|
16
|
+
: 'https://www.norskespilleautomater.com/om-oss/prinsipper';
|
|
17
|
+
const knowsAbout = [
|
|
18
|
+
{
|
|
19
|
+
'@type': 'Thing',
|
|
20
|
+
name: 'Norway',
|
|
21
|
+
sameAs: [
|
|
22
|
+
'https://no.wikipedia.org/wiki/Norge',
|
|
23
|
+
'https://www.google.no/search?q=Norge&pws=0&nord=1&hl=no&gl=NO',
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
'@type': 'Thing',
|
|
28
|
+
name: 'LottStift',
|
|
29
|
+
sameAs: [
|
|
30
|
+
'https://no.wikipedia.org/wiki/Lotteri-_og_stiftelsestilsynet',
|
|
31
|
+
'https://www.google.no/search?q=lottstift&pws=0&nord=1&hl=no&gl=NO',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
'@type': 'Thing',
|
|
36
|
+
name: 'Kasino',
|
|
37
|
+
sameAs: [
|
|
38
|
+
'https://no.wikipedia.org/wiki/Kasino',
|
|
39
|
+
'https://www.google.no/search?q=Kasino&pws=0&nord=1&hl=no&gl=NO',
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
'@type': 'Thing',
|
|
44
|
+
name: 'Norsk Tipping Kommisjonær',
|
|
45
|
+
sameAs: [
|
|
46
|
+
'https://no.wikipedia.org/wiki/Norsk_Tipping',
|
|
47
|
+
'https://www.google.no/search?q=norsk+tipping&pws=0&nord=1&hl=no&gl=NO',
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const socialLinks = [
|
|
53
|
+
'facebook',
|
|
54
|
+
'instagram',
|
|
55
|
+
'linkedin',
|
|
56
|
+
'spotify',
|
|
57
|
+
'twitter',
|
|
58
|
+
'wikipedia',
|
|
59
|
+
'youtube',
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
function webPageSchema(page, pageImage) {
|
|
63
|
+
const schema = {
|
|
64
|
+
'@context': 'https://schema.org',
|
|
65
|
+
'@type': 'WebPage',
|
|
66
|
+
'@id': `${getUrl(page.path)}#webpage`,
|
|
67
|
+
url: getUrl(page.path),
|
|
68
|
+
name: page.meta_title || '',
|
|
69
|
+
description: page.meta_description || '',
|
|
70
|
+
inLanguage: getLanguage(page.language),
|
|
71
|
+
datePublished: page.created_at,
|
|
72
|
+
dateModified: page.updated_at,
|
|
73
|
+
isPartOf: {
|
|
74
|
+
'@type': 'WebSite',
|
|
75
|
+
'@id': `${process.env.GATSBY_SITE_URL}#website`,
|
|
76
|
+
url: `${process.env.GATSBY_SITE_URL}`,
|
|
77
|
+
inLanguage: getLanguage(page.language),
|
|
78
|
+
},
|
|
79
|
+
author: {
|
|
80
|
+
'@type': 'Organization',
|
|
81
|
+
name: page.siteSchema?.site_name || '',
|
|
82
|
+
alternateName: page.siteSchema?.alias_site_name || '',
|
|
83
|
+
foundingDate: page.siteSchema?.organization_founding_date || '',
|
|
84
|
+
publishingPrinciples:
|
|
85
|
+
page.siteSchema?.publishing_principles || (isIL || isNSA ? publishingPrinciples : null),
|
|
86
|
+
logo: {
|
|
87
|
+
'@type': 'ImageObject',
|
|
88
|
+
url: pageImage,
|
|
89
|
+
},
|
|
90
|
+
contactPoint: page.authors?.map((author) => ({
|
|
91
|
+
'@type': 'ContactPoint',
|
|
92
|
+
contactType: 'Author',
|
|
93
|
+
name: author.name || '',
|
|
94
|
+
email: author.email_address || '',
|
|
95
|
+
url: getUrl(author.profile_page_path || '/'),
|
|
96
|
+
})),
|
|
97
|
+
sameAs: socialLinks
|
|
98
|
+
.map((socialLink) => page.siteSchema?.[socialLink])
|
|
99
|
+
.filter((socialLink) => socialLink),
|
|
100
|
+
...(isNSA ? { knowsAbout } : {}),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
if (pageImage) {
|
|
105
|
+
schema.primaryImageOfPage = {
|
|
106
|
+
'@type': 'ImageObject',
|
|
107
|
+
'@id': `${getUrl(page.path)}#primaryimage`,
|
|
108
|
+
url: pageImage,
|
|
109
|
+
inLanguage: getLanguage(page.language),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (page.seo_keywords) {
|
|
114
|
+
schema.keywords = page.seo_keywords;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return JSON.stringify(generateSchemaObject(schema));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function schemaGenerator(page = {}, pageImage) {
|
|
121
|
+
const isReviewPage = page.type === 'operator' || page.type === 'game';
|
|
122
|
+
const jsonSchema = [
|
|
123
|
+
// Page Schema
|
|
124
|
+
page.seo_json_schema,
|
|
125
|
+
// Breadcrumbs Schema
|
|
126
|
+
page.breadcrumbs?.length ? breadcrumbsSchema(page.breadcrumbs, page.path) : null,
|
|
127
|
+
// Modules Schemas
|
|
128
|
+
// Temporary Change for removing webpageschema
|
|
129
|
+
!isReviewPage ? webPageSchema(page, pageImage) : null,
|
|
130
|
+
organizationSchema(page, pageImage),
|
|
131
|
+
templateSchemas(page, pageImage),
|
|
132
|
+
...(page.sections?.main?.modules
|
|
133
|
+
? moduleSchemas(page.sections.main.modules, page.path)
|
|
134
|
+
: [null]),
|
|
135
|
+
];
|
|
136
|
+
|
|
137
|
+
return jsonSchema;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export {
|
|
141
|
+
generateSchemaObject,
|
|
142
|
+
breadcrumbsSchema,
|
|
143
|
+
organizationSchema,
|
|
144
|
+
moduleSchemas,
|
|
145
|
+
templateSchemas,
|
|
146
|
+
webPageSchema,
|
|
147
|
+
schemaGenerator,
|
|
148
|
+
};
|
|
@@ -96,9 +96,12 @@
|
|
|
96
96
|
--spotlight-testimonials-text-size: 1.6rem;
|
|
97
97
|
|
|
98
98
|
--spotlight-boxes-border-color: #000;
|
|
99
|
+
--spotlight-boxes-border-radius: 1.6rem;
|
|
99
100
|
--spotlight-boxes-background-color: #fff;
|
|
100
101
|
--spotlight-boxes-label-color: #000;
|
|
102
|
+
--spotlight-boxes-label-line-height: 3rem;
|
|
101
103
|
--spotlight-boxes-label-size: 1.8rem;
|
|
104
|
+
--spotlight-boxes-label-padding: 0;
|
|
102
105
|
--spotlight-boxes-text-color: #000;
|
|
103
106
|
--spotlight-boxes-text-size: 1.4rem;
|
|
104
107
|
}
|