@openeventkit/event-site 2.0.114 → 2.0.116
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-browser.js +3 -3
- package/gatsby-config.mjs +9 -8
- package/gatsby-node.js +25 -27
- package/package.json +3 -3
- package/src/cms/config/collections/defaultPagesCollection/invitationsRejectPage/index.js +6 -6
- package/src/components/AuthComponent.js +29 -24
- package/src/components/Container.js +9 -0
- package/src/components/Footer/template.js +3 -2
- package/src/components/FooterMarketing.js +1 -1
- package/src/components/IconButton/index.js +21 -0
- package/src/components/IconButton/styles.module.scss +31 -0
- package/src/components/MarketingHero/ImagesColumn.js +41 -0
- package/src/components/MarketingHero/MainColumn.js +38 -0
- package/src/components/MarketingHero/index.js +44 -0
- package/src/components/MarketingHero/styles.module.scss +73 -0
- package/src/components/RegistrationLiteComponent.js +27 -25
- package/src/components/Seo.js +3 -3
- package/src/components/SponsorHeader.js +10 -21
- package/src/content/site-settings/index.json +4 -9
- package/src/defaults/colors.json +33 -1
- package/src/styles/auth-component.module.scss +37 -0
- package/src/styles/colors.scss +36 -33
- package/src/styles/fonts.scss +11 -16
- package/src/styles/marketing.module.scss +7 -11
- package/src/styles/style.scss +0 -49
- package/src/templates/content-page/Container.js +3 -0
- package/src/templates/content-page/template.js +3 -2
- package/src/templates/marketing-page-template/Container.js +3 -0
- package/src/templates/marketing-page-template/MainColumn.js +80 -0
- package/src/templates/marketing-page-template/Masonry.js +71 -0
- package/src/templates/marketing-page-template/index.js +72 -0
- package/src/templates/marketing-page-template/styles.module.scss +11 -0
- package/src/utils/envVariables.js +94 -94
- package/src/utils/filePath.js +2 -2
- package/src/utils/hooks/index.js +5 -0
- package/src/utils/hooks/useResize.js +19 -0
- package/src/utils/scssUtils.js +146 -0
- package/src/utils/useSiteSettings.js +1 -5
- package/src/components/MarketingHeroComponent.js +0 -120
- package/src/styles/login-button.module.scss +0 -84
- package/src/styles/marketing-hero.module.scss +0 -200
- package/src/templates/marketing-page-template.js +0 -194
- package/src/utils/cssUtils.js +0 -62
package/gatsby-browser.js
CHANGED
|
@@ -34,9 +34,9 @@ export const onClientEntry = () => {
|
|
|
34
34
|
document.documentElement.style.setProperty(`--${key}50`, `${value}50`);
|
|
35
35
|
});
|
|
36
36
|
// set theme
|
|
37
|
-
const themeSetting = marketingSettings.find(ms => ms.key ===
|
|
38
|
-
const theme = themeSetting?.value ||
|
|
39
|
-
document.documentElement.setAttribute(
|
|
37
|
+
const themeSetting = marketingSettings.find(ms => ms.key === "EVENT_SITE_COLOR_SCHEME");
|
|
38
|
+
const theme = themeSetting?.value || "LIGHT";
|
|
39
|
+
document.documentElement.setAttribute("data-theme", theme);
|
|
40
40
|
|
|
41
41
|
// init sentry
|
|
42
42
|
const GATSBY_SENTRY_DSN = process.env.GATSBY_SENTRY_DSN;
|
package/gatsby-config.mjs
CHANGED
|
@@ -26,26 +26,27 @@ const {
|
|
|
26
26
|
let siteSettings = require(`./${SITE_SETTINGS_FILE_PATH}`);
|
|
27
27
|
try {
|
|
28
28
|
siteSettings = require(path.resolve(SITE_SETTINGS_FILE_PATH));
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
29
|
+
} catch (e) {
|
|
31
30
|
console.log("Falling back to default site settings.")
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
const
|
|
35
|
-
|
|
33
|
+
const packageJson = require(path.resolve(__dirname, "package.json"));
|
|
34
|
+
|
|
35
|
+
const title = siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE;
|
|
36
|
+
const description = siteSettings?.siteMetadata?.description || process.env.GATSBY_METADATA_DESCRIPTION;
|
|
36
37
|
const faviconAsset = siteSettings?.favicon?.asset;
|
|
37
38
|
|
|
38
39
|
const manifestPlugin = faviconAsset ? [
|
|
39
40
|
{
|
|
40
41
|
resolve: "gatsby-plugin-manifest",
|
|
41
42
|
options: {
|
|
42
|
-
name: title,
|
|
43
|
-
short_name: title,
|
|
44
|
-
description: description,
|
|
43
|
+
name: title ?? packageJson.description,
|
|
44
|
+
short_name: title ?? packageJson.description,
|
|
45
45
|
start_url: "/",
|
|
46
46
|
display: "minimal-ui",
|
|
47
47
|
icon: path.join(SITE_SETTINGS_DIR_PATH, faviconAsset),
|
|
48
|
-
include_favicon: true
|
|
48
|
+
include_favicon: true,
|
|
49
|
+
...description && { description }
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
] : [];
|
package/gatsby-node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const axios = require("axios");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const fs = require("fs
|
|
3
|
+
const fs = require("fs");
|
|
4
4
|
const webpack = require("webpack");
|
|
5
5
|
const {
|
|
6
6
|
createFilePath
|
|
@@ -16,6 +16,7 @@ const {
|
|
|
16
16
|
REQUIRED_DIR_PATHS,
|
|
17
17
|
DEFAULT_COLORS_FILE_PATH,
|
|
18
18
|
COLORS_FILE_PATH,
|
|
19
|
+
COLORS_SCSS_FILE_PATH,
|
|
19
20
|
SITE_SETTINGS_FILE_PATH,
|
|
20
21
|
SUMMIT_FILE_PATH,
|
|
21
22
|
EVENTS_FILE_PATH,
|
|
@@ -29,7 +30,12 @@ const {
|
|
|
29
30
|
SPONSORS_FILE_PATH,
|
|
30
31
|
FONTS_SCSS_FILE_PATH
|
|
31
32
|
} = require("./src/utils/filePath");
|
|
32
|
-
|
|
33
|
+
|
|
34
|
+
const {
|
|
35
|
+
generateAndWriteScssFile,
|
|
36
|
+
generateFontScssFile,
|
|
37
|
+
generateColorsScssFile
|
|
38
|
+
} = require("./src/utils/scssUtils");
|
|
33
39
|
|
|
34
40
|
const fileBuildTimes = [];
|
|
35
41
|
|
|
@@ -228,8 +234,8 @@ exports.onPreBootstrap = async () => {
|
|
|
228
234
|
const summitId = process.env.GATSBY_SUMMIT_ID;
|
|
229
235
|
const summitApiBaseUrl = process.env.GATSBY_SUMMIT_API_BASE_URL;
|
|
230
236
|
let marketingSettings = await SSR_getMarketingSettings(process.env.GATSBY_MARKETING_API_BASE_URL, summitId);
|
|
231
|
-
const colorSettings = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
|
|
232
237
|
const siteSettings = fs.existsSync(SITE_SETTINGS_FILE_PATH) ? JSON.parse(fs.readFileSync(SITE_SETTINGS_FILE_PATH)) : {};
|
|
238
|
+
const colors = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
|
|
233
239
|
|
|
234
240
|
const config = {
|
|
235
241
|
client: {
|
|
@@ -247,12 +253,12 @@ exports.onPreBootstrap = async () => {
|
|
|
247
253
|
|
|
248
254
|
const accessToken = await getAccessToken(config, process.env.GATSBY_BUILD_SCOPES).then(({ token }) => token.access_token);
|
|
249
255
|
|
|
250
|
-
const FileType =
|
|
256
|
+
const FileType = "FILE";
|
|
251
257
|
// extract colors from marketing settings
|
|
252
|
-
marketingSettings = marketingSettings.map(
|
|
253
|
-
if (entry.key.startsWith("color_"))
|
|
254
|
-
if(entry.type === FileType) return {...entry, value: entry.file};
|
|
255
|
-
return {...entry};
|
|
258
|
+
marketingSettings = marketingSettings.map(entry => {
|
|
259
|
+
if (entry.key.startsWith("color_")) colors[entry.key] = entry.value;
|
|
260
|
+
if (entry.type === FileType) return { ...entry, value: entry.file };
|
|
261
|
+
return { ...entry };
|
|
256
262
|
});
|
|
257
263
|
|
|
258
264
|
// create required directories
|
|
@@ -263,7 +269,17 @@ exports.onPreBootstrap = async () => {
|
|
|
263
269
|
});
|
|
264
270
|
|
|
265
271
|
fs.writeFileSync(MARKETING_SETTINGS_FILE_PATH, JSON.stringify(marketingSettings), "utf8");
|
|
266
|
-
|
|
272
|
+
|
|
273
|
+
// write colors json used to set runtime colors in gatsby-browser
|
|
274
|
+
fs.writeFileSync(COLORS_FILE_PATH, JSON.stringify(colors), "utf8");
|
|
275
|
+
|
|
276
|
+
// generate and write colors SCSS file used by built styles
|
|
277
|
+
generateAndWriteScssFile(generateColorsScssFile, colors, COLORS_SCSS_FILE_PATH);
|
|
278
|
+
|
|
279
|
+
if (siteSettings.siteFont) {
|
|
280
|
+
// generate and write font SCSS file used by built styles
|
|
281
|
+
generateAndWriteScssFile(generateFontScssFile, siteSettings.siteFont, FONTS_SCSS_FILE_PATH);
|
|
282
|
+
}
|
|
267
283
|
|
|
268
284
|
// summit
|
|
269
285
|
const summit = await SSR_getSummit(summitApiBaseUrl, summitId);
|
|
@@ -292,7 +308,6 @@ exports.onPreBootstrap = async () => {
|
|
|
292
308
|
});
|
|
293
309
|
fs.writeFileSync(EVENTS_IDX_FILE_PATH, JSON.stringify(allEventsIDX), "utf8");
|
|
294
310
|
|
|
295
|
-
|
|
296
311
|
// Show Speakers
|
|
297
312
|
const allSpeakers = await SSR_getSpeakers(summitApiBaseUrl, summitId, accessToken);
|
|
298
313
|
console.log(`allSpeakers ${allSpeakers.length}`);
|
|
@@ -335,23 +350,6 @@ exports.onPreBootstrap = async () => {
|
|
|
335
350
|
siteSettings.lastBuild = Date.now();
|
|
336
351
|
|
|
337
352
|
fs.writeFileSync(SITE_SETTINGS_FILE_PATH, JSON.stringify(siteSettings), "utf8");
|
|
338
|
-
|
|
339
|
-
// Read fonts from site settings
|
|
340
|
-
const siteFonts = siteSettings.siteFont;
|
|
341
|
-
|
|
342
|
-
if(siteFonts && Object.keys(siteFonts).length > 0) {
|
|
343
|
-
// Generate the SCSS file
|
|
344
|
-
const scssFontsFile = generateFontFile(siteFonts);
|
|
345
|
-
if (scssFontsFile) {
|
|
346
|
-
const standalone = __dirname === path.resolve();
|
|
347
|
-
let fontFilePath = FONTS_SCSS_FILE_PATH;
|
|
348
|
-
if (!standalone) {
|
|
349
|
-
fontFilePath = `${__dirname}/${fontFilePath}`;
|
|
350
|
-
}
|
|
351
|
-
fs.writeFileSync(fontFilePath, scssFontsFile);
|
|
352
|
-
console.log(`CUSTOM FONT FILE ${fontFilePath} generated.`);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
353
|
};
|
|
356
354
|
|
|
357
355
|
exports.createSchemaCustomization = async ({ actions, reporter, getNodeAndSavePathDependency }) => {
|
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.116",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@vimeo/player": "^2.16.3",
|
|
29
29
|
"ably": "^1.2.34",
|
|
30
30
|
"assert": "^2.1.0",
|
|
31
|
-
"attendee-to-attendee-widget": "3.0
|
|
31
|
+
"attendee-to-attendee-widget": "3.1.0",
|
|
32
32
|
"awesome-bootstrap-checkbox": "^1.0.1",
|
|
33
33
|
"axios": "^0.19.2",
|
|
34
34
|
"babel-preset-gatsby": "^3.13.2",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"react-redux": "^7.2.6",
|
|
105
105
|
"react-rte": "^0.16.3",
|
|
106
106
|
"react-select": "^2.4.4",
|
|
107
|
-
"react-slick": "^0.
|
|
107
|
+
"react-slick": "^0.30.2",
|
|
108
108
|
"react-star-ratings": "^2.3.0",
|
|
109
109
|
"react-stars": "^2.2.5",
|
|
110
110
|
"react-tabs": "^3.0.0",
|
|
@@ -20,18 +20,18 @@ const invitationsRejectPage = {
|
|
|
20
20
|
required: false,
|
|
21
21
|
default: "Invitation not found."
|
|
22
22
|
}),
|
|
23
|
-
stringField({
|
|
24
|
-
label: "Rejected text",
|
|
25
|
-
name: "rejectedText",
|
|
26
|
-
required: false,
|
|
27
|
-
default: "Invitation has already been rejected."
|
|
28
|
-
}),
|
|
29
23
|
stringField({
|
|
30
24
|
label: "Reject text",
|
|
31
25
|
name: "rejectText",
|
|
32
26
|
required: false,
|
|
33
27
|
default: "To reject please click on the button below."
|
|
34
28
|
}),
|
|
29
|
+
stringField({
|
|
30
|
+
label: "Reject Confirmation Text",
|
|
31
|
+
name: "rejectedText",
|
|
32
|
+
required: false,
|
|
33
|
+
default: "Invitation has already been rejected."
|
|
34
|
+
}),
|
|
35
35
|
stringField({
|
|
36
36
|
label: "Reject CTA label",
|
|
37
37
|
name: "rejectCTALabel",
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import React, { useEffect, useState, useMemo } from "react"
|
|
2
|
-
import
|
|
1
|
+
import React, { useEffect, useState, useMemo } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { navigate } from "gatsby";
|
|
3
4
|
import { connect } from "react-redux";
|
|
4
|
-
import URI from "urijs"
|
|
5
|
-
|
|
6
|
-
import LoginComponent from 'summit-registration-lite/dist/components/login';
|
|
7
|
-
import PasswordlessLoginComponent from 'summit-registration-lite/dist/components/login-passwordless';
|
|
5
|
+
import URI from "urijs";
|
|
6
|
+
|
|
8
7
|
import FragmentParser from "openstack-uicore-foundation/lib/utils/fragment-parser";
|
|
9
|
-
import { doLogin, passwordlessStart } from
|
|
8
|
+
import { doLogin, passwordlessStart } from "openstack-uicore-foundation/lib/security/methods";
|
|
10
9
|
import { setPasswordlessLogin, setUserOrder, checkOrderData } from "../actions/user-actions";
|
|
11
10
|
import { getThirdPartyProviders } from "../actions/base-actions";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
import
|
|
11
|
+
|
|
12
|
+
// these two libraries are client-side only
|
|
13
|
+
import LoginComponent from "summit-registration-lite/dist/components/login";
|
|
14
|
+
import PasswordlessLoginComponent from "summit-registration-lite/dist/components/login-passwordless";
|
|
15
|
+
import "summit-registration-lite/dist/index.css";
|
|
16
|
+
import IconButton from "./IconButton";
|
|
16
17
|
import Link from "./Link";
|
|
17
18
|
|
|
19
|
+
import { getDefaultLocation, validateIdentityProviderButtons } from "@utils/loginUtils";
|
|
20
|
+
import { userHasAccessLevel, VirtualAccessLevel } from "@utils/authorizedGroups";
|
|
21
|
+
import useSiteSettings from "@utils/useSiteSettings";
|
|
18
22
|
import { PHASES } from "@utils/phasesUtils";
|
|
19
|
-
import { getDefaultLocation } from "@utils/loginUtils";
|
|
20
|
-
import { userHasAccessLevel, VirtualAccessLevel } from "../utils/authorizedGroups";
|
|
21
23
|
|
|
22
|
-
import
|
|
24
|
+
import styles from "../styles/auth-component.module.scss";
|
|
23
25
|
|
|
24
26
|
const AuthComponent = ({
|
|
25
27
|
getThirdPartyProviders,
|
|
@@ -166,23 +168,26 @@ const AuthComponent = ({
|
|
|
166
168
|
const { loginButton } = marketingPageSettings.hero.buttons;
|
|
167
169
|
|
|
168
170
|
const defaultLoginButton = () => (
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
<IconButton
|
|
172
|
+
iconClass="fa fa-2x fa-edit"
|
|
173
|
+
buttonText={loginButton.text}
|
|
174
|
+
onClick={handleOpenPopup}
|
|
175
|
+
/>
|
|
173
176
|
);
|
|
174
177
|
|
|
175
178
|
const defaultEnterButton = () => (
|
|
176
|
-
<Link
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
<Link
|
|
180
|
+
to={defaultPath}
|
|
181
|
+
>
|
|
182
|
+
<IconButton
|
|
183
|
+
iconClass="fa fa-2x fa-sign-in"
|
|
184
|
+
buttonText="Enter"
|
|
185
|
+
/>
|
|
181
186
|
</Link>
|
|
182
187
|
);
|
|
183
188
|
|
|
184
189
|
return (
|
|
185
|
-
<div style={style} className={styles.
|
|
190
|
+
<div style={style} className={styles.authComponent}>
|
|
186
191
|
{!isLoggedUser ?
|
|
187
192
|
renderLoginButton ? renderLoginButton(handleOpenPopup) : defaultLoginButton()
|
|
188
193
|
:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
2
3
|
import FooterMarketing from "../FooterMarketing";
|
|
3
4
|
import Link from "../Link";
|
|
4
5
|
|
|
@@ -29,7 +30,7 @@ const FooterTemplate = ({ data, summit, marketing }) => {
|
|
|
29
30
|
{data.social.networks.map((net, index) => (
|
|
30
31
|
net.display &&
|
|
31
32
|
<Link to={net.link} key={index}>
|
|
32
|
-
<
|
|
33
|
+
<FontAwesomeIcon icon={`fa-brands ${net.icon}`} size="lg" />
|
|
33
34
|
</Link>
|
|
34
35
|
))}
|
|
35
36
|
</div>
|
|
@@ -81,7 +82,7 @@ const FooterTemplate = ({ data, summit, marketing }) => {
|
|
|
81
82
|
{data.social.networks.map((net, index) => (
|
|
82
83
|
net.display &&
|
|
83
84
|
<Link to={net.link} className={styles.link} key={index}>
|
|
84
|
-
<
|
|
85
|
+
<FontAwesomeIcon icon={`fa-brands ${net.icon}`} size="lg" />
|
|
85
86
|
</Link>
|
|
86
87
|
))}
|
|
87
88
|
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styles from "./styles.module.scss";
|
|
3
|
+
|
|
4
|
+
const IconButton = ({
|
|
5
|
+
className = "",
|
|
6
|
+
iconClass = "",
|
|
7
|
+
buttonText,
|
|
8
|
+
onClick = () => {},
|
|
9
|
+
disabled = false
|
|
10
|
+
}) => (
|
|
11
|
+
<button
|
|
12
|
+
className={`button is-large mt-5 ${styles.button} ${className}`}
|
|
13
|
+
onClick={onClick}
|
|
14
|
+
disabled={disabled}
|
|
15
|
+
>
|
|
16
|
+
<i className={`icon ${iconClass}`} />
|
|
17
|
+
<b>{buttonText}</b>
|
|
18
|
+
</button>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export default IconButton;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
background-color: transparent!important;
|
|
3
|
+
color: #fff!important;
|
|
4
|
+
height: 5rem!important;
|
|
5
|
+
width: 20rem!important;
|
|
6
|
+
i {
|
|
7
|
+
color: #fff;
|
|
8
|
+
height: 1em!important;
|
|
9
|
+
width: 2.5em!important;
|
|
10
|
+
font-size: 1.8em!important;
|
|
11
|
+
}
|
|
12
|
+
b {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
&:hover,
|
|
18
|
+
&:active {
|
|
19
|
+
border-color: #fff!important;
|
|
20
|
+
}
|
|
21
|
+
&:focus {
|
|
22
|
+
border-color: #fff!important;
|
|
23
|
+
}
|
|
24
|
+
&.register {
|
|
25
|
+
background-color: #fff!important;
|
|
26
|
+
color: #6d6e71!important;
|
|
27
|
+
i {
|
|
28
|
+
color: #6d6e71!important;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GatsbyImage, getImage, getSrc } from "gatsby-plugin-image";
|
|
3
|
+
import Slider from "react-slick";
|
|
4
|
+
|
|
5
|
+
import styles from "./styles.module.scss";
|
|
6
|
+
|
|
7
|
+
const sliderSettings = {
|
|
8
|
+
autoplay: false,
|
|
9
|
+
autoplaySpeed: 5000,
|
|
10
|
+
infinite: true,
|
|
11
|
+
dots: false,
|
|
12
|
+
slidesToShow: 1,
|
|
13
|
+
slidesToScroll: 1
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const ImagesColumn = ({ images }) => {
|
|
17
|
+
return images.length === 0 ? null : (
|
|
18
|
+
<div className={`column is-half p-0 ${styles.imagesColumn}`}>
|
|
19
|
+
{images.length > 1 ? (
|
|
20
|
+
<Slider {...sliderSettings} >
|
|
21
|
+
{images.map((image, index) => (
|
|
22
|
+
<img
|
|
23
|
+
key={index}
|
|
24
|
+
src={getSrc(image.src)}
|
|
25
|
+
alt={image.alt ?? ""}
|
|
26
|
+
/>
|
|
27
|
+
))}
|
|
28
|
+
</Slider>
|
|
29
|
+
) : (
|
|
30
|
+
<GatsbyImage
|
|
31
|
+
className={styles.singleImage}
|
|
32
|
+
image={getImage(images[0].src)}
|
|
33
|
+
alt={images[0].alt ?? ""}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default ImagesColumn;
|
|
41
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { getSrc } from "gatsby-plugin-image";
|
|
3
|
+
import AuthComponent from "../AuthComponent";
|
|
4
|
+
import RegistrationLiteComponent from "../RegistrationLiteComponent";
|
|
5
|
+
|
|
6
|
+
import styles from "./styles.module.scss";
|
|
7
|
+
|
|
8
|
+
const ButtonGroup = ({ location, registerButton, loginButton }) => (
|
|
9
|
+
<>
|
|
10
|
+
{registerButton?.display && (
|
|
11
|
+
<span className={styles.link}>
|
|
12
|
+
<RegistrationLiteComponent location={location} />
|
|
13
|
+
</span>
|
|
14
|
+
)}
|
|
15
|
+
{loginButton?.display && <AuthComponent location={location} />}
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const MainColumn = ({ location, title, subTitle, date, time, buttons, backgroundSrc, fullWidth }) => {
|
|
20
|
+
const backgroundImageStyle = backgroundSrc
|
|
21
|
+
? { backgroundImage: `url(${getSrc(backgroundSrc)})` }
|
|
22
|
+
: {};
|
|
23
|
+
return (
|
|
24
|
+
<div className={`column ${!fullWidth ? "is-half" : ""} p-0 ${styles.mainColumn}`} style={backgroundImageStyle}>
|
|
25
|
+
<div className={`hero-body ${styles.heroBody}`}>
|
|
26
|
+
{title && <h1 className="title">{title}</h1>}
|
|
27
|
+
{subTitle && <h2 className="subtitle">{subTitle}</h2>}
|
|
28
|
+
{date && <h4>{date}</h4>}
|
|
29
|
+
{time && <h4>{time}</h4>}
|
|
30
|
+
<div className={styles.heroButtons}>
|
|
31
|
+
<ButtonGroup {...buttons} location={location} />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default MainColumn;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import MainColumn from "./MainColumn";
|
|
4
|
+
import ImagesColumn from "./ImagesColumn";
|
|
5
|
+
|
|
6
|
+
import styles from "./styles.module.scss";
|
|
7
|
+
|
|
8
|
+
const MarketingHero = ({ location, data }) => {
|
|
9
|
+
const {
|
|
10
|
+
title,
|
|
11
|
+
subTitle,
|
|
12
|
+
date,
|
|
13
|
+
time,
|
|
14
|
+
buttons = {},
|
|
15
|
+
background,
|
|
16
|
+
images = []
|
|
17
|
+
} = data || {};
|
|
18
|
+
return (
|
|
19
|
+
<section>
|
|
20
|
+
<div className={"columns is-marginless"}>
|
|
21
|
+
<MainColumn
|
|
22
|
+
location={location}
|
|
23
|
+
title={title}
|
|
24
|
+
subTitle={subTitle}
|
|
25
|
+
date={date}
|
|
26
|
+
time={time}
|
|
27
|
+
buttons={buttons}
|
|
28
|
+
backgroundSrc={background?.src}
|
|
29
|
+
fullWidth={images.length === 0}
|
|
30
|
+
/>
|
|
31
|
+
{images.length > 0 && (
|
|
32
|
+
<ImagesColumn images={images} />
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
MarketingHero.propTypes = {
|
|
40
|
+
location: PropTypes.object.isRequired,
|
|
41
|
+
data: PropTypes.object
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default MarketingHero;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@import "../../styles/colors.scss";
|
|
2
|
+
|
|
3
|
+
.mainColumn {
|
|
4
|
+
background-color: var(--color_secondary_contrast);
|
|
5
|
+
min-height: 100%;
|
|
6
|
+
background-size: cover;
|
|
7
|
+
h1 {
|
|
8
|
+
font-size: calc(50px + (50 - 42) * (100vw - 250px) / (1080 - 250));
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
margin-top: 0rem;
|
|
11
|
+
}
|
|
12
|
+
h2 {
|
|
13
|
+
font-size: calc(40px + (40 - 36) * (100vw - 250px) / (1080 - 20));
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
}
|
|
16
|
+
h4 {
|
|
17
|
+
font-size: calc(22px + (22 - 14) * (100vw - 250px) / (1080 - 250));
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
}
|
|
20
|
+
h1,
|
|
21
|
+
h2,
|
|
22
|
+
h4 {
|
|
23
|
+
color: var(--color_text_light);
|
|
24
|
+
}
|
|
25
|
+
.heroBody {
|
|
26
|
+
padding: 4rem 3rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.imagesColumn {
|
|
31
|
+
:global(.slick-slider) {
|
|
32
|
+
height: 100%; /* Ensure the slider takes the full height of its parent */
|
|
33
|
+
position: relative; /* Position the slider container */
|
|
34
|
+
:global(.slick-list) {
|
|
35
|
+
height: 100%; /* Ensure the slick-list takes the full height of its parent */
|
|
36
|
+
overflow: hidden; /* Hide any overflow to prevent scrollbar affecting layout */
|
|
37
|
+
:global(.slick-track) {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: stretch;
|
|
40
|
+
height: 100%; /* Ensure the slick-track takes the full height */
|
|
41
|
+
:global(.slick-slide) {
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: stretch;
|
|
45
|
+
height: 100%; /* Ensure each slide takes the full height of the slick-track */
|
|
46
|
+
position: relative; /* Ensure relative positioning for the slide */
|
|
47
|
+
div {
|
|
48
|
+
width: 100%;
|
|
49
|
+
position: relative; /* Position the container for enforcing aspect ratio */
|
|
50
|
+
&::before {
|
|
51
|
+
content: ""; /* Create a pseudo-element */
|
|
52
|
+
display: block;
|
|
53
|
+
padding-top: 56.25%; /* 16:9 aspect ratio (9 / 16 * 100) */
|
|
54
|
+
}
|
|
55
|
+
img {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
object-fit: cover; /* Cover the entire container without distorting the image */
|
|
62
|
+
object-position: center; /* Center the image within the container */
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.singleImage {
|
|
70
|
+
height: 100%;
|
|
71
|
+
background-size: cover;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react"
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import * as Sentry from "@sentry/react";
|
|
3
|
-
import { navigate, withPrefix } from "gatsby"
|
|
4
|
+
import { navigate, withPrefix } from "gatsby";
|
|
4
5
|
import { connect } from "react-redux";
|
|
5
6
|
import URI from "urijs";
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
|
|
8
|
-
// these two libraries are client-side only
|
|
9
|
-
import RegistrationLiteWidget from "summit-registration-lite/dist";
|
|
10
|
-
import "summit-registration-lite/dist/index.css";
|
|
11
|
-
import FragmentParser from "openstack-uicore-foundation/lib/utils/fragment-parser";
|
|
12
|
-
import {doLogin, passwordlessStart, getAccessToken} from "openstack-uicore-foundation/lib/security/methods"
|
|
13
|
-
import {doLogout} from "openstack-uicore-foundation/lib/security/actions"
|
|
14
|
-
import {getEnvVariable, SUMMIT_API_BASE_URL, OAUTH2_CLIENT_ID, REGISTRATION_BASE_URL, SUPPORT_EMAIL} from "../utils/envVariables"
|
|
15
|
-
import {getUserProfile, setPasswordlessLogin, setUserOrder, checkOrderData} from "../actions/user-actions";
|
|
16
|
-
import {getThirdPartyProviders} from "../actions/base-actions";
|
|
17
|
-
import { validateIdentityProviderButtons } from "../utils/loginUtils";
|
|
18
7
|
import Swal from "sweetalert2";
|
|
19
|
-
import {checkRequireExtraQuestionsByAttendee} from "../actions/user-actions";
|
|
20
|
-
import {userHasAccessLevel, VirtualAccessLevel} from "../utils/authorizedGroups";
|
|
21
8
|
|
|
9
|
+
import FragmentParser from "openstack-uicore-foundation/lib/utils/fragment-parser";
|
|
10
|
+
import { doLogin, passwordlessStart, getAccessToken } from "openstack-uicore-foundation/lib/security/methods"
|
|
11
|
+
import { doLogout } from "openstack-uicore-foundation/lib/security/actions"
|
|
12
|
+
import { getUserProfile, setPasswordlessLogin, setUserOrder, checkOrderData } from "../actions/user-actions";
|
|
13
|
+
import { getThirdPartyProviders } from "../actions/base-actions";
|
|
14
|
+
import { checkRequireExtraQuestionsByAttendee } from "../actions/user-actions";
|
|
22
15
|
import { getExtraQuestions } from "../actions/summit-actions";
|
|
23
16
|
|
|
24
|
-
import
|
|
25
|
-
import
|
|
17
|
+
import IconButton from "./IconButton";
|
|
18
|
+
import iconButtonStyles from "./IconButton/styles.module.scss";
|
|
19
|
+
|
|
26
20
|
import { SentryFallbackFunction } from "./SentryErrorComponent";
|
|
21
|
+
// these two libraries are client-side only
|
|
22
|
+
import RegistrationLiteWidget from "summit-registration-lite/dist";
|
|
23
|
+
import "summit-registration-lite/dist/index.css";
|
|
27
24
|
|
|
25
|
+
import useSiteSettings from "@utils/useSiteSettings";
|
|
26
|
+
import useMarketingSettings, { MARKETING_SETTINGS_KEYS } from "@utils/useMarketingSettings";
|
|
27
|
+
import { getEnvVariable, SUMMIT_API_BASE_URL, OAUTH2_CLIENT_ID, REGISTRATION_BASE_URL, SUPPORT_EMAIL } from "@utils/envVariables";
|
|
28
|
+
import { userHasAccessLevel, VirtualAccessLevel } from "@utils/authorizedGroups";
|
|
29
|
+
import { validateIdentityProviderButtons } from "@utils/loginUtils";
|
|
28
30
|
import { triggerAnalyticsTrackEvent } from "@utils/customEvents";
|
|
29
31
|
import { PURCHASE_COMPLETE } from "@utils/analytics/events";
|
|
30
32
|
|
|
31
|
-
import styles from "../styles/marketing-hero.module.scss";
|
|
32
|
-
|
|
33
33
|
const RegistrationLiteComponent = ({
|
|
34
34
|
registrationProfile,
|
|
35
35
|
userProfile,
|
|
@@ -208,11 +208,13 @@ const RegistrationLiteComponent = ({
|
|
|
208
208
|
React.cloneElement(children, { onClick: handleOpenPopup })
|
|
209
209
|
:
|
|
210
210
|
registerButton.display &&
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
<IconButton
|
|
212
|
+
className={iconButtonStyles.register}
|
|
213
|
+
iconClass="fa fa-2x fa-edit"
|
|
214
|
+
buttonText={registerButton.text}
|
|
215
|
+
onClick={handleOpenPopup}
|
|
216
|
+
disabled={isActive}
|
|
217
|
+
/>
|
|
216
218
|
}
|
|
217
219
|
<Sentry.ErrorBoundary fallback={SentryFallbackFunction({componentName: "Registration Lite"})}>
|
|
218
220
|
{isActive && <RegistrationLiteWidget {...widgetProps} />}
|