parent
87ed173df8
commit
d601b1a610
|
|
@ -1,7 +1,11 @@
|
|||
import { useEffect, useState } from 'react';
|
||||
import type { AgendaItem, MicrositeSection, MicrositeSpeaker, PublicMicrositePayload } from '../../types';
|
||||
import { visitorApi } from '../../api/visitor';
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
import 'bootstrap-icons/font/bootstrap-icons.css';
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
type Ctx = {
|
||||
data: PublicMicrositePayload;
|
||||
eventId: string;
|
||||
|
|
@ -15,6 +19,11 @@ function str(v: unknown, fallback = ''): string {
|
|||
function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }) {
|
||||
const c = section.config;
|
||||
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 menuItems = (Array.isArray(c.menuItems) ? c.menuItems : []) as { label?: string; url?: string }[];
|
||||
|
|
@ -25,10 +34,17 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
|||
// console.log("Event logo:", ctx.data.event.logoUrl);
|
||||
// console.log("Final logoUrl:", logoUrl);
|
||||
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
return (
|
||||
<header className="eb-conference-header fixed-top">
|
||||
<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' }}>
|
||||
<<<<<<< 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' }}>
|
||||
{logoUrl ? <img src={logoUrl} alt={logoText} className="eb-header-logo" /> : <span>{logoText}</span>}
|
||||
</a> */}
|
||||
|
|
@ -36,6 +52,7 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
|||
<span>{logoText}</span>
|
||||
</a>
|
||||
<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) => {
|
||||
const label = str(item.label);
|
||||
const url = str(item.url, '#');
|
||||
|
|
@ -173,6 +190,35 @@ 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[] }) {
|
||||
// const title = str(section.config.title, 'Schedule');
|
||||
// const list = items.length ? items : [{ title: 'Session 1', time: '9:00 AM', track: 'Main' }];
|
||||
|
|
@ -721,12 +767,16 @@ console.log("list:", list);
|
|||
)}
|
||||
</div>
|
||||
)}
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
{/* Action Buttons */}
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
<div className="text-center mt-4">
|
||||
<a className="btn btn-primary btn-lg me-2" href="#register">
|
||||
Register
|
||||
|
|
@ -736,6 +786,8 @@ console.log("list:", list);
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
<style>{`
|
||||
@keyframes slideDown {
|
||||
|
|
@ -750,6 +802,7 @@ console.log("list:", list);
|
|||
}
|
||||
`}</style>
|
||||
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -907,7 +960,11 @@ function FooterSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
|||
|
||||
return (
|
||||
<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' }}>
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
<span style={{ opacity: 0.85 }}>{copyrightText}</span>
|
||||
<div>
|
||||
{links.map((link, i) => (
|
||||
|
|
@ -924,7 +981,11 @@ function FooterSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }
|
|||
function SponsorsSection({ section }: { section: MicrositeSection }) {
|
||||
const c = section.config;
|
||||
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 }>;
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
const cells =
|
||||
sponsors.length > 0
|
||||
? sponsors
|
||||
|
|
@ -935,6 +996,15 @@ function SponsorsSection({ section }: { section: MicrositeSection }) {
|
|||
<div className="container">
|
||||
<h2 className="eb-section-heading text-center mb-5">{title}</h2>
|
||||
<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) => {
|
||||
const sponsor = s as any;
|
||||
const url = str(sponsor.url, '#');
|
||||
|
|
@ -948,8 +1018,37 @@ function SponsorsSection({ section }: { section: MicrositeSection }) {
|
|||
</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);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ export interface MicrositeSpeaker {
|
|||
|
||||
export interface AgendaItem {
|
||||
title?: string;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
date?: string;
|
||||
>>>>>>> f6fbf96 (Microsite Enhancement- 9-7-2026)
|
||||
time?: string;
|
||||
track?: string;
|
||||
description?: string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue