128 lines
5.7 KiB
TypeScript
128 lines
5.7 KiB
TypeScript
import React from 'react';
|
|
import { Head, Link } from '@inertiajs/react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import MarketingLayout from '@/layouts/mainWebsite';
|
|
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
|
import { Button } from '@/components/ui/button';
|
|
import { Badge } from '@/components/ui/badge';
|
|
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
|
import { Sparkles, CheckCircle2 } from 'lucide-react';
|
|
|
|
type DemoFeature = { title: string; description: string };
|
|
|
|
const DEMO_TOKEN = 'mdhyA5XSVEVEabF8JhZ85B6fMocyyRMTfmThSeUKPzk7LLTu';
|
|
|
|
const DemoPage: React.FC = () => {
|
|
const { t } = useTranslation('marketing');
|
|
const { localizedPath } = useLocalizedRoutes();
|
|
|
|
const demo = t('demo_page', { returnObjects: true }) as {
|
|
title: string;
|
|
subtitle: string;
|
|
primaryCta: string;
|
|
secondaryCta: string;
|
|
iframeNote: string;
|
|
openFull: string;
|
|
features: DemoFeature[];
|
|
};
|
|
|
|
return (
|
|
<MarketingLayout title={demo.title}>
|
|
<Head title={demo.title} />
|
|
|
|
<section className="relative overflow-hidden bg-gradient-to-br from-pink-100 via-white to-white px-4 py-16 dark:from-pink-950/40 dark:via-gray-950 dark:to-gray-950">
|
|
<div className="absolute -top-32 right-20 hidden h-72 w-72 rounded-full bg-pink-200/50 blur-3xl dark:bg-pink-900/30 lg:block" />
|
|
<div className="container mx-auto relative z-10 flex max-w-5xl flex-col gap-10 lg:flex-row lg:items-center">
|
|
<div className="flex-1 space-y-6">
|
|
<Badge variant="outline" className="border-pink-400 text-pink-600 dark:border-pink-500 dark:text-pink-300">
|
|
Demo Live
|
|
</Badge>
|
|
<h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-50 md:text-5xl">
|
|
{demo.title}
|
|
</h1>
|
|
<p className="max-w-xl text-lg text-gray-600 dark:text-gray-300">
|
|
{demo.subtitle}
|
|
</p>
|
|
<div className="flex flex-wrap items-center gap-3">
|
|
<Button asChild size="lg" className="bg-pink-500 hover:bg-pink-600">
|
|
<Link href={localizedPath('/packages')}>
|
|
{demo.primaryCta}
|
|
</Link>
|
|
</Button>
|
|
<Button asChild size="lg" variant="ghost" className="text-pink-600 hover:text-pink-700 dark:text-pink-300">
|
|
<Link href={localizedPath('/so-funktionierts')}>
|
|
{demo.secondaryCta}
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
<div className="flex-1">
|
|
<div className="relative mx-auto w-full max-w-[320px] rounded-[2.5rem] border border-gray-200 bg-gray-900 p-4 shadow-2xl dark:border-gray-700 md:max-w-[360px]">
|
|
<div className="absolute left-1/2 top-2 h-1.5 w-16 -translate-x-1/2 rounded-full bg-gray-300 dark:bg-gray-600" aria-hidden />
|
|
<iframe
|
|
title="Fotospiel Demo"
|
|
src={`/e/${DEMO_TOKEN}`}
|
|
className="aspect-[9/16] w-full rounded-[1.75rem] border-0 bg-white shadow-inner dark:bg-gray-950"
|
|
loading="lazy"
|
|
sandbox="allow-scripts allow-same-origin allow-forms"
|
|
/>
|
|
</div>
|
|
<div className="mt-4 flex flex-col items-center gap-1 text-center">
|
|
<p className="text-sm text-gray-600 dark:text-gray-300">{demo.iframeNote}</p>
|
|
<Button asChild variant="link" className="text-pink-600 hover:text-pink-700 dark:text-pink-300">
|
|
<Link href={`/e/${DEMO_TOKEN}`} target="_blank" rel="noopener">
|
|
{demo.openFull}
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section className="container mx-auto px-4 pb-16">
|
|
<div className="mx-auto max-w-5xl">
|
|
<div className="grid gap-6 md:grid-cols-3">
|
|
{demo.features.map((feature) => (
|
|
<Card key={feature.title} className="border-gray-100 shadow-sm dark:border-gray-800">
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2 text-lg">
|
|
<Sparkles className="h-5 w-5 text-pink-500" aria-hidden />
|
|
{feature.title}
|
|
</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<CardDescription className="text-sm text-gray-600 dark:text-gray-300">
|
|
{feature.description}
|
|
</CardDescription>
|
|
</CardContent>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
|
|
<Alert className="mt-10 border-pink-200 bg-white shadow-lg dark:border-pink-900/50 dark:bg-gray-950">
|
|
<AlertTitle className="flex items-center gap-2 text-gray-900 dark:text-gray-100">
|
|
<CheckCircle2 className="h-5 w-5 text-pink-500" aria-hidden />
|
|
{t('marketing.labels.readyToLaunch', 'Bereit für dein Event?')}
|
|
</AlertTitle>
|
|
<AlertDescription className="mt-3 flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
|
<span className="text-sm text-gray-600 dark:text-gray-300">
|
|
{t('marketing.labels.readyToLaunchCopy', 'Registriere dich kostenlos und lege noch heute dein erstes Event an.')}
|
|
</span>
|
|
<Button asChild className="bg-pink-500 hover:bg-pink-600">
|
|
<Link href={localizedPath('/register')}>
|
|
{demo.primaryCta}
|
|
</Link>
|
|
</Button>
|
|
</AlertDescription>
|
|
</Alert>
|
|
</div>
|
|
</section>
|
|
</MarketingLayout>
|
|
);
|
|
};
|
|
|
|
DemoPage.layout = (page: React.ReactNode) => page;
|
|
|
|
export default DemoPage;
|