Files
6b59c310-16aa-4e25-bbcd-a9d…/src/app/login/page.tsx
2026-03-05 16:07:05 +00:00

216 lines
8.4 KiB
TypeScript

"use client";
import { useState } from "react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from "@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen";
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
import { Mail, Lock, ArrowRight, Eye, EyeOff } from "lucide-react";
export default function LoginPage() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [showPassword, setShowPassword] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const [rememberMe, setRememberMe] = useState(false);
const handleLogin = async (e: React.FormEvent) => {
e.preventDefault();
setIsLoading(true);
// Simulate login
setTimeout(() => {
setIsLoading(false);
// Handle login logic here
}, 1000);
};
return (
<ThemeProvider
defaultButtonVariant="icon-arrow"
defaultTextAnimation="background-highlight"
borderRadius="rounded"
contentWidth="medium"
sizing="medium"
background="none"
cardStyle="gradient-bordered"
primaryButtonStyle="gradient"
secondaryButtonStyle="layered"
headingFontWeight="semibold"
>
<div id="nav" data-section="nav">
<NavbarStyleFullscreen
navItems={[
{ name: "Features", id: "features" },
{ name: "Pricing", id: "pricing" },
{ name: "FAQ", id: "faq" },
]}
brandName="Veltrix"
bottomLeftText="Professional Trading Platform"
bottomRightText="support@veltrix.com"
/>
</div>
<div className="min-h-screen flex items-center justify-center px-4 py-20">
<div className="w-full max-w-md">
<div className="bg-card rounded-2xl p-8 border border-accent/20">
<div className="mb-8">
<h1 className="text-4xl font-bold mb-2">Welcome Back</h1>
<p className="text-foreground/70">Sign in to access your portfolio and market data</p>
</div>
<form onSubmit={handleLogin} className="space-y-6">
{/* Email Input */}
<div>
<label htmlFor="email" className="block text-sm font-medium mb-2">
Email Address
</label>
<div className="relative">
<Mail className="absolute left-3 top-3 w-5 h-5 text-primary-cta/60" />
<input
id="email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="your@email.com"
className="w-full pl-10 pr-4 py-2 bg-background border border-accent/30 rounded-lg focus:outline-none focus:border-primary-cta transition-colors"
required
/>
</div>
</div>
{/* Password Input */}
<div>
<label htmlFor="password" className="block text-sm font-medium mb-2">
Password
</label>
<div className="relative">
<Lock className="absolute left-3 top-3 w-5 h-5 text-primary-cta/60" />
<input
id="password"
type={showPassword ? "text" : "password"}
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
className="w-full pl-10 pr-12 py-2 bg-background border border-accent/30 rounded-lg focus:outline-none focus:border-primary-cta transition-colors"
required
/>
<button
type="button"
onClick={() => setShowPassword(!showPassword)}
className="absolute right-3 top-3 text-primary-cta/60 hover:text-primary-cta transition-colors"
>
{showPassword ? (
<EyeOff className="w-5 h-5" />
) : (
<Eye className="w-5 h-5" />
)}
</button>
</div>
</div>
{/* Remember Me & Forgot Password */}
<div className="flex items-center justify-between text-sm">
<label className="flex items-center gap-2 cursor-pointer">
<input
type="checkbox"
checked={rememberMe}
onChange={(e) => setRememberMe(e.target.checked)}
className="rounded w-4 h-4 bg-background border border-accent/30 cursor-pointer"
/>
<span className="text-foreground/70">Remember me</span>
</label>
<a href="#" className="text-primary-cta hover:underline">
Forgot password?
</a>
</div>
{/* Login Button */}
<button
type="submit"
disabled={isLoading}
className="w-full py-3 px-4 bg-primary-cta text-primary-cta-text rounded-lg font-semibold hover:opacity-90 transition-opacity disabled:opacity-50 flex items-center justify-center gap-2"
>
{isLoading ? "Signing in..." : "Sign In"}
{!isLoading && <ArrowRight className="w-4 h-4" />}
</button>
</form>
{/* Divider */}
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-accent/30"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-card text-foreground/60">Or continue with</span>
</div>
</div>
{/* Social Login */}
<div className="grid grid-cols-2 gap-4 mb-6">
<button className="py-2 px-4 border border-accent/30 rounded-lg hover:border-primary-cta/60 transition-colors text-sm font-medium">
Google
</button>
<button className="py-2 px-4 border border-accent/30 rounded-lg hover:border-primary-cta/60 transition-colors text-sm font-medium">
Apple
</button>
</div>
{/* Sign Up Link */}
<p className="text-center text-foreground/70 text-sm">
Don't have an account?{" "}
<a href="#" className="text-primary-cta font-semibold hover:underline">
Start your free trial
</a>
</p>
</div>
{/* Trial Info */}
<div className="mt-6 p-4 bg-card/50 border border-accent/20 rounded-lg text-center text-sm text-foreground/70">
<p>New to Veltrix? Get 3 days free access to all features</p>
</div>
</div>
</div>
<div id="footer" data-section="footer">
<FooterBaseCard
logoText="Veltrix"
columns={[
{
title: "Product", items: [
{ label: "Features", href: "#" },
{ label: "Pricing", href: "#" },
{ label: "Mobile App", href: "#" },
{ label: "API", href: "#" },
],
},
{
title: "Company", items: [
{ label: "About Us", href: "#" },
{ label: "Blog", href: "#" },
{ label: "Careers", href: "#" },
{ label: "Press", href: "#" },
],
},
{
title: "Resources", items: [
{ label: "Documentation", href: "#" },
{ label: "Support", href: "#" },
{ label: "Community", href: "#" },
{ label: "Market Data", href: "#" },
],
},
{
title: "Legal", items: [
{ label: "Privacy Policy", href: "#" },
{ label: "Terms of Service", href: "#" },
{ label: "Disclaimer", href: "#" },
{ label: "Contact", href: "#" },
],
},
]}
copyrightText="© 2025 Veltrix. All rights reserved."
/>
</div>
</ThemeProvider>
);
}