fix: update agenda section, update keyinvites(vip guest) section

This commit is contained in:
2026-06-04 13:00:57 +07:00
parent a52decc261
commit 0e1bf168ed
5 changed files with 596 additions and 51 deletions
+147 -33
View File
@@ -1,19 +1,64 @@
export default function AgendaSection({
data,
}: {
"use client";
type AgendaItem = {
order: string;
time: string;
title: string;
description: string;
};
type Props = {
data: {
id: string;
eyebrow: string;
title: string;
description: string;
items: { order: string; time: string; title: string; description: string }[];
items: AgendaItem[];
};
}) {
};
const renderFormattedText = (text: string) => {
if (!text) return "";
const lines = text.split("\n");
return lines.map((line, lineIndex) => {
// Split the line by markdown bold (**bold**) and italic (*italic*)
const parts = line.split(/(\*\*.*?\*\*|\*.*?\*)/g);
const renderedLine = parts.map((part, partIndex) => {
if (part.startsWith("**") && part.endsWith("**")) {
return (
<strong key={partIndex} className="text-primary font-bold">
{part.slice(2, -2)}
</strong>
);
}
if (part.startsWith("*") && part.endsWith("*")) {
return (
<em key={partIndex} className="italic text-on-surface-variant/80">
{part.slice(1, -1)}
</em>
);
}
return part;
});
return (
<span key={lineIndex} className="block min-h-[1.25rem]">
{renderedLine}
</span>
);
});
};
export default function AgendaSection({ data }: Props) {
return (
<section className="py-16 lg:py-24 max-w-hd mx-auto px-[var(--spacing-gutter)]" id={data.id}>
<div className="flex flex-col lg:flex-row justify-between lg:items-end mb-12 lg:mb-24 gap-8">
{/* Section Header */}
<div className="flex flex-col lg:flex-row justify-between lg:items-end mb-16 lg:mb-28 gap-8">
<div className="max-w-3xl">
<span className="font-[var(--font-label-caps)] text-xs lg:text-sm text-primary block mb-4 lg:mb-8 tracking-[0.25em]">
<span className="font-[var(--font-label-caps)] text-xs lg:text-sm text-primary block mb-4 lg:mb-6 tracking-[0.25em] uppercase">
{data.eyebrow}
</span>
<h2 className="font-[var(--font-display-lg)] text-on-surface uppercase tracking-tight text-[clamp(1.75rem,3vw+1rem,3.5rem)]">
@@ -25,33 +70,102 @@ export default function AgendaSection({
</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 lg:gap-10">
{data.items.map((item) => (
<div
key={item.order}
className="glass-panel p-6 lg:p-10 rounded-3xl relative overflow-hidden group hover:border-primary/60 transition-colors"
>
<div className="absolute top-0 right-0 p-6 lg:p-8">
<span className="font-[var(--font-display-lg)] text-xl lg:text-[32px] text-primary/20 group-hover:text-primary transition-colors">
{item.order}
</span>
</div>
<div className="mb-6 lg:mb-10">
<span className="font-[var(--font-display-lg)] text-xl lg:text-[28px] text-primary">
{item.time}
</span>
</div>
<h3 className="font-[var(--font-display-lg)] text-lg lg:text-[24px] text-on-surface mb-3 lg:mb-4">
{item.title}
</h3>
<p className="text-xs lg:text-base text-on-surface-variant/80 leading-relaxed mb-6 lg:mb-8">
{item.description}
</p>
<div className="w-full h-1 bg-primary/10 group-hover:bg-primary transition-colors duration-500" />
</div>
))}
{/* Timeline Container */}
<div className="relative w-full max-w-5xl mx-auto pl-10 lg:pl-0">
{/* Central vertical line */}
<div
className="absolute left-4 lg:left-1/2 top-4 bottom-4 w-[2px] bg-gradient-to-b from-primary via-primary/45 to-primary/5 -translate-x-1/2 pointer-events-none"
style={{ content: '""' }}
/>
{/* Timeline Items */}
<div className="space-y-12 lg:space-y-16">
{data.items.map((item, index) => {
const isEven = index % 2 === 0;
return (
<div key={item.order} className="relative w-full group">
{/* Timeline Dot (glowing on hover) */}
<div
className="absolute left-[-24px] lg:left-1/2 top-6 lg:top-8 -translate-x-1/2 w-4 h-4 rounded-full bg-background border-2 border-primary z-20 group-hover:scale-125 group-hover:bg-primary group-hover:shadow-[0_0_10px_#c5a059] transition-all duration-300 status-led"
/>
{/* Left/Right alternating grid layout */}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-16 w-full">
{isEven ? (
<>
{/* Left: Card (Desktop) / Full content (Mobile) */}
<div className="order-1 lg:order-1">
<div className="glass-panel p-6 lg:p-8 rounded-3xl relative overflow-hidden hover:border-primary/50 transition-colors duration-300">
<span className="absolute top-6 right-6 text-xs lg:text-sm font-[var(--font-display-lg)] text-primary/30 group-hover:text-primary transition-colors duration-300">
{item.order}
</span>
{/* Mobile-only time badge */}
<div className="lg:hidden mb-3">
<span className="font-[var(--font-display-lg)] text-base text-primary">
{item.time}
</span>
</div>
<h3 className="font-[var(--font-display-lg)] text-base lg:text-lg text-on-surface mb-3 leading-snug pr-8">
{renderFormattedText(item.title)}
</h3>
{item.description && (
<div className="text-xs lg:text-sm text-on-surface-variant/75 leading-relaxed border-t border-primary/10 pt-3 mt-3">
{renderFormattedText(item.description)}
</div>
)}
</div>
</div>
{/* Right: Time badge (Desktop-only) */}
<div className="order-2 lg:order-2 hidden lg:flex items-center justify-start pl-4">
<span className="font-[var(--font-display-lg)] text-xl lg:text-[22px] text-primary group-hover:text-on-surface transition-colors duration-300">
{item.time}
</span>
</div>
</>
) : (
<>
{/* Left: Time badge (Desktop-only) */}
<div className="order-2 lg:order-1 hidden lg:flex items-center justify-end pr-4 text-right">
<span className="font-[var(--font-display-lg)] text-xl lg:text-[22px] text-primary group-hover:text-on-surface transition-colors duration-300">
{item.time}
</span>
</div>
{/* Right: Card (Desktop) / Full content (Mobile) */}
<div className="order-1 lg:order-2">
<div className="glass-panel p-6 lg:p-8 rounded-3xl relative overflow-hidden hover:border-primary/50 transition-colors duration-300">
<span className="absolute top-6 right-6 text-xs lg:text-sm font-[var(--font-display-lg)] text-primary/30 group-hover:text-primary transition-colors duration-300">
{item.order}
</span>
{/* Mobile-only time badge */}
<div className="lg:hidden mb-3">
<span className="font-[var(--font-display-lg)] text-base text-primary">
{item.time}
</span>
</div>
<h3 className="font-[var(--font-display-lg)] text-base lg:text-lg text-on-surface mb-3 leading-snug pr-8">
{renderFormattedText(item.title)}
</h3>
{item.description && (
<div className="text-xs lg:text-sm text-on-surface-variant/75 leading-relaxed border-t border-primary/10 pt-3 mt-3">
{renderFormattedText(item.description)}
</div>
)}
</div>
</div>
</>
)}
</div>
</div>
);
})}
</div>
</div>
</section>
);
}
+2
View File
@@ -6,6 +6,7 @@ import VisionSection from "@/app/components/home/VisionSection";
import StatsSection from "@/app/components/home/StatsSection";
import AgendaSection from "@/app/components/home/AgendaSection";
import SpeakerSpotlightSection from "@/app/components/home/SpeakerSpotlightSection";
import KeyInviteesSection from "@/app/components/home/KeyInviteesSection";
import GallerySection from "@/app/components/home/GallerySection";
import PartnersCarousel from "@/app/components/home/PartnersCarousel";
@@ -19,6 +20,7 @@ export default function HomePageClient() {
<StatsSection data={home.stats} />
<AgendaSection data={home.agenda} />
<SpeakerSpotlightSection data={home.speakers} />
<KeyInviteesSection data={home.keyInvitees} />
<PartnersCarousel eyebrow={home.partners.eyebrow} title={home.partners.title} />
<GallerySection data={home.gallery} />
</main>
+127
View File
@@ -0,0 +1,127 @@
"use client";
type KeyInviteeItem = {
no: number;
name: string;
designation: string;
organization: string;
category: string;
country: string;
};
type Props = {
data: {
id: string;
eyebrow: string;
title: string;
items: KeyInviteeItem[];
};
};
const getFlagUrl = (country: string) => {
const mapping: Record<string, string> = {
Vietnam: "vn",
Malaysia: "my",
Indonesia: "id",
Laos: "la",
China: "cn",
};
const code = mapping[country];
return code ? `https://flagcdn.com/w40/${code}.png` : null;
};
const CountryFlag = ({ country }: { country: string }) => {
const url = getFlagUrl(country);
if (url) {
return (
// eslint-disable-next-line @next/next/no-img-element
<img
src={url}
alt={country}
className="w-5 h-3.5 object-cover rounded-sm shadow-sm border border-primary/20"
/>
);
}
// Beautiful gold region globe SVG for APAC
if (country === "APAC") {
return (
<svg className="w-5 h-5 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
<path d="M2 12h20" />
</svg>
);
}
// Global fallback SVG
return (
<svg className="w-5 h-5 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
<path d="M2 12h20" />
<path d="M12 2v20" />
</svg>
);
};
export default function KeyInviteesSection({ data }: Props) {
return (
<section className="py-16 lg:py-24 max-w-hd mx-auto px-[var(--spacing-gutter)]" id={data.id}>
{/* Section Header */}
<div className="mb-12 lg:mb-20 text-center max-w-3xl mx-auto">
<span className="font-[var(--font-label-caps)] text-xs lg:text-sm text-primary block mb-3 lg:mb-4 tracking-[0.25em] uppercase">
{data.eyebrow}
</span>
<h2 className="font-[var(--font-display-lg)] text-on-surface uppercase tracking-tight text-[clamp(1.75rem,3vw+1rem,3.5rem)] mb-4">
{data.title}
</h2>
<div className="h-[2px] w-24 bg-primary/50 mx-auto rounded-full" />
</div>
{/* Cards Grid */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8">
{data.items.map((item) => (
<div
key={item.no}
className="glass-panel p-6 lg:p-8 rounded-[2rem] relative overflow-hidden group hover:border-primary/60 transition-all duration-300 flex flex-col justify-between hover:scale-[1.02] hover:shadow-2xl hover:shadow-primary/5"
>
{/* Background glowing gradient decoration */}
<div className="absolute inset-0 bg-radial-gradient from-primary/5 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none" />
{/* Top Row: No & Category Badge */}
<div className="flex justify-between items-center mb-6 relative z-10">
<span className="font-[var(--font-display-lg)] text-xl lg:text-[24px] text-primary/30 group-hover:text-primary transition-colors duration-300">
#{String(item.no).padStart(2, "0")}
</span>
<span className="px-3 py-1 text-[10px] font-bold tracking-wider rounded-full border border-primary/20 bg-primary/5 text-primary/80 uppercase">
{item.category}
</span>
</div>
{/* Middle: Invitee Name & Title */}
<div className="mb-6 relative z-10 flex-grow">
<h3 className="font-[var(--font-display-lg)] text-lg lg:text-[22px] text-on-surface group-hover:text-primary transition-colors duration-300 mb-2 leading-snug">
{item.name}
</h3>
<p className="text-sm text-on-surface-variant/80 italic mb-2 min-h-[40px] leading-relaxed">
{item.designation}
</p>
<p className="font-[var(--font-label-caps)] text-[11px] lg:text-xs text-primary/95 tracking-widest uppercase leading-normal">
{item.organization}
</p>
</div>
{/* Bottom Row: Country Info */}
<div className="border-t border-primary/10 pt-4 mt-auto relative z-10 flex justify-between items-center">
<div className="flex items-center gap-2 text-xs text-on-surface-variant/60 uppercase tracking-widest">
<CountryFlag country={item.country} />
<span>{item.country}</span>
</div>
</div>
</div>
))}
</div>
</section>
);
}