145 lines
5.8 KiB
TypeScript
145 lines
5.8 KiB
TypeScript
import { getTranslations } from 'next-intl/server';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { Globe } from 'lucide-react';
|
|
import { WikiBackLink } from '@/components/wiki/WikiBackLink';
|
|
|
|
export default async function PortsRoutesPage() {
|
|
const t = await getTranslations('dashboard.wikiPages');
|
|
|
|
const routes = t.raw('portsRoutes.routes') as Array<{
|
|
name: string;
|
|
description: string;
|
|
via: string;
|
|
transitTime: string;
|
|
majorPorts: string[];
|
|
}>;
|
|
const passages = t.raw('portsRoutes.passages') as Array<{
|
|
name: string;
|
|
location: string;
|
|
length: string;
|
|
description: string;
|
|
keyStat: string;
|
|
}>;
|
|
const ports = t.raw('portsRoutes.ports') as Array<{
|
|
rank: number;
|
|
port: string;
|
|
country: string;
|
|
teu: string;
|
|
}>;
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<WikiBackLink />
|
|
|
|
<div className="mb-8">
|
|
<div className="flex items-center gap-3">
|
|
<Globe className="w-10 h-10 text-brand-navy" />
|
|
<h1 className="text-3xl font-bold text-brand-navy">{t('portsRoutes.title')}</h1>
|
|
</div>
|
|
<p className="mt-3 text-neutral-600 max-w-3xl">{t('portsRoutes.description')}</p>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">
|
|
{t('portsRoutes.majorRoutesTitle')}
|
|
</h2>
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
{routes.map(route => (
|
|
<Card key={route.name} className="bg-white">
|
|
<CardContent className="pt-4">
|
|
<h4 className="font-semibold text-brand-navy mb-1">{route.name}</h4>
|
|
<p className="text-sm text-neutral-600 mb-3">{route.description}</p>
|
|
<div className="flex items-center gap-4 text-sm">
|
|
<span className="text-neutral-500">
|
|
{t('portsRoutes.colVia')}:{' '}
|
|
<strong className="text-neutral-800">{route.via}</strong>
|
|
</span>
|
|
<span className="text-neutral-500">
|
|
{t('portsRoutes.colTransit')}:{' '}
|
|
<strong className="text-brand-navy">{route.transitTime}</strong>
|
|
</span>
|
|
</div>
|
|
<div className="flex flex-wrap gap-1 mt-2">
|
|
{route.majorPorts.map(port => (
|
|
<span
|
|
key={port}
|
|
className="px-2 py-0.5 bg-brand-turquoise/5 text-brand-navy text-xs rounded"
|
|
>
|
|
{port}
|
|
</span>
|
|
))}
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">{t('portsRoutes.passagesTitle')}</h2>
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
{passages.map(p => (
|
|
<Card key={p.name} className="bg-white border-brand-turquoise/30">
|
|
<CardContent className="pt-4">
|
|
<div className="flex items-start justify-between mb-2">
|
|
<div>
|
|
<h4 className="font-semibold text-brand-navy">{p.name}</h4>
|
|
<p className="text-sm text-neutral-500">
|
|
{p.location} — {t('portsRoutes.colLength')}: {p.length}
|
|
</p>
|
|
</div>
|
|
<span className="px-2 py-1 bg-brand-turquoise/10 text-brand-navy text-xs rounded font-medium whitespace-nowrap">
|
|
{p.keyStat}
|
|
</span>
|
|
</div>
|
|
<p className="text-sm text-neutral-600">{p.description}</p>
|
|
</CardContent>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
</div>
|
|
|
|
<div className="mt-8">
|
|
<h2 className="text-xl font-bold text-brand-navy mb-4">{t('portsRoutes.portsTitle')}</h2>
|
|
<div className="overflow-x-auto">
|
|
<table className="w-full text-sm bg-white rounded-lg border">
|
|
<thead className="bg-neutral-50">
|
|
<tr>
|
|
<th className="text-left p-3 font-medium">{t('portsRoutes.colRank')}</th>
|
|
<th className="text-left p-3 font-medium">{t('portsRoutes.colPort')}</th>
|
|
<th className="text-left p-3 font-medium">{t('portsRoutes.colCountry')}</th>
|
|
<th className="text-right p-3 font-medium">{t('portsRoutes.colTeu')}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{ports.map(port => (
|
|
<tr key={port.rank} className="border-t hover:bg-neutral-50">
|
|
<td className="p-3 font-bold text-neutral-400">#{port.rank}</td>
|
|
<td className="p-3 font-medium text-brand-navy">{port.port}</td>
|
|
<td className="p-3 text-neutral-600">{port.country}</td>
|
|
<td className="p-3 text-right font-mono text-brand-navy">{port.teu}</td>
|
|
</tr>
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mt-8">
|
|
<Card className="bg-brand-turquoise/5 border-brand-turquoise/30">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-brand-navy mb-2">{t('portsRoutes.hubTitle')}</h3>
|
|
<p className="text-sm text-brand-navy">{t('portsRoutes.hubDescription')}</p>
|
|
</CardContent>
|
|
</Card>
|
|
<Card className="bg-green-50 border-green-200">
|
|
<CardContent className="pt-6">
|
|
<h3 className="font-semibold text-green-900 mb-2">{t('portsRoutes.gatewayTitle')}</h3>
|
|
<p className="text-sm text-green-800">{t('portsRoutes.gatewayDescription')}</p>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|