diff --git a/src/app/[locale]/agenda/page.tsx b/src/app/[locale]/agenda/page.tsx index 94b944d..be9a1c2 100644 --- a/src/app/[locale]/agenda/page.tsx +++ b/src/app/[locale]/agenda/page.tsx @@ -1,5 +1,6 @@ import { type Locale } from "~/i18n/routing"; import { getTranslations } from "next-intl/server"; +import { AgendaSection } from "~/components/AgendaSection"; type Props = { params: Promise<{ locale: Locale }>; @@ -9,128 +10,37 @@ type Props = { export default async function AgendaPage({ params }: Props) { const { locale } = await params; const t = await getTranslations("Agenda"); - - const agendaItems = [ - { id: 1, type: "registration", duration: "1h 30m" }, - { id: 2, type: "exhibition", duration: "30m" }, - { id: 3, type: "ceremony", duration: "50m" }, - { id: 4, type: "session", duration: "1h" }, - { id: 5, type: "break", duration: "30m" }, - { id: 6, type: "session", duration: "1h 25m" }, - { id: 7, type: "break", duration: "15m" }, - { id: 8, type: "session", duration: "1h" }, - { id: 9, type: "closing", duration: "15m" } - ]; - const getItemTitle = (item: typeof agendaItems[0]): string => { - if (item.type === 'ceremony') return t("agendaItems.opening"); - if (item.type === 'session') { - if (item.id === 4) return t("agendaItems.session1"); - if (item.id === 6) return t("agendaItems.session2"); - return t("agendaItems.session3"); - } - if (item.type === 'break') { - if (item.id === 5) return t("agendaItems.break1"); - return t("agendaItems.break2"); - } - return t(`agendaItems.${item.type}` as "agendaItems.registration" | "agendaItems.exhibition" | "agendaItems.closing"); - }; - return ( -
- {/* Dark overlay for text readability */} -
- - {/* Main content container */} -
-
- {/* Hero section with the main title */} -
-

- {locale === 'ar' ? ( - <> - ما بعد - اللحظة - - ) : ( - <> - Beyond The - Moment - - )} -

-

- {t("heroSubtitle")} -

-
- {/* Main agenda timeline section */} -
-
- {/* Agenda header with title and TEDx logo */} -
-

- {t("title")} -

-
- TEDx -
-
+ return ( +
+ {/* Overlay for text readability */} +
- {/* Timeline with agenda items */} -
- {/* Vertical timeline line with gradient */} -
- - {/* List of agenda items */} -
- {agendaItems.map((item) => ( -
- {/* Individual agenda item */} -
- {/* Red X symbol marker if we can get the x symbol from them it will be better */} -
- × -
- - {/* Content area for the agenda item */} -
- {/* Item title with hover effect to lock nice */} -

- {getItemTitle(item)} -

- - {/* Item metadata (duration and time slot) */} -
- {/* Duration badge */} - - {item.duration} - - {/* Time slot badge */} - - {t(`timeSlots.slot${item.id}` as "timeSlots.slot1" | "timeSlots.slot2" | "timeSlots.slot3" | "timeSlots.slot4" | "timeSlots.slot5" | "timeSlots.slot6" | "timeSlots.slot7" | "timeSlots.slot8" | "timeSlots.slot9")} - -
-
-
-
- ))} -
-
-
-
+
+ {/* Hero section with the main title */} +
+

+ {locale === 'ar' ? ( + <> + ما بعد + اللحظة + + ) : ( + <> + Beyond The + Moment + + )} +

+

+ {t("heroSubtitle")} +

+ + {/* Agenda Section */} +
); diff --git a/src/components/AgendaSection.tsx b/src/components/AgendaSection.tsx new file mode 100644 index 0000000..8ba3dfd --- /dev/null +++ b/src/components/AgendaSection.tsx @@ -0,0 +1,82 @@ +"use client"; + +import { useTranslations, useLocale } from "next-intl"; + +export function AgendaSection() { + const t = useTranslations("Agenda"); + const locale = useLocale(); + + const agendaItems = [ + { id: 1, type: "registration", duration: "1h 30m" }, + { id: 2, type: "exhibition", duration: "30m" }, + { id: 3, type: "opening", duration: "50m" }, + { id: 4, type: "session1", duration: "1h" }, + { id: 5, type: "break1", duration: "30m" }, + { id: 6, type: "session2", duration: "1h 25m" }, + { id: 7, type: "break2", duration: "15m" }, + { id: 8, type: "session3", duration: "1h" }, + { id: 9, type: "closing", duration: "15m" } + ]; + + return ( +
+
+ {/* Header */} +
+

+ {t("title")} +

+

+ {locale === 'ar' + ? 'اكتشف جدولنا المنسق بعناية من المحاضرات الملهمة وورش العمل التفاعلية' + : 'Discover our carefully curated schedule of inspiring talks and interactive workshops' + } +

+
+ + {/* Agenda Grid */} +
+ {agendaItems.map((item, index) => ( +
+ {/* Item Title */} +

+ {t(`agendaItems.${item.type}` as "agendaItems.registration" | "agendaItems.exhibition" | "agendaItems.opening" | "agendaItems.session1" | "agendaItems.break1" | "agendaItems.session2" | "agendaItems.break2" | "agendaItems.session3" | "agendaItems.closing")} +

+ + {/* Time and Duration */} +
+ {/* Time */} +
+ + {locale === 'ar' ? 'الوقت' : 'Time'} + + + {t(`timeSlots.slot${item.id}` as "timeSlots.slot1" | "timeSlots.slot2" | "timeSlots.slot3" | "timeSlots.slot4" | "timeSlots.slot5" | "timeSlots.slot6" | "timeSlots.slot7" | "timeSlots.slot8" | "timeSlots.slot9")} + +
+ + {/* Duration */} +
+ + {locale === 'ar' ? 'المدة' : 'Duration'} + + + {item.duration} + +
+
+
+ ))} +
+
+
+ ); +}