@griddo/cx 1.57.7 → 1.57.11
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/gatsby-config.js +1 -0
- package/package.json +5 -3
- package/src/components/PageElement.js +2 -51
- package/src/components/template.js +39 -3
package/gatsby-config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.57.
|
|
4
|
+
"version": "1.57.11",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -54,9 +54,11 @@
|
|
|
54
54
|
"gatsby-plugin-react-helmet": "^4.0.0",
|
|
55
55
|
"gatsby-plugin-react-svg": "^3.0.1",
|
|
56
56
|
"gatsby-plugin-remove-generator": "^1.1.0",
|
|
57
|
+
"gatsby-plugin-sass": "^4.0.0",
|
|
57
58
|
"gatsby-plugin-styled-components": "^4.0.0",
|
|
58
59
|
"gatsby-plugin-svgr": "2.1.0",
|
|
59
60
|
"js2xmlparser": "^4.0.1",
|
|
61
|
+
"node-sass": "^7.0.1",
|
|
60
62
|
"opn": "^6.0.0",
|
|
61
63
|
"path-browserify": "^1.0.1",
|
|
62
64
|
"pkg-dir": "^5.0.0",
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
"react-helmet": "^6.0.0"
|
|
65
67
|
},
|
|
66
68
|
"devDependencies": {
|
|
67
|
-
"@griddo/eslint-config-back": "^1.57.
|
|
69
|
+
"@griddo/eslint-config-back": "^1.57.11",
|
|
68
70
|
"eslint": "^7.5.0",
|
|
69
71
|
"eslint-plugin-node": "^11.1.0",
|
|
70
72
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -96,5 +98,5 @@
|
|
|
96
98
|
"publishConfig": {
|
|
97
99
|
"access": "public"
|
|
98
100
|
},
|
|
99
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "c7a31b4c2c40de3d6531425b89e3de1c119f9291"
|
|
100
102
|
}
|
|
@@ -1,53 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { providers, translations, cloudinaryDefaults } from 'components';
|
|
3
|
-
import { Link } from 'gatsby';
|
|
4
|
-
|
|
5
|
-
const { SiteProvider } = providers;
|
|
6
|
-
|
|
7
1
|
export default function Page(props) {
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
props: {
|
|
11
|
-
pageContext: {
|
|
12
|
-
theme,
|
|
13
|
-
socials,
|
|
14
|
-
siteLangs,
|
|
15
|
-
cloudinaryName,
|
|
16
|
-
siteMetadata,
|
|
17
|
-
BUILD_MODE,
|
|
18
|
-
page: { site: siteId, apiUrl, publicApiUrl },
|
|
19
|
-
sitePages,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
} = props;
|
|
23
|
-
|
|
24
|
-
const mappedTheme = !theme ? theme : 'default-theme';
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<SiteProvider
|
|
28
|
-
theme={mappedTheme}
|
|
29
|
-
cloudinaryCloudName={cloudinaryName}
|
|
30
|
-
linkComponent={Link}
|
|
31
|
-
googleMapAPIKey="AIzaSyBVJ_qu0_-4EzAVuLVoP93f7wLlXHzVVPQ"
|
|
32
|
-
socials={socials}
|
|
33
|
-
siteLangs={siteLangs}
|
|
34
|
-
translations={translations}
|
|
35
|
-
cloudinaryDefaults={cloudinaryDefaults}
|
|
36
|
-
siteMetadata={siteMetadata}
|
|
37
|
-
renderer="gatsby"
|
|
38
|
-
buildMode={BUILD_MODE}
|
|
39
|
-
siteId={siteId}
|
|
40
|
-
// {apiUrl} también se está enviando en el PageProvider en el archivo
|
|
41
|
-
// template.js. Se va a dejar por motivos de retrocompatibilidad
|
|
42
|
-
// (Se sabe que el proyecto de IE lo está usando desde el PageProvider)
|
|
43
|
-
// En alguna versión se procederá a deprecarlo y ya solo se podrá obtener
|
|
44
|
-
// la url de la api pública mediante el proveedor de site <SiteProvider>
|
|
45
|
-
// utilizando convenientemente el hook useSite()
|
|
46
|
-
apiUrl={apiUrl}
|
|
47
|
-
publicApiUrl={publicApiUrl}
|
|
48
|
-
sitePages={sitePages}
|
|
49
|
-
>
|
|
50
|
-
{element}
|
|
51
|
-
</SiteProvider>
|
|
52
|
-
);
|
|
2
|
+
const { element } = props;
|
|
3
|
+
return element;
|
|
53
4
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Link } from 'gatsby';
|
|
2
3
|
import Seo from './seo';
|
|
3
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
core,
|
|
6
|
+
components,
|
|
7
|
+
templates,
|
|
8
|
+
providers,
|
|
9
|
+
cloudinaryDefaults,
|
|
10
|
+
translations,
|
|
11
|
+
} from 'components';
|
|
12
|
+
|
|
4
13
|
const { Page: RenderGriddoPage } = core;
|
|
14
|
+
const { SiteProvider } = providers;
|
|
5
15
|
|
|
6
16
|
export default data => {
|
|
7
17
|
const {
|
|
@@ -14,6 +24,13 @@ export default data => {
|
|
|
14
24
|
siteMetadata,
|
|
15
25
|
componentsVersion,
|
|
16
26
|
showBasicMetaRobots,
|
|
27
|
+
theme,
|
|
28
|
+
cloudinaryName,
|
|
29
|
+
socials,
|
|
30
|
+
siteLangs,
|
|
31
|
+
BUILD_MODE,
|
|
32
|
+
page: { site: siteId, apiUrl, publicApiUrl },
|
|
33
|
+
sitePages,
|
|
17
34
|
} = data.pageContext;
|
|
18
35
|
|
|
19
36
|
const library = {
|
|
@@ -21,8 +38,26 @@ export default data => {
|
|
|
21
38
|
templates,
|
|
22
39
|
};
|
|
23
40
|
|
|
41
|
+
const mappedTheme = theme || 'default-theme';
|
|
42
|
+
|
|
24
43
|
return (
|
|
25
|
-
|
|
44
|
+
<SiteProvider
|
|
45
|
+
theme={mappedTheme}
|
|
46
|
+
cloudinaryCloudName={cloudinaryName}
|
|
47
|
+
linkComponent={Link}
|
|
48
|
+
googleMapAPIKey="AIzaSyBVJ_qu0_-4EzAVuLVoP93f7wLlXHzVVPQ"
|
|
49
|
+
socials={socials}
|
|
50
|
+
siteLangs={siteLangs}
|
|
51
|
+
translations={translations}
|
|
52
|
+
cloudinaryDefaults={cloudinaryDefaults}
|
|
53
|
+
siteMetadata={siteMetadata}
|
|
54
|
+
renderer="gatsby"
|
|
55
|
+
buildMode={BUILD_MODE}
|
|
56
|
+
siteId={siteId}
|
|
57
|
+
apiUrl={apiUrl}
|
|
58
|
+
publicApiUrl={publicApiUrl}
|
|
59
|
+
sitePages={sitePages}
|
|
60
|
+
>
|
|
26
61
|
<Seo
|
|
27
62
|
siteMetadata={siteMetadata}
|
|
28
63
|
openGraph={openGraph}
|
|
@@ -61,6 +96,7 @@ export default data => {
|
|
|
61
96
|
+---------------------------+
|
|
62
97
|
|
|
63
98
|
*/}
|
|
99
|
+
|
|
64
100
|
<RenderGriddoPage
|
|
65
101
|
content={content}
|
|
66
102
|
header={header}
|
|
@@ -70,6 +106,6 @@ export default data => {
|
|
|
70
106
|
languageId={content.language}
|
|
71
107
|
pageLanguages={content.pageLanguages}
|
|
72
108
|
/>
|
|
73
|
-
|
|
109
|
+
</SiteProvider>
|
|
74
110
|
);
|
|
75
111
|
};
|