@openeventkit/event-site 1.0.40 → 1.0.42
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/env.template +2 -1
- package/gatsby-node.js +59 -1
- package/package.json +2 -2
- package/src/actions/schedule-actions.js +3 -2
- package/src/cms/config/index.js +2 -1
- package/src/components/DocumentsComponent.js +7 -4
- package/src/components/SponsorComponent.js +90 -66
- package/src/components/SponsorHeader.js +24 -22
- package/src/components/SponsorNavigation.js +2 -2
- package/src/content/expo-hall.json +10 -0
- package/src/reducers/sponsor-reducer.js +4 -5
- package/src/templates/sponsor-page.js +125 -147
- package/src/utils/filePath.js +4 -1
- package/src/content/sponsors-tiers.json +0 -81
package/env.template
CHANGED
package/gatsby-node.js
CHANGED
|
@@ -27,7 +27,8 @@ const {
|
|
|
27
27
|
SPEAKERS_IDX_FILE_PATH,
|
|
28
28
|
VOTEABLE_PRESENTATIONS_FILE_PATH,
|
|
29
29
|
MARKETING_SETTINGS_FILE_PATH,
|
|
30
|
-
MAINTENANCE_FILE_PATH
|
|
30
|
+
MAINTENANCE_FILE_PATH,
|
|
31
|
+
SPONSORS_FILE_PATH
|
|
31
32
|
} = require("./src/utils/filePath");
|
|
32
33
|
|
|
33
34
|
const fileBuildTimes = [];
|
|
@@ -99,6 +100,53 @@ const SSR_getEvents = async (baseUrl, summitId, accessToken) => {
|
|
|
99
100
|
}).catch(e => console.log("ERROR: ", e));
|
|
100
101
|
};
|
|
101
102
|
|
|
103
|
+
const SSR_getSponsors = async (baseUrl, summitId, accessToken) => {
|
|
104
|
+
|
|
105
|
+
const endpoint = `${baseUrl}/api/v1/summits/${summitId}/sponsors`;
|
|
106
|
+
|
|
107
|
+
const params = {
|
|
108
|
+
access_token: accessToken,
|
|
109
|
+
per_page: 50,
|
|
110
|
+
page: 1,
|
|
111
|
+
expand: 'company,sponsorship,sponsorship.type',
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return await axios.get(endpoint, { params }).then(async ({data}) => {
|
|
115
|
+
|
|
116
|
+
console.log(`SSR_getSponsors then data.current_page ${data.current_page} data.last_page ${data.last_page} total ${data.total}`)
|
|
117
|
+
|
|
118
|
+
let remainingPages = await SSR_GetRemainingPages(endpoint, params, data.last_page);
|
|
119
|
+
|
|
120
|
+
return [...data.data, ...remainingPages];
|
|
121
|
+
|
|
122
|
+
}).catch(e => console.log('ERROR: ', e));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const SSR_getSponsorCollections = async (allSponsors, baseUrl, summitId, accessToken) => {
|
|
126
|
+
|
|
127
|
+
const params = {
|
|
128
|
+
access_token: accessToken,
|
|
129
|
+
per_page: 50,
|
|
130
|
+
page: 1,
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const getSponsorCollection = async (endpoint, params) => await axios.get(endpoint, { params }).then(async ({data}) => {
|
|
134
|
+
console.log(`SSR_getSponsorCollection then data.current_page ${data.current_page} data.last_page ${data.last_page} total ${data.total}`)
|
|
135
|
+
let remainingPages = await SSR_GetRemainingPages(endpoint, params, data.last_page);
|
|
136
|
+
return [...data.data, ...remainingPages];
|
|
137
|
+
}).catch(e => console.log('ERROR: ', e));
|
|
138
|
+
|
|
139
|
+
const sponsorsWithCollections = await Promise.all(allSponsors.map(async (sponsor) => {
|
|
140
|
+
console.log(`Collections for ${sponsor.company.name}...`);
|
|
141
|
+
const ads = await getSponsorCollection(`${baseUrl}/api/v1/summits/${summitId}/sponsors/${sponsor.id}/ads`, params);
|
|
142
|
+
const materials = await getSponsorCollection(`${baseUrl}/api/v1/summits/${summitId}/sponsors/${sponsor.id}/materials`, params);
|
|
143
|
+
const social_networks = await getSponsorCollection(`${baseUrl}/api/v1/summits/${summitId}/sponsors/${sponsor.id}/social-networks`, params);
|
|
144
|
+
return ({...sponsor, ads, materials, social_networks})
|
|
145
|
+
}));
|
|
146
|
+
|
|
147
|
+
return sponsorsWithCollections;
|
|
148
|
+
};
|
|
149
|
+
|
|
102
150
|
const SSR_getSpeakers = async (baseUrl, summitId, accessToken, filter = null) => {
|
|
103
151
|
|
|
104
152
|
const params = {
|
|
@@ -259,6 +307,16 @@ exports.onPreBootstrap = async () => {
|
|
|
259
307
|
});
|
|
260
308
|
fs.writeFileSync(SPEAKERS_IDX_FILE_PATH, JSON.stringify(allSpeakersIDX), "utf8");
|
|
261
309
|
|
|
310
|
+
// Show Sponsors
|
|
311
|
+
const allSponsors = await SSR_getSponsors(summitApiBaseUrl, summitId, accessToken);
|
|
312
|
+
console.log(`allSponsors ${allSponsors.length}`);
|
|
313
|
+
const sponsorsWithCollections = await SSR_getSponsorCollections(allSponsors, summitApiBaseUrl, summitId, accessToken);
|
|
314
|
+
fileBuildTimes.push({
|
|
315
|
+
"file": SPONSORS_FILE_PATH,
|
|
316
|
+
"build_time": Date.now()
|
|
317
|
+
});
|
|
318
|
+
fs.writeFileSync(SPONSORS_FILE_PATH, JSON.stringify(sponsorsWithCollections), 'utf8');
|
|
319
|
+
|
|
262
320
|
// Voteable Presentations
|
|
263
321
|
const allVoteablePresentations = await SSR_getVoteablePresentations(summitApiBaseUrl, summitId, accessToken);
|
|
264
322
|
console.log(`allVoteablePresentations ${allVoteablePresentations.length}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.42",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@mui/base": "^5.0.0-alpha.114",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"netlify-cms-app": "^2.15.72",
|
|
76
76
|
"netlify-cms-lib-widgets": "^1.8.0",
|
|
77
77
|
"node-sass-utils": "^1.1.3",
|
|
78
|
-
"openstack-uicore-foundation": "^4.1.
|
|
78
|
+
"openstack-uicore-foundation": "^4.1.39",
|
|
79
79
|
"path-browserify": "^1.0.1",
|
|
80
80
|
"prop-types": "^15.6.0",
|
|
81
81
|
"react": "^18.2.0",
|
|
@@ -79,9 +79,10 @@ export const updateFiltersFromHash =
|
|
|
79
79
|
// clear hash that match filters
|
|
80
80
|
fragmentParser.deleteParams([...filterKeys, "view"]);
|
|
81
81
|
|
|
82
|
-
//
|
|
82
|
+
// remove from hash all params that are related to filters
|
|
83
83
|
if (windowExists) {
|
|
84
|
-
|
|
84
|
+
const fragment = fragmentParser.serialize();
|
|
85
|
+
window.location.hash = fragment;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
// escape if no filter hash
|
package/src/cms/config/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import defaultPagesCollection from "./collections/defaultPagesCollection";
|
|
|
3
3
|
import contentPagesCollection from "./collections/contentPagesCollection";
|
|
4
4
|
|
|
5
5
|
const CMS_BACKEND_REPO = process.env.GATSBY_CMS_BACKEND_REPO;
|
|
6
|
+
const CMS_BACKEND_BRANCH = process.env.GATSBY_CMS_BACKEND_BRANCH || "main";
|
|
6
7
|
|
|
7
8
|
export const collections = [
|
|
8
9
|
configurationsCollection,
|
|
@@ -14,7 +15,7 @@ const config = {
|
|
|
14
15
|
backend: {
|
|
15
16
|
name: "github",
|
|
16
17
|
repo: CMS_BACKEND_REPO,
|
|
17
|
-
branch:
|
|
18
|
+
branch: CMS_BACKEND_BRANCH,
|
|
18
19
|
commit_messages: {
|
|
19
20
|
create: "Create {{collection}} “{{slug}}”",
|
|
20
21
|
update: "Update {{collection}} “{{slug}}”",
|
|
@@ -9,7 +9,7 @@ import styles from "../styles/documents.module.scss";
|
|
|
9
9
|
* @returns {JSX.Element|null}
|
|
10
10
|
* @constructor
|
|
11
11
|
*/
|
|
12
|
-
const DocumentsComponent = ({ event }) => {
|
|
12
|
+
const DocumentsComponent = ({ event, sponsorPage = false }) => {
|
|
13
13
|
|
|
14
14
|
const getMaterials = (event) => {
|
|
15
15
|
const allMaterials = [
|
|
@@ -24,7 +24,7 @@ const DocumentsComponent = ({ event }) => {
|
|
|
24
24
|
.sort((a, b) => a.order - b.order);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const sortedMaterials = getMaterials(event);
|
|
27
|
+
const sortedMaterials = sponsorPage === true ? event :getMaterials(event);
|
|
28
28
|
if (sortedMaterials.length === 0) return null;
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -34,11 +34,13 @@ const DocumentsComponent = ({ event }) => {
|
|
|
34
34
|
<hr />
|
|
35
35
|
{sortedMaterials.map((material, index) => {
|
|
36
36
|
let faIcon = "fa-link";
|
|
37
|
-
switch (material.class_name) {
|
|
37
|
+
switch (material.class_name || material.type) {
|
|
38
38
|
case "PresentationSlide":
|
|
39
|
+
case "Slide":
|
|
39
40
|
faIcon = "fa-file-o";
|
|
40
41
|
break;
|
|
41
42
|
case "PresentationVideo":
|
|
43
|
+
case "Video":
|
|
42
44
|
faIcon = "fa-video-camera";
|
|
43
45
|
break;
|
|
44
46
|
case "PresentationMediaUpload":
|
|
@@ -56,7 +58,8 @@ const DocumentsComponent = ({ event }) => {
|
|
|
56
58
|
return (
|
|
57
59
|
<React.Fragment key={index}>
|
|
58
60
|
{material.class_name === "PresentationSlide" ||
|
|
59
|
-
material.class_name === "PresentationMediaUpload"
|
|
61
|
+
material.class_name === "PresentationMediaUpload" ||
|
|
62
|
+
material.type === "Slide" ? (
|
|
60
63
|
<div
|
|
61
64
|
className={`${styles.documentColumn} columns is-mobile is-vcentered`}
|
|
62
65
|
key={index}
|
|
@@ -6,40 +6,53 @@ import { getSponsorURL } from '../utils/urlFormating'
|
|
|
6
6
|
|
|
7
7
|
import styles from '../styles/sponsor.module.scss'
|
|
8
8
|
|
|
9
|
-
const SponsorComponent = ({ page, sponsorsState,
|
|
9
|
+
const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
10
10
|
let renderButton = false;
|
|
11
|
+
|
|
12
|
+
let sponsorsByTier = sponsorsState.reduce((memo, x) => {
|
|
13
|
+
if (!memo[x['sponsorship'].type.name]) { memo[x['sponsorship'].type.name] = []; }
|
|
14
|
+
memo[x['sponsorship'].type.name].push(x);
|
|
15
|
+
return memo;
|
|
16
|
+
}, {});
|
|
17
|
+
|
|
18
|
+
Object.keys(sponsorsByTier).forEach((s) => {
|
|
19
|
+
sponsorsByTier[s] = { ...sponsorsByTier[s][0].sponsorship, sponsors: sponsorsByTier[s] }
|
|
20
|
+
});
|
|
21
|
+
|
|
11
22
|
return (
|
|
12
23
|
<React.Fragment>
|
|
13
|
-
{
|
|
14
|
-
const sponsors =
|
|
15
|
-
const tier = tiers.find(t => t.id === s.tier[0].value);
|
|
24
|
+
{Object.values(sponsorsByTier).sort((a, b) => a.order - b.order).map((tier, tierIndex) => {
|
|
25
|
+
const sponsors = tier.sponsors.sort((a, b) => a.order - b.order);
|
|
16
26
|
if (!tier) return null;
|
|
17
|
-
const template = page === 'lobby' ? tier.
|
|
27
|
+
const template = page === 'lobby' ? tier.lobby_template : page === 'event' ? tier.event_page_template : 'expo-hall';
|
|
18
28
|
if (sponsors?.length > 0) {
|
|
19
29
|
renderButton = true;
|
|
20
30
|
switch (template) {
|
|
21
31
|
case 'big-images': {
|
|
22
|
-
if (page === 'lobby' && !tier.
|
|
32
|
+
if (page === 'lobby' && !tier.should_display_on_lobby_page) {
|
|
23
33
|
return null
|
|
24
34
|
} else {
|
|
25
35
|
return (
|
|
26
36
|
<div className={`${tierIndex === 0 ? styles.firstContainer : ''} ${styles.bigImageContainer}`} key={tierIndex}>
|
|
27
|
-
{tier.
|
|
28
|
-
<span><b>{tier.
|
|
37
|
+
{tier.widget_title &&
|
|
38
|
+
<span><b>{tier.widget_title}</b></span>
|
|
29
39
|
}
|
|
30
40
|
{sponsors.map((sponsor, index) => {
|
|
31
41
|
return (
|
|
32
|
-
sponsor.
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
43
|
+
null
|
|
44
|
+
:
|
|
45
|
+
sponsor.is_published ?
|
|
46
|
+
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`} key={`${tier.type.label}-${index}`}>
|
|
47
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
35
48
|
</Link>
|
|
36
49
|
:
|
|
37
|
-
sponsor.
|
|
38
|
-
<Link to={
|
|
39
|
-
<img src={sponsor.logo
|
|
50
|
+
sponsor.external_link ?
|
|
51
|
+
<Link to={sponsor.external_link} key={`${tier.type.label}-${index}`}>
|
|
52
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
40
53
|
</Link>
|
|
41
54
|
:
|
|
42
|
-
<img src={sponsor.logo
|
|
55
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
43
56
|
)
|
|
44
57
|
})}
|
|
45
58
|
</div>
|
|
@@ -47,32 +60,35 @@ const SponsorComponent = ({ page, sponsorsState, tiers, lobbyButton }) => {
|
|
|
47
60
|
}
|
|
48
61
|
}
|
|
49
62
|
case 'small-images': {
|
|
50
|
-
if (page === 'lobby' && !tier.
|
|
63
|
+
if (page === 'lobby' && !tier.should_display_on_lobby_page) {
|
|
51
64
|
return null
|
|
52
65
|
} else {
|
|
53
66
|
return (
|
|
54
67
|
<div className={`${tierIndex === 0 ? styles.firstContainer : ''} ${styles.smallImageContainer}`} key={tierIndex}>
|
|
55
|
-
{tier.
|
|
56
|
-
<span><b>{tier.
|
|
68
|
+
{tier.widget_title &&
|
|
69
|
+
<span><b>{tier.widget_title}</b></span>
|
|
57
70
|
}
|
|
58
71
|
{sponsors.map((sponsor, index) => {
|
|
59
72
|
if (page === 'event' && !sponsor.showLogoInEventPage) return null
|
|
60
73
|
return (
|
|
61
|
-
sponsor.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
75
|
+
null
|
|
76
|
+
:
|
|
77
|
+
sponsor.is_published ?
|
|
78
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
79
|
+
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`}>
|
|
80
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
65
81
|
</Link>
|
|
66
82
|
</div>
|
|
67
|
-
: sponsor.
|
|
68
|
-
<div className={styles.imageBox} key={`${
|
|
69
|
-
<Link to={
|
|
70
|
-
<img src={sponsor.logo
|
|
83
|
+
: sponsor.external_link ?
|
|
84
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
85
|
+
<Link to={sponsor.external_link}>
|
|
86
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
71
87
|
</Link>
|
|
72
88
|
</div>
|
|
73
89
|
:
|
|
74
|
-
<div className={styles.imageBox} key={`${
|
|
75
|
-
<img src={sponsor.logo
|
|
90
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
91
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
76
92
|
</div>
|
|
77
93
|
)
|
|
78
94
|
})}
|
|
@@ -85,21 +101,24 @@ const SponsorComponent = ({ page, sponsorsState, tiers, lobbyButton }) => {
|
|
|
85
101
|
<div className={`${tierIndex === 0 ? styles.firstContainer : ''} ${styles.horizontalContainer} px-6`} key={tierIndex}>
|
|
86
102
|
{sponsors.map((sponsor, index) => {
|
|
87
103
|
return (
|
|
88
|
-
sponsor.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
105
|
+
null
|
|
106
|
+
:
|
|
107
|
+
sponsor.is_published ?
|
|
108
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
109
|
+
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`}>
|
|
110
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
92
111
|
</Link>
|
|
93
112
|
</div>
|
|
94
|
-
: sponsor.
|
|
95
|
-
<div className={styles.imageBox} key={`${
|
|
96
|
-
<Link to={
|
|
97
|
-
<img src={sponsor.logo
|
|
113
|
+
: sponsor.external_link ?
|
|
114
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
115
|
+
<Link to={sponsor.external_link}>
|
|
116
|
+
<img src={sponsor.logo} alt={sponsor.company.name} />
|
|
98
117
|
</Link>
|
|
99
118
|
</div>
|
|
100
119
|
:
|
|
101
|
-
<div className={styles.imageBox} key={`${
|
|
102
|
-
<img src={sponsor.logo
|
|
120
|
+
<div className={styles.imageBox} key={`${tier.type.label}-${index}`}>
|
|
121
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
103
122
|
</div>
|
|
104
123
|
)
|
|
105
124
|
})}
|
|
@@ -107,45 +126,48 @@ const SponsorComponent = ({ page, sponsorsState, tiers, lobbyButton }) => {
|
|
|
107
126
|
)
|
|
108
127
|
}
|
|
109
128
|
case 'expo-hall': {
|
|
110
|
-
return tier.
|
|
129
|
+
return tier.should_display_on_expo_hall_page === true && (
|
|
111
130
|
<div className={`${styles.expoContainer} px-6`} key={tierIndex}>
|
|
112
131
|
{sponsors.map((sponsor, index) => {
|
|
113
132
|
return (
|
|
114
|
-
sponsor.
|
|
133
|
+
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
134
|
+
null
|
|
135
|
+
:
|
|
136
|
+
sponsor.is_published ?
|
|
115
137
|
<div className={`
|
|
116
138
|
${styles.imageBox}
|
|
117
|
-
${tier.
|
|
118
|
-
key={`${
|
|
139
|
+
${tier.expo_hall_template === 'big-images' ? styles.large : tier.expo_hall_template === 'medium-images' ? styles.medium : styles.small}`}
|
|
140
|
+
key={`${tier.type.label}-${index}`}
|
|
119
141
|
>
|
|
120
|
-
<Link to={sponsor.
|
|
121
|
-
<img src={sponsor.logo
|
|
142
|
+
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`}>
|
|
143
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
122
144
|
</Link>
|
|
123
145
|
</div>
|
|
124
|
-
: sponsor.
|
|
146
|
+
: sponsor.external_link ?
|
|
125
147
|
<div className={`
|
|
126
148
|
${styles.imageBox}
|
|
127
|
-
${tier.
|
|
128
|
-
key={`${
|
|
149
|
+
${tier.expo_hall_template === 'big-images' ? styles.large : tier.expo_hall_template === 'medium-images' ? styles.medium : styles.small}`}
|
|
150
|
+
key={`${tier.type.label}-${index}`}
|
|
129
151
|
>
|
|
130
|
-
<Link to={
|
|
131
|
-
<img src={sponsor.logo
|
|
152
|
+
<Link to={sponsor.external_link}>
|
|
153
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
132
154
|
</Link>
|
|
133
155
|
</div>
|
|
134
156
|
:
|
|
135
157
|
<div className={`
|
|
136
158
|
${styles.imageBox}
|
|
137
|
-
${tier.
|
|
138
|
-
key={`${
|
|
159
|
+
${tier.expo_hall_template === 'big-images' ? styles.large : tier.expo_hall_template === 'medium-images' ? styles.medium : styles.small}`}
|
|
160
|
+
key={`${tier.type.label}-${index}`}
|
|
139
161
|
>
|
|
140
|
-
<img src={sponsor.logo
|
|
162
|
+
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
141
163
|
</div>
|
|
142
|
-
)
|
|
164
|
+
)
|
|
143
165
|
})}
|
|
144
166
|
</div>
|
|
145
167
|
)
|
|
146
168
|
}
|
|
147
169
|
case 'carousel': {
|
|
148
|
-
if (page === 'lobby' && !tier.
|
|
170
|
+
if (page === 'lobby' && !tier.should_display_on_lobby_page) {
|
|
149
171
|
return null
|
|
150
172
|
} else {
|
|
151
173
|
const sliderSettings = {
|
|
@@ -159,25 +181,28 @@ const SponsorComponent = ({ page, sponsorsState, tiers, lobbyButton }) => {
|
|
|
159
181
|
};
|
|
160
182
|
return (
|
|
161
183
|
<div className={`${tierIndex === 0 ? styles.firstContainer : ''} ${styles.carouselContainer}`} key={tierIndex}>
|
|
162
|
-
{tier.
|
|
163
|
-
<span style={{ marginBottom: '0' }}><b>{tier.
|
|
184
|
+
{tier.widget_title &&
|
|
185
|
+
<span style={{ marginBottom: '0' }}><b>{tier.widget_title}</b></span>
|
|
164
186
|
}
|
|
165
187
|
<Slider {...sliderSettings}>
|
|
166
188
|
{sponsors.map((sponsor, index) => {
|
|
167
|
-
const img = sponsor.
|
|
189
|
+
const img = sponsor.carousel_advertise_image ? sponsor.carousel_advertise_image : sponsor.logo;
|
|
168
190
|
return (
|
|
169
|
-
sponsor.
|
|
170
|
-
|
|
171
|
-
|
|
191
|
+
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
192
|
+
null
|
|
193
|
+
:
|
|
194
|
+
sponsor.is_published ?
|
|
195
|
+
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`} key={`${tier.type.label}-${index}`}>
|
|
196
|
+
<img src={sponsor.carousel_advertise_image} alt={sponsor.carousel_advertise_image_alt_text} />
|
|
172
197
|
</Link>
|
|
173
198
|
:
|
|
174
|
-
sponsor.
|
|
175
|
-
<Link to={
|
|
176
|
-
<img src={
|
|
199
|
+
sponsor.external_link ?
|
|
200
|
+
<Link to={sponsor.external_link} key={`${tier.type.label}-${index}`}>
|
|
201
|
+
<img src={sponsor.carousel_advertise_image} alt={sponsor.carousel_advertise_image_alt_text} />
|
|
177
202
|
</Link>
|
|
178
203
|
:
|
|
179
|
-
<Link key={`${
|
|
180
|
-
<img src={
|
|
204
|
+
<Link key={`${tier.type.label}-${index}`}>
|
|
205
|
+
<img src={sponsor.carousel_advertise_image} alt={sponsor.carousel_advertise_image_alt_text} />
|
|
181
206
|
</Link>
|
|
182
207
|
)
|
|
183
208
|
})}
|
|
@@ -207,7 +232,6 @@ const SponsorComponent = ({ page, sponsorsState, tiers, lobbyButton }) => {
|
|
|
207
232
|
|
|
208
233
|
const mapStateToProps = ({ sponsorState }) => ({
|
|
209
234
|
sponsorsState: sponsorState.sponsors,
|
|
210
|
-
tiers: sponsorState.tiers,
|
|
211
235
|
lobbyButton: sponsorState.lobbyButton
|
|
212
236
|
});
|
|
213
237
|
|
|
@@ -4,7 +4,9 @@ import Link from './Link'
|
|
|
4
4
|
|
|
5
5
|
import styles from '../styles/sponsor-page.module.scss'
|
|
6
6
|
|
|
7
|
-
const SponsorHeader = ({ sponsor,
|
|
7
|
+
const SponsorHeader = ({ sponsor, scanBadge }) => {
|
|
8
|
+
|
|
9
|
+
const { sponsorship } = sponsor;
|
|
8
10
|
|
|
9
11
|
const [isMuted, _setIsMuted] = useState(true);
|
|
10
12
|
const [isMobile, setIsMobile] = useState(null);
|
|
@@ -35,24 +37,24 @@ const SponsorHeader = ({ sponsor, tier, scanBadge }) => {
|
|
|
35
37
|
return (
|
|
36
38
|
<section className={styles.hero}>
|
|
37
39
|
<div className={`${isMobile ? styles.heroSponsorMobile : styles.heroSponsor}`}>
|
|
38
|
-
{!sponsor.
|
|
40
|
+
{!sponsor.video_link &&
|
|
39
41
|
<div className={styles.heroSponsorImageBg} style={{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
backgroundImage: `url(${isMobile ? sponsor.header_image_mobile : sponsor.header_image})`,
|
|
43
|
+
paddingBottom: `${isMobile ? '82.77%' : sponsorship.sponsor_page_template === 'big-header' ? '27.77%' : '18.88%'}`,
|
|
44
|
+
maxHeight: `${sponsorship.sponsor_page_template === 'big-header' ? '400px' : '200px'}`
|
|
45
|
+
}}
|
|
44
46
|
/>
|
|
45
47
|
}
|
|
46
|
-
{sponsor.
|
|
48
|
+
{sponsor.video_link &&
|
|
47
49
|
<div ref={videoParentRef}
|
|
48
50
|
style={{
|
|
49
|
-
paddingBottom: `${
|
|
50
|
-
maxHeight: `${
|
|
51
|
+
paddingBottom: `${sponsorship.sponsor_page_template === 'big-header' ? '27.77%' : '18.88%'}`,
|
|
52
|
+
maxHeight: `${sponsorship.sponsor_page_template === 'big-header' ? '400px' : '200px'}`
|
|
51
53
|
}}
|
|
52
54
|
dangerouslySetInnerHTML={{
|
|
53
55
|
__html: `
|
|
54
56
|
<video class=${styles.heroVideo} preload="auto" autoPlay loop muted playsinline>
|
|
55
|
-
<source src=${sponsor.
|
|
57
|
+
<source src=${sponsor.video_link} type="video/mp4" />
|
|
56
58
|
</video>
|
|
57
59
|
`
|
|
58
60
|
}} />
|
|
@@ -60,32 +62,32 @@ const SponsorHeader = ({ sponsor, tier, scanBadge }) => {
|
|
|
60
62
|
<div className={`${styles.heroBody}`}>
|
|
61
63
|
<div className={`${styles.heroSponsorContainer}`}>
|
|
62
64
|
<div className={styles.leftContainer}>
|
|
63
|
-
{sponsor.
|
|
64
|
-
net.
|
|
65
|
+
{sponsor.social_networks && sponsor.social_networks.map((net, index) => (
|
|
66
|
+
net.is_enabled && net.icon_css_class &&
|
|
65
67
|
<Link to={net.link} className={styles.link} key={index}>
|
|
66
|
-
<i className={`fa icon is-large ${net.
|
|
68
|
+
<i className={`fa icon is-large ${net.icon_css_class}`} />
|
|
67
69
|
</Link>
|
|
68
70
|
))}
|
|
69
71
|
</div>
|
|
70
72
|
<div className={styles.rightContainer}>
|
|
71
73
|
<div className={styles.category}>
|
|
72
|
-
{sponsor.
|
|
74
|
+
{sponsor.video_link &&
|
|
73
75
|
<button className="link" onClick={() => setIsMuted(!isMuted)}>
|
|
74
76
|
<i className={`${styles.volumeButton} fa fa-2x ${isMuted ? 'fa-volume-off' : 'fa-volume-up'} icon is-large`} />
|
|
75
77
|
</button>
|
|
76
|
-
}
|
|
77
|
-
{
|
|
78
|
+
}
|
|
79
|
+
{sponsorship.badge_image && <img alt={sponsorship.badge_image_alt_text} src={sponsorship.badge_image} />}
|
|
78
80
|
</div>
|
|
79
|
-
<div className={`${
|
|
81
|
+
<div className={`${sponsorship.sponsor_page_template === 'big-header' ? styles.buttons : styles.buttonsSmall}`}>
|
|
80
82
|
<Link className={styles.link} onClick={scanBadge}>
|
|
81
|
-
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor.
|
|
83
|
+
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor.company.color}` }}>
|
|
82
84
|
<i className={`fa fa-2x fa-qrcode icon is-large`} />
|
|
83
85
|
<b>Scan your badge</b>
|
|
84
86
|
</button>
|
|
85
87
|
</Link>
|
|
86
|
-
{sponsor.
|
|
87
|
-
<Link className={styles.link} to={sponsor.
|
|
88
|
-
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor.
|
|
88
|
+
{sponsor.company.contact_email &&
|
|
89
|
+
<Link className={styles.link} to={sponsor.company.contact_email}>
|
|
90
|
+
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor.company.color}` }}>
|
|
89
91
|
<i className={`fa fa-2x fa-envelope icon is-large`} />
|
|
90
92
|
<b>Contact Us!</b>
|
|
91
93
|
</button>
|
|
@@ -97,7 +99,7 @@ const SponsorHeader = ({ sponsor, tier, scanBadge }) => {
|
|
|
97
99
|
</div>
|
|
98
100
|
</div>
|
|
99
101
|
{sponsor.marquee &&
|
|
100
|
-
<div className={`${
|
|
102
|
+
<div className={`${sponsorship.sponsor_page_template === 'big-header' ? styles.bottomBar : styles.bottomBarSmall}`} style={{ backgroundColor: `${sponsor.company.color}` }}>
|
|
101
103
|
<div className={styles.track}>
|
|
102
104
|
<div>
|
|
103
105
|
{`${sponsor.marquee} `.repeat(100).slice(0, 459)}
|
|
@@ -7,12 +7,12 @@ import styles from '../styles/sponsor-page.module.scss'
|
|
|
7
7
|
|
|
8
8
|
const SponsorNavigation = ({ currentSponsor, sponsors }) => {
|
|
9
9
|
|
|
10
|
-
const localSponsors = sponsors.
|
|
10
|
+
const localSponsors = sponsors.filter(e => e.is_published);
|
|
11
11
|
|
|
12
12
|
const sponsorIndex = localSponsors.findIndex(e => e.id === currentSponsor.id)
|
|
13
13
|
|
|
14
14
|
const formatUrl = (index) => {
|
|
15
|
-
return getSponsorURL(localSponsors[index].id, localSponsors[index].name);
|
|
15
|
+
return getSponsorURL(localSponsors[index].id, localSponsors[index].company.name);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const goToPrevSponsor = () => {
|
|
@@ -3,13 +3,12 @@ import { LOGOUT_USER } from "openstack-uicore-foundation/lib/security/actions";
|
|
|
3
3
|
import {RESET_STATE, SYNC_DATA} from "../actions/base-actions-definitions";
|
|
4
4
|
|
|
5
5
|
import sponsorData from "content/sponsors";
|
|
6
|
-
import
|
|
6
|
+
import expoHallData from '../content/expo-hall.json';
|
|
7
7
|
|
|
8
8
|
const DEFAULT_STATE = {
|
|
9
|
-
sponsors: sponsorData
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
lobbyButton: tierData.lobbyButton
|
|
9
|
+
sponsors: sponsorData,
|
|
10
|
+
imageHeader: expoHallData.imageHeader,
|
|
11
|
+
lobbyButton: expoHallData.lobbyButton
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
const sponsorReducer = (state = DEFAULT_STATE, action) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { navigate } from 'gatsby'
|
|
4
4
|
import { connect } from 'react-redux'
|
|
@@ -21,175 +21,154 @@ import { getEnvVariable, LIVE_EVENT_THUMBNAIL_GIF_CAPTURE_STARTS } from "../util
|
|
|
21
21
|
import styles from '../styles/sponsor-page.module.scss'
|
|
22
22
|
import SponsorNavigation from '../components/SponsorNavigation'
|
|
23
23
|
|
|
24
|
+
const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId }) => {
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
const [sponsorLoading, setSponsorLoading] = useState(true);
|
|
27
|
+
const [sponsor, setSponsor] = useState(null)
|
|
28
|
+
const [notFound, setNotFound] = useState(false)
|
|
29
|
+
const [parsedIntro, setParsedIntro] = useState('')
|
|
30
|
+
const [sponsorship, setSponsorship] = useState(null);
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.state = {
|
|
31
|
-
sponsor: null,
|
|
32
|
-
notFound: null,
|
|
33
|
-
parsedIntro: null,
|
|
34
|
-
tier: null
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
componentWillMount() {
|
|
39
|
-
this.setSponsor();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
componentDidUpdate(prevProps) {
|
|
43
|
-
const { sponsorId } = this.props;
|
|
44
|
-
const { sponsorId: prevSponsorId } = prevProps;
|
|
45
|
-
// sponsor id came as param at uri
|
|
46
|
-
if (sponsorId !== prevSponsorId) {
|
|
47
|
-
this.setSponsor();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
onEventChange = (ev) => {
|
|
53
|
-
const { eventId } = this.props;
|
|
54
|
-
if (eventId !== `${ev.id}`) {
|
|
55
|
-
navigate(`/a/event/${ev.id}`);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
onBadgeScan = () => {
|
|
60
|
-
const { sponsor: { sponsorId } } = this.state;
|
|
61
|
-
this.props.scanBadge(sponsorId);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
setSponsor = () => {
|
|
65
|
-
const { sponsorId, sponsors, tiers } = this.props;
|
|
66
|
-
const sponsor = sponsors.map(t => t.sponsors?.find(s => s.id === parseInt(sponsorId)))
|
|
67
|
-
.filter(e => e !== undefined)[0];
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const sponsor = sponsors.find(s => s.id === parseInt(sponsorId)) || null;
|
|
68
34
|
if (!sponsor) {
|
|
69
|
-
|
|
35
|
+
setNotFound(true)
|
|
70
36
|
} else {
|
|
71
|
-
const
|
|
72
|
-
const tierData = tiers.find(t => t.id === tier.value);
|
|
37
|
+
const sponsorship = sponsor.sponsorship;
|
|
73
38
|
const parser = new MarkdownIt({
|
|
74
|
-
html:
|
|
39
|
+
html: true,
|
|
75
40
|
breaks: true,
|
|
76
41
|
linkify: true,
|
|
77
42
|
xhtmlOut: true,
|
|
78
43
|
typographer: true,
|
|
79
44
|
});
|
|
80
45
|
const parsedIntro = parser.render(sponsor.intro ?? '');
|
|
81
|
-
if (sponsor)
|
|
46
|
+
if (sponsor) setSponsor(sponsor); setSponsorship(sponsorship); setParsedIntro(parsedIntro);
|
|
47
|
+
}
|
|
48
|
+
setSponsorLoading(false)
|
|
49
|
+
}, [sponsorId]);
|
|
50
|
+
|
|
51
|
+
const onEventChange = (ev) => {
|
|
52
|
+
if (eventId !== `${ev.id}`) {
|
|
53
|
+
navigate(`/a/event/${ev.id}`);
|
|
82
54
|
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const onBadgeScan = () => {
|
|
58
|
+
scanBadge(sponsor.id);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
if (notFound) {
|
|
62
|
+
return <HeroComponent title="Sponsor not found" redirectTo="/a/sponsors" />
|
|
83
63
|
}
|
|
84
64
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
const {
|
|
66
|
+
sponsor_page_use_banner_widget: bannerWidget,
|
|
67
|
+
sponsor_page_use_disqus_widget: disqusWidget,
|
|
68
|
+
sponsor_page_use_live_event_widget: liveEventWidget,
|
|
69
|
+
sponsor_page_use_schedule_widget: scheduleWidget
|
|
70
|
+
} = sponsorship || {};
|
|
88
71
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
if (sponsorLoading) {
|
|
73
|
+
return <HeroComponent title="Loading..." />
|
|
74
|
+
}
|
|
92
75
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
76
|
+
return (
|
|
77
|
+
<React.Fragment>
|
|
78
|
+
<AttendanceTrackerComponent
|
|
79
|
+
sourceName="SPONSOR"
|
|
80
|
+
sourceId={sponsor?.id}
|
|
81
|
+
/>
|
|
82
|
+
<AccessTracker />
|
|
83
|
+
<SponsorHeader sponsor={sponsor} sponsorship={sponsorship} scanBadge={() => onBadgeScan()} />
|
|
84
|
+
<SponsorNavigation currentSponsor={sponsor} sponsors={sponsors} />
|
|
85
|
+
<section className={`section px-0 ${sponsorship?.sponsor_page_template === 'big-header' ? 'pt-5' : 'pt-0'} pb-0`}>
|
|
86
|
+
{sponsor?.side_image &&
|
|
87
|
+
<div className="columns mx-0 mt-0 mb-6">
|
|
88
|
+
<div className={`column is-half px-5 py-0 ${styles.introHalf}`}>
|
|
89
|
+
{sponsor?.company.name && <h1>{sponsor?.company.name}</h1>}
|
|
90
|
+
{sponsor?.intro && <span dangerouslySetInnerHTML={{ __html: parsedIntro }} />}
|
|
91
|
+
</div>
|
|
92
|
+
<div className="column is-half px-0 py-0">
|
|
93
|
+
<img alt={sponsor?.side_image_alt_text} src={sponsor?.side_image} className={styles.sideImage} />
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
}
|
|
97
|
+
<div className="columns mx-0 my-0">
|
|
98
|
+
<div className="column is-three-quarters px-5 py-0">
|
|
99
|
+
{!sponsor?.side_image &&
|
|
100
|
+
<div className={styles.sponsorIntro}>
|
|
101
|
+
{sponsor?.company.name && <h1>{sponsor?.company.name}</h1>}
|
|
102
|
+
{sponsor?.intro && <span dangerouslySetInnerHTML={{ __html: parsedIntro }} />}
|
|
113
103
|
</div>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</
|
|
143
|
-
<div className="column is-one-quarter px-5 py-0">
|
|
144
|
-
{sponsor.chatLink &&
|
|
145
|
-
<div className={styles.videoChatButton}>
|
|
146
|
-
<Link className={styles.link} to={sponsor.chatLink}>
|
|
147
|
-
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor.sponsorColor}` }}>
|
|
148
|
-
<b>LIVE VIDEO CHAT!</b>
|
|
149
|
-
</button>
|
|
150
|
-
</Link>
|
|
151
|
-
</div>
|
|
152
|
-
}
|
|
153
|
-
{disqus &&
|
|
154
|
-
<DisqusComponent className={styles.disqusContainerSponsor} title="" sponsor={sponsor} />
|
|
155
|
-
}
|
|
156
|
-
{sponsor.documents &&
|
|
157
|
-
<DocumentsComponent event={sponsor.documents} />
|
|
158
|
-
}
|
|
159
|
-
{sponsor.columnAds &&
|
|
160
|
-
<AdvertiseSponsorsComponent ads={sponsor.columnAds} style={{ marginTop: '2em' }} />
|
|
161
|
-
}
|
|
162
|
-
</div>
|
|
104
|
+
}
|
|
105
|
+
{liveEventWidget &&
|
|
106
|
+
<LiveEventWidgetComponent
|
|
107
|
+
onEventClick={(ev) => onEventChange(ev)}
|
|
108
|
+
onlyPresentations={true}
|
|
109
|
+
sponsorId={sponsor?.company.id}
|
|
110
|
+
showSponsor={!!sponsor?.company.id}
|
|
111
|
+
featuredEventId={sponsor?.featured_event_id}
|
|
112
|
+
streamThumbnailGifCaptureStarts={parseInt(getEnvVariable(LIVE_EVENT_THUMBNAIL_GIF_CAPTURE_STARTS))}
|
|
113
|
+
/>
|
|
114
|
+
}
|
|
115
|
+
{scheduleWidget &&
|
|
116
|
+
<UpcomingEventsComponent
|
|
117
|
+
eventCount={3}
|
|
118
|
+
sponsorId={sponsor?.company.id}
|
|
119
|
+
renderEventLink={(event) => <Link to={`/a/event/${event.id}`}>{event.title}</Link>}
|
|
120
|
+
allEventsLink={<Link to={`/a/schedule#company=${encodeURIComponent(sponsor?.name)}`}>View all <span className="sr-only">events</span></Link>}
|
|
121
|
+
/>
|
|
122
|
+
}
|
|
123
|
+
{bannerWidget && <SponsorBanner sponsor={sponsor} bgColor={sponsor?.company.color} scanBadge={() => onBadgeScan()} />}
|
|
124
|
+
</div>
|
|
125
|
+
<div className="column is-one-quarter px-5 py-0">
|
|
126
|
+
{sponsor?.chat_link &&
|
|
127
|
+
<div className={styles.videoChatButton}>
|
|
128
|
+
<Link className={styles.link} to={sponsor?.chat_link}>
|
|
129
|
+
<button className={`${styles.button} button is-large`} style={{ backgroundColor: `${sponsor?.company.color}` }}>
|
|
130
|
+
<b>LIVE VIDEO CHAT!</b>
|
|
131
|
+
</button>
|
|
132
|
+
</Link>
|
|
163
133
|
</div>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
134
|
+
}
|
|
135
|
+
{disqusWidget &&
|
|
136
|
+
<DisqusComponent className={styles.disqusContainerSponsor} title="" sponsor={sponsor} />
|
|
137
|
+
}
|
|
138
|
+
{sponsor?.materials && sponsor.materials.length > 0 &&
|
|
139
|
+
<DocumentsComponent event={sponsor?.materials} sponsorPage={true} />
|
|
140
|
+
}
|
|
141
|
+
{sponsor?.ads && sponsor.ads.length > 0 &&
|
|
142
|
+
<AdvertiseSponsorsComponent ads={sponsor?.ads} style={{ marginTop: '2em' }} />
|
|
143
|
+
}
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</section>
|
|
147
|
+
</React.Fragment>
|
|
148
|
+
)
|
|
168
149
|
};
|
|
169
150
|
|
|
170
151
|
const SponsorPage = (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
152
|
+
{
|
|
153
|
+
location,
|
|
154
|
+
user,
|
|
155
|
+
scanBadge,
|
|
156
|
+
sponsorId,
|
|
157
|
+
summit,
|
|
158
|
+
sponsors
|
|
159
|
+
}
|
|
180
160
|
) => {
|
|
181
161
|
|
|
182
162
|
return (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</Layout>
|
|
163
|
+
<Layout location={location}>
|
|
164
|
+
<SponsorPageTemplate
|
|
165
|
+
user={user}
|
|
166
|
+
scanBadge={scanBadge}
|
|
167
|
+
sponsorId={sponsorId}
|
|
168
|
+
summit={summit}
|
|
169
|
+
sponsors={sponsors}
|
|
170
|
+
/>
|
|
171
|
+
</Layout>
|
|
193
172
|
)
|
|
194
173
|
};
|
|
195
174
|
|
|
@@ -208,7 +187,6 @@ SponsorPageTemplate.propTypes = {
|
|
|
208
187
|
const mapStateToProps = ({ userState, sponsorState, summitState }) => ({
|
|
209
188
|
user: userState,
|
|
210
189
|
sponsors: sponsorState.sponsors,
|
|
211
|
-
tiers: sponsorState.tiers,
|
|
212
190
|
summit: summitState.summit
|
|
213
191
|
});
|
|
214
192
|
|
package/src/utils/filePath.js
CHANGED
|
@@ -33,6 +33,8 @@ const VOTEABLE_PRESENTATIONS_FILE_PATH = `${DATA_DIR_PATH}/${VOTEABLE_PRESENTATI
|
|
|
33
33
|
const POSTERS_PAGES_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/posters-pages.json`;
|
|
34
34
|
const MARKETING_SETTINGS_FILE_PATH = `${DATA_DIR_PATH}/marketing-settings.json`;
|
|
35
35
|
const MAINTENANCE_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/maintenance.json`;
|
|
36
|
+
const SPONSORS_FILE_NAME = "sponsors.json";
|
|
37
|
+
const SPONSORS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/${SPONSORS_FILE_NAME}`;
|
|
36
38
|
|
|
37
39
|
exports.REQUIRED_DIR_PATHS = [
|
|
38
40
|
DATA_DIR_PATH,
|
|
@@ -72,4 +74,5 @@ exports.VOTEABLE_PRESENTATIONS_FILE_NAME = VOTEABLE_PRESENTATIONS_FILE_NAME;
|
|
|
72
74
|
exports.VOTEABLE_PRESENTATIONS_FILE_PATH = VOTEABLE_PRESENTATIONS_FILE_PATH;
|
|
73
75
|
exports.POSTERS_PAGES_FILE_PATH = POSTERS_PAGES_FILE_PATH;
|
|
74
76
|
exports.MARKETING_SETTINGS_FILE_PATH = MARKETING_SETTINGS_FILE_PATH;
|
|
75
|
-
exports.MAINTENANCE_FILE_PATH = MAINTENANCE_FILE_PATH;
|
|
77
|
+
exports.MAINTENANCE_FILE_PATH = MAINTENANCE_FILE_PATH;
|
|
78
|
+
exports.SPONSORS_FILE_PATH = SPONSORS_FILE_PATH;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tiers": [
|
|
3
|
-
{
|
|
4
|
-
"id": "tier-cYGYq5-ae",
|
|
5
|
-
"name": "Top-Tier",
|
|
6
|
-
"badge": "/img/tier1-default-sessionbar-logo.png",
|
|
7
|
-
"lobby": {
|
|
8
|
-
"lobbyTemplate": "big-images",
|
|
9
|
-
"display": true
|
|
10
|
-
},
|
|
11
|
-
"sponsorPage": {
|
|
12
|
-
"sponsorTemplate": "big-header",
|
|
13
|
-
"widgets": {
|
|
14
|
-
"disqus": true,
|
|
15
|
-
"liveEvent": true,
|
|
16
|
-
"schedule": true,
|
|
17
|
-
"banner": true
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"eventTemplate": "",
|
|
21
|
-
"expoHallPage": {
|
|
22
|
-
"expoHallTemplate": "large",
|
|
23
|
-
"display": true
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"id": "tier-DHcI3dWGk",
|
|
28
|
-
"name": "Mid-Tier",
|
|
29
|
-
"badge": "/img/tier1-default-sessionbar-logo.png",
|
|
30
|
-
"lobby": {
|
|
31
|
-
"lobbyTemplate": "small-images",
|
|
32
|
-
"display": true
|
|
33
|
-
},
|
|
34
|
-
"sponsorPage": {
|
|
35
|
-
"sponsorTemplate": "big-header",
|
|
36
|
-
"widgets": {
|
|
37
|
-
"disqus": true,
|
|
38
|
-
"liveEvent": true,
|
|
39
|
-
"schedule": true,
|
|
40
|
-
"banner": true
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"eventTemplate": "",
|
|
44
|
-
"expoHallPage": {
|
|
45
|
-
"expoHallTemplate": "medium",
|
|
46
|
-
"display": true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": "tier-U_wEwGX8a",
|
|
51
|
-
"name": "Lower-Tier",
|
|
52
|
-
"badge": "/img/tier1-default-sessionbar-logo.png",
|
|
53
|
-
"lobby": {
|
|
54
|
-
"lobbyTemplate": "small-images",
|
|
55
|
-
"display": true
|
|
56
|
-
},
|
|
57
|
-
"sponsorPage": {
|
|
58
|
-
"sponsorTemplate": "small-header",
|
|
59
|
-
"widgets": {
|
|
60
|
-
"disqus": true,
|
|
61
|
-
"liveEvent": true,
|
|
62
|
-
"schedule": true,
|
|
63
|
-
"banner": true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"eventTemplate": "",
|
|
67
|
-
"expoHallPage": {
|
|
68
|
-
"expoHallTemplate": "small",
|
|
69
|
-
"display": true
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"imageHeader": {
|
|
74
|
-
"file": "/img/tier1-default-sponsor-headerimage-expopage.png",
|
|
75
|
-
"alt": "header"
|
|
76
|
-
},
|
|
77
|
-
"lobbyButton": {
|
|
78
|
-
"text": "Visit the Expo Hall",
|
|
79
|
-
"link": "/a/sponsors/"
|
|
80
|
-
}
|
|
81
|
-
}
|