Microsite changes
This commit is contained in:
parent
37f3a39c3e
commit
87ed173df8
|
|
@ -1,11 +1,7 @@
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import type { AgendaItem, MicrositeSection, MicrositeSpeaker, PublicMicrositePayload } from '../../types';
|
import type { AgendaItem, MicrositeSection, MicrositeSpeaker, PublicMicrositePayload } from '../../types';
|
||||||
import { visitorApi } from '../../api/visitor';
|
import { visitorApi } from '../../api/visitor';
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
import 'bootstrap-icons/font/bootstrap-icons.css';
|
import 'bootstrap-icons/font/bootstrap-icons.css';
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
type Ctx = {
|
type Ctx = {
|
||||||
data: PublicMicrositePayload;
|
data: PublicMicrositePayload;
|
||||||
eventId: string;
|
eventId: string;
|
||||||
|
|
@ -19,11 +15,6 @@ function str(v: unknown, fallback = ''): string {
|
||||||
function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }) {
|
function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }) {
|
||||||
const c = section.config;
|
const c = section.config;
|
||||||
const logoText = str(c.logoText, ctx.data.event.name);
|
const logoText = str(c.logoText, ctx.data.event.name);
|
||||||
<<<<<<< HEAD
|
|
||||||
const logoUrl = str(c.logoUrl, ctx.data.website.logo || ctx.data.event.logoUrl || '');
|
|
||||||
const menuItems = (Array.isArray(c.menuItems) ? c.menuItems : []) as { label?: string; url?: string }[];
|
|
||||||
|
|
||||||
=======
|
|
||||||
// const logoUrl = str(c.logoUrl, ctx.data.website.logo || ctx.data.event.logoUrl || '');
|
// const logoUrl = str(c.logoUrl, ctx.data.website.logo || ctx.data.event.logoUrl || '');
|
||||||
const logoUrl = str( c.logoUrl || ctx.data.website.logo || ctx.data.event.logoUrl, '');
|
const logoUrl = str( c.logoUrl || ctx.data.website.logo || ctx.data.event.logoUrl, '');
|
||||||
const menuItems = (Array.isArray(c.menuItems) ? c.menuItems : []) as { label?: string; url?: string }[];
|
const menuItems = (Array.isArray(c.menuItems) ? c.menuItems : []) as { label?: string; url?: string }[];
|
||||||
|
|
@ -34,17 +25,10 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
||||||
// console.log("Event logo:", ctx.data.event.logoUrl);
|
// console.log("Event logo:", ctx.data.event.logoUrl);
|
||||||
// console.log("Final logoUrl:", logoUrl);
|
// console.log("Final logoUrl:", logoUrl);
|
||||||
|
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
return (
|
return (
|
||||||
<header className="eb-conference-header fixed-top">
|
<header className="eb-conference-header fixed-top">
|
||||||
<nav className="navbar navbar-expand-lg navbar-dark">
|
<nav className="navbar navbar-expand-lg navbar-dark">
|
||||||
<div className="container-fluid px-3 px-lg-4" style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between' }}>
|
<div className="container-fluid px-3 px-lg-4" style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
<<<<<<< HEAD
|
|
||||||
<a className="navbar-brand" href="#hero" style={{ textDecoration: 'none', color: '#fff' }}>
|
|
||||||
{logoUrl ? <img src={logoUrl} alt={logoText} className="eb-header-logo" /> : <span>{logoText}</span>}
|
|
||||||
</a>
|
|
||||||
<ul className="navbar-nav" style={{ display: 'flex', gap: '0.75rem', listStyle: 'none', margin: 0, padding: 0, flexWrap: 'wrap' }}>
|
|
||||||
=======
|
|
||||||
{/* <a className="navbar-brand" href="#hero" style={{ textDecoration: 'none', color: '#fff' }}>
|
{/* <a className="navbar-brand" href="#hero" style={{ textDecoration: 'none', color: '#fff' }}>
|
||||||
{logoUrl ? <img src={logoUrl} alt={logoText} className="eb-header-logo" /> : <span>{logoText}</span>}
|
{logoUrl ? <img src={logoUrl} alt={logoText} className="eb-header-logo" /> : <span>{logoText}</span>}
|
||||||
</a> */}
|
</a> */}
|
||||||
|
|
@ -52,7 +36,6 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
||||||
<span>{logoText}</span>
|
<span>{logoText}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul className="navbar-nav" style={{ display: 'flex',alignItems: 'center', gap: '0.75rem', listStyle: 'none', margin: 0, padding: 0, flexWrap: 'wrap' }}>
|
<ul className="navbar-nav" style={{ display: 'flex',alignItems: 'center', gap: '0.75rem', listStyle: 'none', margin: 0, padding: 0, flexWrap: 'wrap' }}>
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
{menuItems.map((item, i) => {
|
{menuItems.map((item, i) => {
|
||||||
const label = str(item.label);
|
const label = str(item.label);
|
||||||
const url = str(item.url, '#');
|
const url = str(item.url, '#');
|
||||||
|
|
@ -190,35 +173,6 @@ function AboutSection({ section }: { section: MicrositeSection }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
function AgendaSection({ section, items }: { section: MicrositeSection; items: AgendaItem[] }) {
|
|
||||||
const title = str(section.config.title, 'Schedule');
|
|
||||||
const list = items.length ? items : [{ title: 'Session 1', time: '9:00 AM', track: 'Main' }];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section id="schedule" className="eb-schedule-section section py-5">
|
|
||||||
<div className="container">
|
|
||||||
<h2 className="eb-section-heading text-center mb-5">{title}</h2>
|
|
||||||
<div className="eb-schedule-list mx-auto" style={{ maxWidth: 820 }}>
|
|
||||||
{list.map((item, i) => {
|
|
||||||
const hasSp = !!str(item.speakerName);
|
|
||||||
return (
|
|
||||||
<div key={i} className={`eb-schedule-item py-3 ${hasSp ? 'item-talk' : 'item-other'}`}>
|
|
||||||
<div className="row align-items-start">
|
|
||||||
<div className="col-md-3">
|
|
||||||
<div className="eb-schedule-time">{item.time || ''}</div>
|
|
||||||
{hasSp && item.speakerPhotoUrl ? (
|
|
||||||
<img src={item.speakerPhotoUrl} className="rounded-circle mt-2" width={56} height={56} alt="" />
|
|
||||||
) : null}
|
|
||||||
{hasSp ? <div className="small text-muted mt-1">{item.speakerName}</div> : null}
|
|
||||||
</div>
|
|
||||||
<div className="col-md-9">
|
|
||||||
<h3 className="eb-schedule-title h5">{item.title || ''}</h3>
|
|
||||||
{item.track ? <div className="eb-schedule-track text-muted mb-2">{item.track}</div> : null}
|
|
||||||
{item.description ? <p className="mb-0 text-muted small">{item.description}</p> : null}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
=======
|
|
||||||
// function AgendaSection({ section, items }: { section: MicrositeSection; items: AgendaItem[] }) {
|
// function AgendaSection({ section, items }: { section: MicrositeSection; items: AgendaItem[] }) {
|
||||||
// const title = str(section.config.title, 'Schedule');
|
// const title = str(section.config.title, 'Schedule');
|
||||||
// const list = items.length ? items : [{ title: 'Session 1', time: '9:00 AM', track: 'Main' }];
|
// const list = items.length ? items : [{ title: 'Session 1', time: '9:00 AM', track: 'Main' }];
|
||||||
|
|
@ -767,16 +721,12 @@ console.log("list:", list);
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
{/* Action Buttons */}
|
{/* Action Buttons */}
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
<div className="text-center mt-4">
|
<div className="text-center mt-4">
|
||||||
<a className="btn btn-primary btn-lg me-2" href="#register">
|
<a className="btn btn-primary btn-lg me-2" href="#register">
|
||||||
Register
|
Register
|
||||||
|
|
@ -786,8 +736,6 @@ console.log("list:", list);
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
<style>{`
|
<style>{`
|
||||||
@keyframes slideDown {
|
@keyframes slideDown {
|
||||||
|
|
@ -802,7 +750,6 @@ console.log("list:", list);
|
||||||
}
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
|
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -960,11 +907,7 @@ function FooterSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer id="footer" className="py-4 mt-5" style={{ background: 'var(--eb-conf-footer-bg)', color: '#fff' }}>
|
<footer id="footer" className="py-4 mt-5" style={{ background: 'var(--eb-conf-footer-bg)', color: '#fff' }}>
|
||||||
<<<<<<< HEAD
|
|
||||||
<div className="container" style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'space-between', gap: '1rem' }}>
|
|
||||||
=======
|
|
||||||
<div className="container" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: '1rem', textAlign: 'center' }}>
|
<div className="container" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: '1rem', textAlign: 'center' }}>
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
<span style={{ opacity: 0.85 }}>{copyrightText}</span>
|
<span style={{ opacity: 0.85 }}>{copyrightText}</span>
|
||||||
<div>
|
<div>
|
||||||
{links.map((link, i) => (
|
{links.map((link, i) => (
|
||||||
|
|
@ -981,11 +924,7 @@ function FooterSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
||||||
function SponsorsSection({ section }: { section: MicrositeSection }) {
|
function SponsorsSection({ section }: { section: MicrositeSection }) {
|
||||||
const c = section.config;
|
const c = section.config;
|
||||||
const title = str(c.title, 'Sponsors');
|
const title = str(c.title, 'Sponsors');
|
||||||
<<<<<<< HEAD
|
|
||||||
const sponsors = (Array.isArray(c.sponsors) ? c.sponsors : []) as { name?: string; logoUrl?: string; url?: string }[];
|
|
||||||
=======
|
|
||||||
const sponsors = (Array.isArray(c.sponsors) ? c.sponsors : []) as Array<{ name?: string; logoUrl?: string; url?: string } | { name: string }>;
|
const sponsors = (Array.isArray(c.sponsors) ? c.sponsors : []) as Array<{ name?: string; logoUrl?: string; url?: string } | { name: string }>;
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
const cells =
|
const cells =
|
||||||
sponsors.length > 0
|
sponsors.length > 0
|
||||||
? sponsors
|
? sponsors
|
||||||
|
|
@ -996,15 +935,6 @@ function SponsorsSection({ section }: { section: MicrositeSection }) {
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<h2 className="eb-section-heading text-center mb-5">{title}</h2>
|
<h2 className="eb-section-heading text-center mb-5">{title}</h2>
|
||||||
<div className="row g-3 justify-content-center">
|
<div className="row g-3 justify-content-center">
|
||||||
<<<<<<< HEAD
|
|
||||||
{cells.map((s, i) => (
|
|
||||||
<div key={i} className="col-6 col-md-4 col-lg-2 text-center">
|
|
||||||
<a href={str(s.url, '#')} style={{ textDecoration: 'none', color: '#475569' }}>
|
|
||||||
{s.logoUrl ? <img src={s.logoUrl} alt={str(s.name)} style={{ maxHeight: 48 }} className="img-fluid" /> : str(s.name)}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
=======
|
|
||||||
{cells.map((s, i) => {
|
{cells.map((s, i) => {
|
||||||
const sponsor = s as any;
|
const sponsor = s as any;
|
||||||
const url = str(sponsor.url, '#');
|
const url = str(sponsor.url, '#');
|
||||||
|
|
@ -1018,37 +948,8 @@ function SponsorsSection({ section }: { section: MicrositeSection }) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
)
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function CtaSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }) {
|
|
||||||
const c = section.config;
|
|
||||||
const headline = str(c.headline, 'Join us');
|
|
||||||
const subtext = str(c.subtext);
|
|
||||||
const buttonLabel = str(c.buttonLabel, 'Register');
|
|
||||||
const buttonUrl = str(c.buttonUrl, ctx.registrationUrl);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section id="cta" className="py-5 text-white text-center" style={{ background: 'var(--eb-conf-primary)' }}>
|
|
||||||
<div className="container">
|
|
||||||
<h2 className="eb-section-heading text-white mb-3">{headline}</h2>
|
|
||||||
{subtext ? <p className="lead mb-4">{subtext}</p> : null}
|
|
||||||
<a className="btn btn-light btn-lg" href={buttonUrl}>
|
|
||||||
{buttonLabel}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function VenueSection({ section }: { section: MicrositeSection }) {
|
|
||||||
const c = section.config;
|
|
||||||
const title = str(c.title, 'Venue');
|
|
||||||
const body = str(c.body);
|
|
||||||
const mapEmbedUrl = str(c.mapEmbedUrl);
|
const mapEmbedUrl = str(c.mapEmbedUrl);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@ export interface MicrositeSpeaker {
|
||||||
|
|
||||||
export interface AgendaItem {
|
export interface AgendaItem {
|
||||||
title?: string;
|
title?: string;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
date?: string;
|
date?: string;
|
||||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
|
||||||
time?: string;
|
time?: string;
|
||||||
track?: string;
|
track?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue