diff --git a/help.txt b/help.txt new file mode 100644 index 0000000..15c5fd4 --- /dev/null +++ b/help.txt @@ -0,0 +1 @@ +URL: http://localhost:5175/event/6a43e05fdc940a0d6e057f7b \ No newline at end of file diff --git a/src/api/microsite.ts b/src/api/microsite.ts index ae94fb9..9edcbb2 100644 --- a/src/api/microsite.ts +++ b/src/api/microsite.ts @@ -1,9 +1,295 @@ import { apiGet } from './client'; import type { PublicMicrositePayload, RegistrationInfo } from '../types'; + export const micrositeApi = { get(eventId: string): Promise { + //Real API call return apiGet(`/public/events/${eventId}/microsite`); + + //Mock: Testing data + // return Promise.resolve({ + // "event": { + // "_id": "6a43e05fdc940a0d6e057f7b", + // "name": "NOVEL Lung Health Summit - Goa - 7th & 8th August 2026", + // "subtitle": "", + // "description": "The summit aims to be one of the most sought-after programs in India which will cover topics on contemporary and advanced diagnostics, and management strategies in Respiratory medicine including asthma, COPD, tuberculosis, ILD, airway diseases, and practical respiratory care through concise, high-impact interactive sessions.\nThe summit is curated for pulmonologists and consultant physicians with a special interest in respiratory medicine across India. The program will feature expert-led case discussions, interactive panel sessions, and practical clinical insights focused on evidence-based respiratory care.", + // "eventType": "summit", + // "startDate": "2026-08-07T12:00:00.000Z", + // "endDate": "2026-08-08T12:00:00.000Z", + // "date": "Aug 7, 2026 – Aug 8, 2026", + // "location": "DoubleTree by Hilton Panjim, Goa", + // "locationType": "physical", + // "logoUrl": "https://did94hhhcgq1d.cloudfront.net/eventbuzz/6a43dfeddc940a0d6e057eef/6a43e05fdc940a0d6e057f7b/event/logo/event-logo-1782833860045.png", + // "imageUrl": "https://did94hhhcgq1d.cloudfront.net/eventbuzz/6a43dfeddc940a0d6e057eef/6a43e05fdc940a0d6e057f7b/event/logo/event-logo-1782833860045.png" + // }, + // "website": { + // "enabled": false, + // "title": "", + // "description": "", + // "logo": "", + // "banners": [], + // "favicon": "", + // "primaryColor": "", + // "accentColor": "", + // "fontPair": "Playfair + Source Sans", + // "layoutTemplate": "conference", + // "seoDescription": "", + // "theme": { + // "theme": "simple", + // "color": "yellow", + // "font": "Raleway" + // } + // }, + // "title": "NOVEL Lung Health Summit - Goa - 7th & 8th August 2026", + // "sections": [ + // { + // "id": "header-0", + // "type": "header", + // "order": 1, + // "config": { + // "logoText": "NOVEL Lung Health Summit - Goa - 7th & 8th August 2026", + // "logoUrl": "", + // "menuItems": [ + // { + // "label": "About", + // "url": "#about" + // }, + // { + // "label": "Speakers", + // "url": "#speakers" + // }, + // { + // "label": "Schedule", + // "url": "#schedule" + // }, + // { + // "label": "Register", + // "url": "https://eventbuzz.live/event/6a43e05fdc940a0d6e057f7b/register" + // } + // ] + // } + // }, + // { + // "id": "banner-1", + // "type": "banner", + // "order": 0, + // "config": { + // "headline": "NOVEL Lung Health Summit - Goa - 7th & 8th August 2026", + // "subtext": "The summit aims to be one of the most sought-after programs in India which will cover topics on contemporary and advanced diagnostics, and management strategies in Respiratory medicine including asthma, COPD, tuberculosis, ILD, airway diseases, and practical respiratory care through concise, high-impact interactive sessions.\nThe summit is curated for pulmonologists and consultant physicians with a special interest in respiratory medicine across India. The program will feature expert-led case discussions, interactive panel sessions, and practical clinical insights focused on evidence-based respiratory care.", + // "ctaText": "Register", + // "ctaUrl": "https://eventbuzz.live/event/6a43e05fdc940a0d6e057f7b/register", + // "secondaryCtaText": "View schedule", + // "secondaryCtaUrl": "#schedule", + // "backgroundClass": "bg-primary", + // "backgroundImage": "https://did94hhhcgq1d.cloudfront.net/eventbuzz/6a43dfeddc940a0d6e057eef/6a43e05fdc940a0d6e057f7b/event/banner/event-banner-1782833860270.png", + // "heroMetaLine": "Aug 7, 2026 – Aug 8, 2026 · DoubleTree by Hilton Panjim, Goa" + // } + // }, + // { + // "id": "countdown-2", + // "type": "countdown", + // "order": 2, + // "config": { + // "headingLine": "Event starts · Aug 7, 2026, 12:00 PM" + // } + // }, + // { + // "id": "about-3", + // "type": "about", + // "order": 3, + // "config": { + // "title": "About the event", + // "lead": "The summit aims to be one of the most sought-after programs in India which will cover topics on contemporary and advanced diagnostics, and management strategies in Respiratory medicine including asthma, COPD, tuberculosis, ILD, airway diseases, and practical respiratory care through concise, high-impact interactive sessions.\nThe summit is curated for pulmonologists and consultant physicians with a special interest in respiratory medicine across India. The program will feature expert-led case discussions, interactive panel sessions, and practical clinical insights focused on evidence-based respiratory care.", + // "bulletsTitle": "Why attend", + // "bullets": [ + // "Hands-on sessions and practical takeaways", + // "Networking with peers and sponsors", + // "Product tips from the EventBuzz team" + // ], + // "ctaLabel": "Reserve your seat", + // "ctaUrl": "https://eventbuzz.live/event/6a43e05fdc940a0d6e057f7b/register" + // } + // }, + // { + // "id": "agenda-4", + // "type": "agenda", + // "order": 4, + // "config": { + // "title": "Schedule" + // } + // }, + // { + // "id": "speakers-5", + // "type": "speakers", + // "order": 5, + // "config": { + // "title": "Speakers", + // "limit": 12 + // } + // }, + // { + // "id": "register_links-6", + // "type": "register_links", + // "order": 6, + // "config": { + // "title": "Register", + // "primaryLabel": "Register now", + // "primaryUrl": "https://eventbuzz.live/event/6a43e05fdc940a0d6e057f7b/register" + // } + // }, + // { + // "id": "sponsors-7", + // "type": "sponsors", + // "order": 7, + // "config": { + // "title": "Sponsors & partners", + // "sponsors": [], + // "partnerCtaLabel": "Become a partner", + // "partnerCtaUrl": "#" + // } + // }, + // { + // "id": "footer-8", + // "type": "footer", + // "order": 8, + // "config": { + // "copyrightText": "© 2026 NOVEL Lung Health Summit - Goa - 7th & 8th August 2026. All rights reserved." + // } + // } + // ], + // "agenda": [ + // { + // "title": "Precision Management with SITT in OADs", + // "date": "Aug 7, 2026", + // "time": "1:30 PM – 2:15 PM", + // "track": "DoubleTree by Hilton Panjim, Goa", + // "description": "The summit aims to be one of the most sought-after programs in India which will cover topics on contemporary and advanced diagnostics, and management strategies in Respiratory medicine including asthma, COPD, tuberculosis, ILD, airway diseases, and practical respiratory care through concise, high-impact interactive sessions.\nThe summit is curated for pulmonologists and consultant physicians with a special interest in respiratory medicine across India. The program will feature expert-led case dis", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Indian Innovations in Aerosol Therapy", + // "date": "Aug 7, 2026", + // "time": "2:15 PM – 2:55 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "JAMA: Is it really the End of Blue Inhalers? (15-min)", + // "date": "Aug 7, 2026", + // "time": "2:55 PM – 3:10 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Concepts in Pulmonary Diagnostics: Practice-changing directions", + // "date": "Aug 7, 2026", + // "time": "3:10 PM – 3:55 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Transforming Respiratory Medicine Landscape: Era of Biologics", + // "date": "Aug 7, 2026", + // "time": "4:15 PM – 4:45 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Novel Screening and assessment tools: Closing the Care Gap for India", + // "date": "Aug 7, 2026", + // "time": "4:45 PM – 5:30 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Complex cases from Respiratory clinics", + // "date": "Aug 7, 2026", + // "time": "5:30 PM – 6:05 PM", + // "track": "Main programme", + // "description": "04 cases of 5 mins each + 3 mins discussion on each case", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Tuberculosis Associated Lung Disease (TBaLD): India's Hidden Respiratory Epidemic?", + // "date": "Aug 8, 2026", + // "time": "9:00 AM – 9:45 AM", + // "track": "Main programme", + // "description": "15-min Talk\t| 30-min Panel Discussion", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Untangling complex scenarios of ILD & OAD", + // "date": "Aug 8, 2026", + // "time": "9:45 AM – 10:15 AM", + // "track": "Main programme", + // "description": "15-min Talk | 15-min Panel Discussion", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Prevention of Future Exacerbations (Discharge Bundle)", + // "date": "Aug 8, 2026", + // "time": "10:15 AM – 11:00 AM", + // "track": "Main programme", + // "description": "5-min Intro |\t40-min Panel Discussion", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Pulmonary Rehabilitation in Chronic Lung diseases: Experiences from India", + // "date": "Aug 8, 2026", + // "time": "11:15 AM – 11:40 AM", + // "track": "Main programme", + // "description": "20-min Presentation | 5-min Q&A", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "JAMA: Clinical applications of Lung Oscillometry (15-min)", + // "date": "Aug 8, 2026", + // "time": "11:40 AM – 11:55 AM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Sponsored Session (20-mins)", + // "date": "Aug 8, 2026", + // "time": "11:55 AM – 12:15 PM", + // "track": "Main programme", + // "description": "", + // "speakerName": "", + // "speakerPhotoUrl": "" + // }, + // { + // "title": "Respiratory practice of tomorrow: What lies on the horizon?", + // "date": "Aug 8, 2026", + // "time": "12:15 PM – 12:30 PM", + // "track": "Main programme", + // "description": "15-min Panel Discussion", + // "speakerName": "", + // "speakerPhotoUrl": "" + // } + // ], + // "speakers": [], + // "registrationFormId": "6a43e4e9dc940a0d6e058466", + // "registrationUrl": "https://eventbuzz.live/event/6a43e05fdc940a0d6e057f7b/form/6a43e4e9dc940a0d6e058466" + // }); }, getRegistration(eventId: string): Promise { diff --git a/src/components/microsite/MicrositeLayout.tsx b/src/components/microsite/MicrositeLayout.tsx index 4a9ae42..e8bbb65 100644 --- a/src/components/microsite/MicrositeLayout.tsx +++ b/src/components/microsite/MicrositeLayout.tsx @@ -1,5 +1,5 @@ import { useEffect, type CSSProperties, type ReactNode } from 'react'; -import { conferenceCssVars, loadConferenceFont } from '../../theme/conferenceTheme'; +import { conferenceCssVars, loadConferenceFont, resolveThemeClass } from '../../theme/conferenceTheme'; import type { PublicMicrositePayload } from '../../types'; type Props = { @@ -9,7 +9,7 @@ type Props = { export function MicrositeLayout({ data, children }: Props) { useEffect(() => { - loadConferenceFont(data.website.fontPair); + loadConferenceFont(data.website); const title = data.website.title || data.event.name || 'Event'; document.title = title; if (data.website.favicon) { @@ -24,13 +24,17 @@ export function MicrositeLayout({ data, children }: Props) { }, [data]); const style = conferenceCssVars(data.website) as CSSProperties; + const themeClass = resolveThemeClass(data.website.theme); return ( -
- {children} -
- Powered by EventBuzz -
+
+
+ {children} +
+
+ Powered by EventBuzz +
+
); } diff --git a/src/components/microsite/SectionRenderer.tsx b/src/components/microsite/SectionRenderer.tsx index eb46c48..af93f2b 100644 --- a/src/components/microsite/SectionRenderer.tsx +++ b/src/components/microsite/SectionRenderer.tsx @@ -47,10 +47,11 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx } {/* {logoUrl ? {logoText} : {logoText}} */} - {logoUrl && ( {logoText} )} - {logoText} + +
{logoUrl && ( {logoText} )}
+ {logoText}
-
    + {/*
      {menuItems.map((item, i) => { const label = str(item.label); const url = str(item.url, '#'); @@ -68,7 +69,7 @@ function HeaderSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx } ); })} -
    +
*/}
@@ -91,9 +92,9 @@ function BannerSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx } {bgImage ?
: null}
-

{headline}

- {heroMetaLine ?
{heroMetaLine}
: null} - {subtext ?

{subtext}

: null} + {/*

{headline}

*/} + {/* {heroMetaLine ?
{heroMetaLine}
: null} */} + {/* {subtext ?

{subtext}

: null} */} {(ctaText || secText) && (
{ctaText && ctaUrl ? ( @@ -101,11 +102,11 @@ function BannerSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx } {ctaText} ) : null} - {secText ? ( + {/* {secText ? ( {secText} - ) : null} + ) : null} */}
)}
@@ -146,14 +147,15 @@ function CountdownSection({ section, ctx }: { section: MicrositeSection; ctx: Ct }, [start, ctx.data.event.name]); return ( -
-
- {headingLine ?

{headingLine}

: null} -

- {phrase} -

-
-
+ //
+ //
+ // {headingLine ?

{headingLine}

: null} + //

+ // {phrase} + //

+ //
+ //
+ <> ); } @@ -166,24 +168,26 @@ function AboutSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx }) const ctaUrl = resolveRegistrationCtaUrl(ctaText, c.ctaUrl, ctx.registrationUrl); return ( -
-
-

{title}

- {body ?

{body}

: null} +
+ {/*
*/} +
+ {/*

{title}

*/} + {/* {body ?

{body}

: null} */} + {body ?

{body}

: null} {bullets.length > 0 ? ( -
    +
      {bullets.map((b, i) => (
    • {b}
    • ))}
    ) : null} - {ctaText && ctaUrl ? ( + {/* {ctaText && ctaUrl ? ( - ) : null} + ) : null} */}
); @@ -465,18 +469,18 @@ function AgendaSection({ const filteredList = dates.length ? list.filter((item) => item.date === selectedDate) : list; return ( -
+
-

{title}

+

{title}

{/* Day Selector */}
{dates.map((date) => (
+ )} ); } @@ -805,19 +819,20 @@ function RegisterLinksSection({ section, ctx }: { section: MicrositeSection; ctx const secondaryUrl = str(c.secondaryUrl, '#'); return ( -
-
-

{title}

- - {primaryLabel} - - {secondaryLabel ? ( - - {secondaryLabel} - - ) : null} -
-
+ //
+ //
+ //

{title}

+ // + // {primaryLabel} + // + // {secondaryLabel ? ( + // + // {secondaryLabel} + // + // ) : null} + //
+ //
+ <> ); } @@ -913,12 +928,12 @@ function FooterSection({ section, ctx }: { section: MicrositeSection; ctx: Ctx } const links = (Array.isArray(c.links) ? c.links : []) as { label?: string; url?: string }[]; return ( -