mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-05-08 10:00:46 +00:00
expo and timetable pages
This commit is contained in:
@@ -1,77 +1,27 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { useState } from "react";
|
|
||||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||||
import { scheduleData } from "@/data/timetable";
|
import { getTranslations, setRequestLocale } from "next-intl/server";
|
||||||
import SectionDivider from "@/components/SectionDivider";
|
|
||||||
import { useTranslations } from "next-intl";
|
|
||||||
|
|
||||||
const tabs = Object.keys(scheduleData);
|
export default async function Timetable({
|
||||||
|
params,
|
||||||
export default function Timetable() {
|
}: {
|
||||||
const [activeTab, setActiveTab] = useState(tabs[0]);
|
params: Promise<{ locale: string }>;
|
||||||
const schedule = scheduleData[activeTab];
|
}) {
|
||||||
const t = useTranslations();
|
const { locale } = await params;
|
||||||
|
setRequestLocale(locale);
|
||||||
|
const t = await getTranslations({ locale });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="bg-[#0E0F19] min-h-screen flex flex-col items-center justify-center">
|
||||||
<div className="flex flex-col min-h-[90vh] m-6 mt-16 md:m-16">
|
|
||||||
<h1
|
<h1
|
||||||
className={`text-4xl md:text-5xl lg:text-6xl ${vipnagorgialla.className} font-bold italic uppercase text-[#2A2C3F] dark:text-[#EEE5E5] mt-8 md:mt-16 mb-8`}
|
className={`${vipnagorgialla.className} font-bold italic text-4xl md:text-5xl text-[#EEE5E5] uppercase mb-4`}
|
||||||
>
|
>
|
||||||
{t("schedule.title")}
|
{t("schedule.title")}
|
||||||
</h1>
|
</h1>
|
||||||
|
<p
|
||||||
{/* Tab menu */}
|
className={`${vipnagorgialla.className} font-bold italic text-5xl md:text-7xl text-[#EEE5E5] uppercase`}
|
||||||
<div className="flex gap-4 mb-8 flex-wrap">
|
|
||||||
{tabs.map((tab) => (
|
|
||||||
<button
|
|
||||||
key={tab}
|
|
||||||
onClick={() => setActiveTab(tab)}
|
|
||||||
className={`${vipnagorgialla.className} cursor-pointer uppercase italic px-4 py-2 text-lg font-semibold ${
|
|
||||||
activeTab === tab
|
|
||||||
? "bg-[#00A3E0] text-white"
|
|
||||||
: "bg-[#007CAB] dark:bg-[#007CAB] text-[#EEE5E5] hover:bg-[#00A3E0] dark:hover:bg-[#007CAB]"
|
|
||||||
} transition-colors`}
|
|
||||||
>
|
>
|
||||||
{t(`schedule.${tab}`)}
|
{t("schedule.comingSoon")}
|
||||||
</button>
|
</p>
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Schedule entries */}
|
|
||||||
<div className="space-y-6">
|
|
||||||
{schedule.map((item, idx) => (
|
|
||||||
<div
|
|
||||||
key={idx}
|
|
||||||
className="border-l-3 border-[#007CAB] pl-4 flex flex-col sm:flex-row flex-wrap gap-2 sm:gap-5 items-stretch"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className={`${vipnagorgialla.className} md:w-[180px] w-30 text-[#00A3E0] text-3xl md:text-4xl font-bold italic flex-shrink-0 flex items-center sm:justify-center`}
|
|
||||||
>
|
|
||||||
{item.time}
|
|
||||||
</div>
|
|
||||||
<div className="flex-1 flex flex-col justify-center min-w-0 sm:min-h-[120px]">
|
|
||||||
<div
|
|
||||||
className={`${vipnagorgialla.className} text-2xl md:text-3xl italic font-bold text-[#2A2C3F] dark:text-[#EEE5E5] text-balance`}
|
|
||||||
>
|
|
||||||
{t(item.titleKey)}
|
|
||||||
</div>
|
|
||||||
{item.description && (
|
|
||||||
<div className="text-xl md:text-2xl text-[#938BA1] dark:text-[#938BA1] text-balance">
|
|
||||||
{item.description}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="text-xl md:text-2xl text-[#938BA1] dark:text-[#938BA1] text-balance">
|
|
||||||
{t(item.locationKey)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<SectionDivider />
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -448,6 +448,7 @@
|
|||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Schedule",
|
"title": "Schedule",
|
||||||
|
"comingSoon": "Coming soon",
|
||||||
"day": "Day",
|
"day": "Day",
|
||||||
"time": "Time",
|
"time": "Time",
|
||||||
"event": "Event",
|
"event": "Event",
|
||||||
@@ -517,6 +518,7 @@
|
|||||||
},
|
},
|
||||||
"expo": {
|
"expo": {
|
||||||
"title": "Expo Area",
|
"title": "Expo Area",
|
||||||
|
"comingSoon": "Coming soon",
|
||||||
"description": "The TipiLAN expo area hosts companies, additional activities and lectures.",
|
"description": "The TipiLAN expo area hosts companies, additional activities and lectures.",
|
||||||
"areas": {
|
"areas": {
|
||||||
"bar": "Bar",
|
"bar": "Bar",
|
||||||
|
|||||||
@@ -449,6 +449,7 @@
|
|||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"title": "Ajakava",
|
"title": "Ajakava",
|
||||||
|
"comingSoon": "Tuleb hiljem",
|
||||||
"day": "Päev",
|
"day": "Päev",
|
||||||
"time": "Aeg",
|
"time": "Aeg",
|
||||||
"event": "Sündmus",
|
"event": "Sündmus",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
},
|
},
|
||||||
"expo": {
|
"expo": {
|
||||||
"title": "Messiala",
|
"title": "Messiala",
|
||||||
|
"comingSoon": "Tuleb hiljem",
|
||||||
"description": "TipiLANi messialal paiknevad ettevõtted, lisategevused ja toimuvad loengud.",
|
"description": "TipiLANi messialal paiknevad ettevõtted, lisategevused ja toimuvad loengud.",
|
||||||
"areas": {
|
"areas": {
|
||||||
"bar": "Baar",
|
"bar": "Baar",
|
||||||
|
|||||||
Reference in New Issue
Block a user