2026-04-23 15:33:11 +03:30
|
|
|
'use client';
|
|
|
|
|
|
2026-06-20 12:37:38 +03:30
|
|
|
import { useTranslations } from 'next-intl';
|
|
|
|
|
import { Link } from '@/i18n/navigation';
|
2026-04-23 15:33:11 +03:30
|
|
|
import { useAuth } from '@/lib/hooks/useAuth';
|
2026-05-18 12:31:21 +03:30
|
|
|
import { Button } from '@/components/ui/shared/Button';
|
2026-06-20 12:37:38 +03:30
|
|
|
import { TopBarControls } from '@/components/ui/shared/TopBarControls';
|
2026-08-19 02:41:05 +03:30
|
|
|
import { BrandWordmark } from '@/components/ui/shared/BrandWordmark';
|
2026-04-23 15:33:11 +03:30
|
|
|
import { Building2, Beaker, Calendar, Shield, Clock, Users } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
export default function HomePage() {
|
2026-06-20 12:37:38 +03:30
|
|
|
const t = useTranslations('landing');
|
|
|
|
|
const tAuth = useTranslations('auth');
|
2026-07-18 00:02:40 +03:30
|
|
|
const { user, isAuthReady } = useAuth();
|
2026-04-23 15:33:11 +03:30
|
|
|
|
|
|
|
|
return (
|
2026-07-18 00:02:40 +03:30
|
|
|
<div className="min-h-[100dvh] flex flex-col app-web-bg text-text-primary">
|
2026-04-29 01:22:53 +03:30
|
|
|
<header className="border-b border-border/70 bg-background-secondary/65 backdrop-blur-sm fixed top-0 w-full z-10">
|
2026-07-11 17:10:02 +03:30
|
|
|
<div className="container mx-auto px-4 py-3 sm:py-4 flex flex-wrap items-center justify-between gap-x-4 gap-y-3">
|
2026-08-19 02:41:05 +03:30
|
|
|
<Link href="/" className="shrink-0">
|
|
|
|
|
<BrandWordmark className="text-xl sm:text-2xl font-semibold text-text-primary" />
|
2026-07-11 17:10:02 +03:30
|
|
|
</Link>
|
2026-04-23 15:33:11 +03:30
|
|
|
|
2026-07-11 17:10:02 +03:30
|
|
|
<div className="flex items-center gap-1.5 sm:gap-3 ml-auto shrink-0">
|
2026-06-20 12:37:38 +03:30
|
|
|
<TopBarControls />
|
2026-07-18 00:02:40 +03:30
|
|
|
{!isAuthReady ? (
|
|
|
|
|
<span className="inline-block h-9 w-24 sm:w-28 rounded-[var(--radius-md)] bg-background-card/60 animate-pulse" aria-hidden />
|
|
|
|
|
) : user ? (
|
2026-04-23 15:33:11 +03:30
|
|
|
<Link href="/today">
|
2026-07-11 17:10:02 +03:30
|
|
|
<Button variant="primary" size="sm" className="sm:px-4 sm:py-2 sm:text-sm">
|
|
|
|
|
{tAuth('dashboard')}
|
|
|
|
|
</Button>
|
2026-04-23 15:33:11 +03:30
|
|
|
</Link>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
2026-07-11 17:10:02 +03:30
|
|
|
<Link href="/login" className="hidden sm:block">
|
|
|
|
|
<Button variant="outline" size="sm" className="whitespace-nowrap">
|
|
|
|
|
{tAuth('login')}
|
|
|
|
|
</Button>
|
2026-04-23 15:33:11 +03:30
|
|
|
</Link>
|
|
|
|
|
<Link href="/register">
|
2026-07-11 17:10:02 +03:30
|
|
|
<Button variant="primary" size="sm" className="whitespace-nowrap">
|
|
|
|
|
<span className="sm:hidden">{tAuth('startTrialShort')}</span>
|
|
|
|
|
<span className="hidden sm:inline">{tAuth('startTrial')}</span>
|
|
|
|
|
</Button>
|
2026-04-23 15:33:11 +03:30
|
|
|
</Link>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
2026-07-18 00:02:40 +03:30
|
|
|
<main className="flex-1 container mx-auto px-4 pt-28 sm:pt-32 pb-16 sm:pb-20">
|
2026-04-23 15:33:11 +03:30
|
|
|
<div className="max-w-4xl mx-auto text-center">
|
2026-07-11 17:10:02 +03:30
|
|
|
<h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-semibold mb-4 sm:mb-6 leading-tight">
|
2026-06-20 12:37:38 +03:30
|
|
|
{t('heroTitle')}
|
|
|
|
|
<span className="text-primary"> {t('heroHighlight')}</span>
|
2026-04-23 15:33:11 +03:30
|
|
|
</h1>
|
|
|
|
|
|
2026-07-11 17:10:02 +03:30
|
|
|
<p className="text-base sm:text-lg text-text-secondary mb-6 sm:mb-8 max-w-2xl mx-auto">
|
2026-06-20 12:37:38 +03:30
|
|
|
{t('heroSubtitle')}
|
2026-04-23 15:33:11 +03:30
|
|
|
</p>
|
|
|
|
|
|
2026-07-18 00:02:40 +03:30
|
|
|
{isAuthReady && !user && (
|
2026-07-11 17:10:02 +03:30
|
|
|
<div className="flex flex-col sm:flex-row items-stretch sm:items-center justify-center gap-3">
|
|
|
|
|
<Link href="/register" className="w-full sm:w-auto">
|
|
|
|
|
<Button size="lg" variant="primary" fullWidth className="sm:w-auto sm:px-8">
|
|
|
|
|
{tAuth('startFreeTrial')}
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
<Link href="/login" className="w-full sm:hidden">
|
|
|
|
|
<Button variant="outline" size="lg" fullWidth>
|
|
|
|
|
{tAuth('login')}
|
|
|
|
|
</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
2026-04-23 15:33:11 +03:30
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-07-11 17:10:02 +03:30
|
|
|
<div className="mt-12 sm:mt-20 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 sm:gap-6">
|
2026-04-23 15:33:11 +03:30
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Building2 className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureClinicsTitle')}
|
|
|
|
|
description={t('featureClinicsDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Beaker className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureLabsTitle')}
|
|
|
|
|
description={t('featureLabsDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Users className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureTeamTitle')}
|
|
|
|
|
description={t('featureTeamDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Calendar className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureTrialTitle')}
|
|
|
|
|
description={t('featureTrialDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Clock className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureRealtimeTitle')}
|
|
|
|
|
description={t('featureRealtimeDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
<FeatureCard
|
2026-04-29 01:22:53 +03:30
|
|
|
icon={<Shield className="h-6 w-6 icon-flat" />}
|
2026-06-20 12:37:38 +03:30
|
|
|
title={t('featureSecurityTitle')}
|
|
|
|
|
description={t('featureSecurityDescription')}
|
2026-04-23 15:33:11 +03:30
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
|
2026-07-18 00:02:40 +03:30
|
|
|
<footer className="mt-auto border-t border-border/70 bg-background-secondary/80">
|
2026-04-23 15:33:11 +03:30
|
|
|
<div className="container mx-auto px-4 py-8 flex flex-col md:flex-row justify-between items-center text-sm text-text-secondary">
|
2026-06-20 12:37:38 +03:30
|
|
|
<div>{t('footerCopyright')}</div>
|
2026-04-23 15:33:11 +03:30
|
|
|
|
|
|
|
|
<div className="flex gap-6 mt-4 md:mt-0">
|
|
|
|
|
<Link href="/terms" className="hover:text-primary transition-colors">
|
2026-06-20 12:37:38 +03:30
|
|
|
{t('termsAndConditions')}
|
2026-04-23 15:33:11 +03:30
|
|
|
</Link>
|
|
|
|
|
<Link href="/privacy" className="hover:text-primary transition-colors">
|
2026-06-20 12:37:38 +03:30
|
|
|
{tAuth('privacyPolicy')}
|
2026-04-23 15:33:11 +03:30
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function FeatureCard({
|
|
|
|
|
icon,
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
}: {
|
|
|
|
|
icon: React.ReactNode;
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
}) {
|
|
|
|
|
return (
|
2026-04-29 01:22:53 +03:30
|
|
|
<div className="surface-card p-5 transition-all hover:border-primary/70 hover:shadow-[0_0_20px_rgba(0,194,255,0.12)]">
|
2026-06-20 12:37:38 +03:30
|
|
|
<div className="text-primary mb-4">{icon}</div>
|
|
|
|
|
<h3 className="text-base font-medium text-text-primary mb-2">{title}</h3>
|
|
|
|
|
<p className="text-sm text-text-secondary">{description}</p>
|
2026-04-23 15:33:11 +03:30
|
|
|
</div>
|
|
|
|
|
);
|
2026-06-20 12:37:38 +03:30
|
|
|
}
|