@openeventkit/event-site 2.0.68 → 2.0.71
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/package.json +3 -2
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/index.js +32 -1
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/typeDefs.js +5 -0
- package/src/content/site-settings/index.json +53 -1
- package/src/pages/index.js +4 -0
- package/src/styles/marketing.module.scss +3 -2
- package/src/templates/marketing-page-template.js +9 -3
- package/src/utils/customErrorHandler.js +10 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.71",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@mui/base": "^5.0.0-alpha.114",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"lodash": "^4.17.19",
|
|
72
72
|
"lz-string": "^1.4.4",
|
|
73
73
|
"markdown-it": "^12.0.0",
|
|
74
|
+
"markdown-to-jsx": "^7.3.2",
|
|
74
75
|
"moment": "^2.27.0",
|
|
75
76
|
"moment-timezone": "^0.5.31",
|
|
76
77
|
"netlify-cms-app": "^2.15.72",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"stream-browserify": "^3.0.0",
|
|
119
120
|
"stream-chat": "^2.7.2",
|
|
120
121
|
"stream-chat-react": "3.1.7",
|
|
121
|
-
"summit-registration-lite": "5.0.
|
|
122
|
+
"summit-registration-lite": "5.0.10",
|
|
122
123
|
"superagent": "8.0.9",
|
|
123
124
|
"sweetalert2": "^9.17.0",
|
|
124
125
|
"upcoming-events-widget": "3.0.4",
|
|
@@ -9,9 +9,23 @@ import {
|
|
|
9
9
|
listField,
|
|
10
10
|
imageWithAltField,
|
|
11
11
|
imagesField,
|
|
12
|
-
linkImagesField
|
|
12
|
+
linkImagesField,
|
|
13
|
+
markdownField
|
|
13
14
|
} from "../../../fields";
|
|
14
15
|
|
|
16
|
+
const markdownFieldButtons = [
|
|
17
|
+
"bold",
|
|
18
|
+
"italic",
|
|
19
|
+
"link",
|
|
20
|
+
"heading-one",
|
|
21
|
+
"heading-two",
|
|
22
|
+
"heading-three",
|
|
23
|
+
"heading-four",
|
|
24
|
+
"heading-five",
|
|
25
|
+
"bulleted-list",
|
|
26
|
+
"numbered-list"
|
|
27
|
+
];
|
|
28
|
+
|
|
15
29
|
import {
|
|
16
30
|
MARKETING_PAGE_FILE_PATH
|
|
17
31
|
} from "@utils/filePath";
|
|
@@ -116,6 +130,23 @@ const marketingPage = {
|
|
|
116
130
|
label: "Widgets",
|
|
117
131
|
name: "leftColumn",
|
|
118
132
|
fields: [
|
|
133
|
+
objectField({
|
|
134
|
+
label: "Text",
|
|
135
|
+
name: "text",
|
|
136
|
+
fields: [
|
|
137
|
+
booleanField({
|
|
138
|
+
label: "Display",
|
|
139
|
+
name: "display",
|
|
140
|
+
required: false
|
|
141
|
+
}),
|
|
142
|
+
markdownField({
|
|
143
|
+
label: "Content",
|
|
144
|
+
name: "content",
|
|
145
|
+
buttons: markdownFieldButtons,
|
|
146
|
+
editor_components: []
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
119
150
|
objectField({
|
|
120
151
|
label: "Schedule",
|
|
121
152
|
name: "schedule",
|
|
@@ -14,6 +14,10 @@ module.exports = `
|
|
|
14
14
|
size: Int
|
|
15
15
|
images: [LinkImageWithAlt]
|
|
16
16
|
}
|
|
17
|
+
type MarketingPageLeftColumnTextWidget {
|
|
18
|
+
display: Boolean
|
|
19
|
+
content: String
|
|
20
|
+
}
|
|
17
21
|
type MarketingPageLeftColumnWidget {
|
|
18
22
|
display: Boolean
|
|
19
23
|
title: String
|
|
@@ -24,6 +28,7 @@ module.exports = `
|
|
|
24
28
|
image: ImageWithAlt
|
|
25
29
|
}
|
|
26
30
|
type MarketingPageLeftColumn {
|
|
31
|
+
text: MarketingPageLeftColumnTextWidget
|
|
27
32
|
schedule: MarketingPageLeftColumnWidget
|
|
28
33
|
disqus: MarketingPageLeftColumnWidget
|
|
29
34
|
image: MarketingPageLeftColumnImageWidget
|
|
@@ -1 +1,53 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"widgets": {
|
|
3
|
+
"chat": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"showQA": false,
|
|
6
|
+
"showHelp": false,
|
|
7
|
+
"defaultScope": "page"
|
|
8
|
+
},
|
|
9
|
+
"schedule": {
|
|
10
|
+
"allowClick": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"favicons": {
|
|
14
|
+
"favicon180": "/img/favicon.png",
|
|
15
|
+
"favicon32": "/img/favicon.png",
|
|
16
|
+
"favicon16": "/img/favicon.png"
|
|
17
|
+
},
|
|
18
|
+
"staticJsonFilesBuildTime": [
|
|
19
|
+
{
|
|
20
|
+
"file": "src/data/summit.json",
|
|
21
|
+
"build_time": 1692386447666
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"file": "src/data/events.json",
|
|
25
|
+
"build_time": 1692386451064
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"file": "src/data/events.idx.json",
|
|
29
|
+
"build_time": 1692386451066
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"file": "src/data/speakers.json",
|
|
33
|
+
"build_time": 1692386451884
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"file": "src/data/speakers.idx.json",
|
|
37
|
+
"build_time": 1692386451884
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"file": "src/content/sponsors.json",
|
|
41
|
+
"build_time": 1692386455106
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"file": "src/data/voteable-presentations.json",
|
|
45
|
+
"build_time": 1692386457214
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"lastBuild": 1692386457215,
|
|
49
|
+
"siteMetadata": {
|
|
50
|
+
"title": "test!!",
|
|
51
|
+
"description": "TEST!!$DESC"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/pages/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { navigate } from "gatsby";
|
|
4
4
|
import { GatsbyImage, getImage } from "gatsby-plugin-image";
|
|
5
|
+
import Markdown from "markdown-to-jsx";
|
|
5
6
|
|
|
6
7
|
import Layout from "../components/Layout";
|
|
7
8
|
import AttendanceTrackerComponent from "../components/AttendanceTrackerComponent";
|
|
@@ -57,8 +58,13 @@ const MarketingPageTemplate = ({
|
|
|
57
58
|
marketingPageSettings={marketingPageJson}
|
|
58
59
|
/>
|
|
59
60
|
{summit && marketingPageJson.countdown?.display && <Countdown summit={summit} text={marketingPageJson?.countdown?.text} />}
|
|
60
|
-
<div className="columns"
|
|
61
|
-
<div className=
|
|
61
|
+
<div className="columns">
|
|
62
|
+
<div className={`column is-half mt-3 px-6 py-6 ${styles.leftColumn}`} style={{ position: 'relative' }}>
|
|
63
|
+
{marketingPageJson.leftColumn?.text?.content && marketingPageJson.leftColumn?.text?.display &&
|
|
64
|
+
<Markdown>
|
|
65
|
+
{marketingPageJson.leftColumn.text.content}
|
|
66
|
+
</Markdown>
|
|
67
|
+
}
|
|
62
68
|
{marketingPageJson.leftColumn?.schedule?.display &&
|
|
63
69
|
<>
|
|
64
70
|
<h2><b>{marketingPageJson.leftColumn.schedule.title}</b></h2>
|
|
@@ -88,7 +94,7 @@ const MarketingPageTemplate = ({
|
|
|
88
94
|
</>
|
|
89
95
|
}
|
|
90
96
|
</div>
|
|
91
|
-
<div className=
|
|
97
|
+
<div className={`column is-half px-0 pb-0 ${styles.rightColumn}`}>
|
|
92
98
|
<Masonry
|
|
93
99
|
breakpointCols={2}
|
|
94
100
|
className="my-masonry-grid"
|
|
@@ -12,12 +12,17 @@ export const customErrorHandler = (err, res) => (dispatch, state) => {
|
|
|
12
12
|
expiredToken(err);
|
|
13
13
|
break;
|
|
14
14
|
case 412:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const errors = err?.response?.body?.errors;
|
|
16
|
+
if(errors) {
|
|
17
|
+
for (let [key, value] of Object.entries(errors)) {
|
|
18
|
+
if (isNaN(key)) {
|
|
19
|
+
msg += key + ': ';
|
|
20
|
+
}
|
|
21
|
+
msg += value + '<br>';
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
} else {
|
|
24
|
+
msg = 'There was a problem with our server, please contact admin.';
|
|
25
|
+
}
|
|
21
26
|
Swal.fire("Validation error", msg, "warning");
|
|
22
27
|
break;
|
|
23
28
|
default:
|