@openeventkit/event-site 2.1.18-beta.2 → 2.1.18
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.1.18
|
|
4
|
+
"version": "2.1.18",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/server": "^11.11.0",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
10
10
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
11
11
|
"@loadable/component": "^5.16.4",
|
|
12
|
-
"@mdx-js/
|
|
13
|
-
"@mdx-js/
|
|
12
|
+
"@mdx-js/react": "^3.0.1",
|
|
13
|
+
"@mdx-js/runtime": "^1.6.22",
|
|
14
14
|
"@mui/base": "^5.0.0-beta.40",
|
|
15
15
|
"@mui/icons-material": "^5.15.20",
|
|
16
16
|
"@mui/material": "^5.15.20",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"redux-thunk": "^2.4.1",
|
|
124
124
|
"rehype-external-links": "^3.0.0",
|
|
125
125
|
"rehype-mdx-import-media": "^1.2.0",
|
|
126
|
-
"remark-gfm": "^4.0.
|
|
126
|
+
"remark-gfm": "^4.0.0",
|
|
127
127
|
"sass": "^1.49.9",
|
|
128
128
|
"schedule-filter-widget": "3.0.4-beta.2",
|
|
129
129
|
"simple-chat-widget": "^1.0.31",
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
+
import Mdx from "@mdx-js/runtime";
|
|
3
4
|
import ContentPageTemplate from "../../templates/content-page/template";
|
|
4
5
|
import shortcodes from "../../templates/content-page/shortcodes";
|
|
5
|
-
import Mdx from "../../components/Mdx";
|
|
6
6
|
|
|
7
7
|
// function to transform content by replacing relative image URLs with absolute ones
|
|
8
8
|
const transformContent = (mdx, getAsset) => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// regex to identify Markdown image tags 
|
|
10
|
+
const imageRegex = /!\[([^\]]*)\]\(([^)]+)\)/g;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
return mdx.replace(imageRegex, (match, alt, url) => {
|
|
13
|
+
// check if the URL is relative (does not start with http:// or https://)
|
|
14
|
+
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
|
15
|
+
const asset = getAsset(url);
|
|
16
|
+
if (asset && asset.url) {
|
|
17
|
+
return ``;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return match; // return the original match if it's already an absolute URL
|
|
21
|
+
});
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// function to render transformed content with Mdx
|
|
25
25
|
const renderContent = (mdx, getAsset) => (
|
|
26
|
-
|
|
26
|
+
<Mdx components={shortcodes}>
|
|
27
|
+
{transformContent(mdx, getAsset)}
|
|
28
|
+
</Mdx>
|
|
27
29
|
);
|
|
28
30
|
|
|
29
31
|
const ContentPagePreview = ({ entry, getAsset }) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const title = entry.getIn(["data", "title"]);
|
|
33
|
+
const body = entry.getIn(["data", "body"]);
|
|
34
|
+
return (
|
|
35
|
+
<ContentPageTemplate
|
|
36
|
+
title={title}
|
|
37
|
+
content={renderContent(body, getAsset)}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
ContentPagePreview.propTypes = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
entry: PropTypes.shape({
|
|
44
|
+
getIn: PropTypes.func.isRequired
|
|
45
|
+
}).isRequired,
|
|
46
|
+
getAsset: PropTypes.func.isRequired
|
|
45
47
|
};
|
|
46
48
|
|
|
47
|
-
export default ContentPagePreview;
|
|
49
|
+
export default ContentPagePreview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"favicon":{"asset":"icon.png"},"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"maintenanceMode":{"enabled":false,"title":"Site under maintenance","subtitle":"Please reload page shortly"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":
|
|
1
|
+
{"favicon":{"asset":"icon.png"},"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"maintenanceMode":{"enabled":false,"title":"Site under maintenance","subtitle":"Please reload page shortly"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":1755202866239},{"file":"src/data/events.json","build_time":1755202885829},{"file":"src/data/events.idx.json","build_time":1755202885863},{"file":"src/data/speakers.json","build_time":1755202892384},{"file":"src/data/speakers.idx.json","build_time":1755202892387},{"file":"src/content/sponsors.json","build_time":1755202892817},{"file":"src/data/voteable-presentations.json","build_time":1755202893268}],"lastBuild":1755202893268}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { navigate } from "gatsby";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { GatsbyImage, getImage } from "gatsby-plugin-image";
|
|
5
|
-
import Mdx from "
|
|
5
|
+
import Mdx from "@mdx-js/runtime";
|
|
6
6
|
import Container from "./Container";
|
|
7
7
|
import LiteScheduleComponent from "../../components/LiteScheduleComponent";
|
|
8
8
|
import DisqusComponent from "../../components/DisqusComponent";
|
|
@@ -22,47 +22,49 @@ const onEventClick = (ev) => navigate(`/a/event/${ev.id}`);
|
|
|
22
22
|
|
|
23
23
|
const MainColumn = ({ widgets, summitPhase, isLoggedUser, onEventClick, lastDataSync, fullWidth, maxHeight }) => {
|
|
24
24
|
const { content, schedule, disqus, image } = widgets || {};
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
const scheduleProps = schedule && isLoggedUser && summitPhase !== PHASES.BEFORE ? { onEventClick } : {};
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
29
|
+
<div
|
|
30
|
+
className={`column pt-6 pb-5 px-6 ${!fullWidth ? "is-half" : ""} ${styles.mainColumn || ""}`}
|
|
31
|
+
style={{ maxHeight: !fullWidth && maxHeight ? maxHeight : "none", overflowY: "auto" }}
|
|
32
|
+
>
|
|
33
|
+
<Container>
|
|
34
|
+
{content?.display && content?.body && (
|
|
35
|
+
<Mdx components={shortcodes}>
|
|
36
|
+
{content.body}
|
|
37
|
+
</Mdx>
|
|
38
|
+
)}
|
|
39
|
+
{schedule?.display && (
|
|
40
|
+
<>
|
|
41
|
+
<h2><b>{schedule.title}</b></h2>
|
|
42
|
+
<LiteScheduleComponent
|
|
43
|
+
{...scheduleProps}
|
|
44
|
+
lastDataSync={lastDataSync}
|
|
45
|
+
id={`marketing_lite_schedule_${lastDataSync}`}
|
|
46
|
+
page="marketing-site"
|
|
47
|
+
showAllEvents={true}
|
|
48
|
+
showSearch={false}
|
|
49
|
+
showNav={true}
|
|
50
|
+
/>
|
|
51
|
+
</>
|
|
52
|
+
)}
|
|
53
|
+
{disqus?.display && (
|
|
54
|
+
<>
|
|
55
|
+
<h2><b>{disqus.title}</b></h2>
|
|
56
|
+
<DisqusComponent page="marketing-site" />
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
59
|
+
{image?.display && image?.image?.src && (
|
|
60
|
+
<>
|
|
61
|
+
<h2><b>{image.title}</b></h2>
|
|
62
|
+
<br/>
|
|
63
|
+
<GatsbyImage image={getImage(image.image.src)} alt={image.image.alt ?? ""} />
|
|
64
|
+
</>
|
|
65
|
+
)}
|
|
66
|
+
</Container>
|
|
67
|
+
</div>
|
|
66
68
|
);
|
|
67
69
|
};
|
|
68
70
|
|
|
@@ -75,4 +77,4 @@ MainColumn.propTypes = {
|
|
|
75
77
|
maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
76
78
|
};
|
|
77
79
|
|
|
78
|
-
export default MainColumn;
|
|
80
|
+
export default MainColumn;
|
package/src/components/Mdx.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { evaluateSync } from "@mdx-js/mdx";
|
|
3
|
-
import * as jsxRuntime from "react/jsx-runtime";
|
|
4
|
-
import remarkGfm from "remark-gfm";
|
|
5
|
-
import rehypeExternalLinks from "rehype-external-links";
|
|
6
|
-
import { MDXProvider } from "@mdx-js/react";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const Mdx = ({ content, shortcodes }) => {
|
|
10
|
-
const mdxContent = useMemo(() => {
|
|
11
|
-
if ( !content) return null;
|
|
12
|
-
try {
|
|
13
|
-
const { default: Comp } = evaluateSync(content, {
|
|
14
|
-
...jsxRuntime,
|
|
15
|
-
remarkPlugins: [remarkGfm],
|
|
16
|
-
rehypePlugins: [[rehypeExternalLinks, { target: "_blank", rel: ["nofollow","noopener","noreferrer"] }]],
|
|
17
|
-
useDynamicImport: false, // ensure no async imports in runtime content
|
|
18
|
-
});
|
|
19
|
-
return Comp;
|
|
20
|
-
} catch (err) {
|
|
21
|
-
console.error("MDX evaluate error:", err);
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}, [content]);
|
|
25
|
-
|
|
26
|
-
return <MDXProvider components={shortcodes}>{mdxContent}</MDXProvider>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default Mdx;
|