Complete homepage overhaul with parallax and auth modal

This commit is contained in:
AI Bot
2026-07-30 13:41:21 +05:30
parent 1a19f582cb
commit dcc6362ec8
10 changed files with 325 additions and 165 deletions
+14 -39
View File
@@ -1,45 +1,20 @@
import { Link } from 'react-router-dom';
import { useAuthStore } from '../store/authStore';
import { Box } from 'lucide-react';
import { Canvas } from '@react-three/fiber';
import { ScrollControls } from '@react-three/drei';
import { Scene } from '../components/home/Scene';
import { Overlay } from '../components/home/Overlay';
import { Suspense } from 'react';
export default function Home() {
const { user } = useAuthStore();
return (
<div className="min-h-screen bg-zinc-950 text-white flex flex-col items-center justify-center p-4">
<div className="w-16 h-16 rounded-2xl bg-primary/20 flex items-center justify-center mb-8 shadow-[0_0_50px_rgba(var(--primary-rgb),0.3)]">
<Box size={32} className="text-primary" />
</div>
<h1 className="text-5xl font-bold tracking-tight mb-4 text-center">
Welcome to Titan<span className="text-primary">3d</span>
</h1>
<p className="text-zinc-400 text-lg mb-10 max-w-lg text-center">
The ultimate cloud-based 3D product configurator. Build, edit, and visualize 3D assets entirely in your browser with the power of AI.
</p>
{user ? (
<Link
to="/dashboard"
className="px-8 py-3 bg-primary hover:bg-primary/90 text-white font-semibold rounded-xl transition-all shadow-lg"
>
Go to Dashboard
</Link>
) : (
<div className="flex gap-4">
<Link
to="/auth"
className="px-8 py-3 bg-primary hover:bg-primary/90 text-white font-semibold rounded-xl transition-all shadow-lg"
>
Sign In
</Link>
<Link
to="/auth?mode=register"
className="px-8 py-3 bg-zinc-800 hover:bg-zinc-700 text-white font-semibold rounded-xl transition-all border border-zinc-700"
>
Create Account
</Link>
</div>
)}
<div className="w-screen h-screen bg-zinc-950 overflow-hidden">
<Canvas shadows camera={{ position: [0, 0, 10], fov: 45 }}>
<Suspense fallback={null}>
<ScrollControls pages={3} damping={0.2}>
<Scene />
<Overlay />
</ScrollControls>
</Suspense>
</Canvas>
</div>
);
}