Agregar el login

This commit is contained in:
Your Name
2025-03-03 08:38:36 -06:00
parent 22161471f2
commit 15f6790d9b
5 changed files with 82 additions and 17 deletions

53
src/pages/App.tsx Normal file
View File

@@ -0,0 +1,53 @@
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../components/ui/card';
import { Button } from '../components/ui/button';
import { Label } from '../components/ui/label';
import { Input } from '../components/ui/input';
import { NavLink } from 'react-router';
function App() {
return (
<div className="w-full grow bg-gradient-to-br from-gray-100 to-gray-300/20 shadow-xl shadow-gray-400/10 flex flex-col items-center justify-center p-5 gap-20 rounded-lg backdrop-blur-lg">
<Card className="w-fit">
<CardHeader>
<CardTitle className='font-display'>Crear nuevo proyecto</CardTitle>
<CardDescription>Presenta tus proyectos 3D y compártelos con tu profesor</CardDescription>
</CardHeader>
<CardContent>
<form>
<div className="grid w-full items-center gap-4">
<div className="flex flex-col space-y-1.5">
<Label htmlFor="name" className="border-l-4 border-red-500 pl-2 font-semibold">
Nombre del proyecto
</Label>
<Input id="name" placeholder="Soporte de Motor" />
</div>
<div className="flex flex-col space-y-1.5">
<Label htmlFor="model" className="border-l-4 border-red-500 pl-2 font-semibold">
Modelo 3D
</Label>
<Input id="model" type="file" />
</div>
</div>
</form>
</CardContent>
<CardFooter className="flex justify-between">
<NavLink to="/login" end>
<Button
variant="outline"
className="px-6 py-3 text-gray-700 border border-gray-300 rounded-lg shadow-md shadow-gray-300/50 bg-white transition-all duration-300 hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm"
>
Cancelar
</Button>
</NavLink>
<Button className="font-display px-6 py-3 text-lg font-bold text-white bg-gradient-to-b from-blue-500 to-blue-700 rounded-lg shadow-lg shadow-blue-500/50 transform transition-all duration-300 hover:shadow-xl hover:scale-105 active:translate-y-1 active:shadow-md cursor-pointer">
Presentar
</Button>
</CardFooter>
</Card>
</div>
)
}
export default App

44
src/pages/Login.tsx Normal file
View File

@@ -0,0 +1,44 @@
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../components/ui/card';
import { Button } from '../components/ui/button';
import { Label } from '../components/ui/label';
import { Input } from '../components/ui/input';
import { useNavigate } from 'react-router';
function Login() {
let navigate = useNavigate();
return (
<div className="w-full grow bg-gradient-to-br from-gray-100 to-gray-300/20 shadow-xl shadow-gray-400/10 flex flex-col items-center justify-center p-5 gap-20 rounded-lg backdrop-blur-lg">
<Card className="w-full max-w-md p-6 bg-white rounded-xl shadow-lg">
<CardHeader className="text-center">
<CardTitle className="font-display text-2xl font-bold">Iniciar Sesión</CardTitle>
<CardDescription className="text-gray-500">Accede a tu cuenta para continuar</CardDescription>
</CardHeader>
<CardContent>
<form>
<div className="grid gap-4">
<div className="flex flex-col space-y-2">
<Label htmlFor="clave" className="font-semibold text-gray-700">Clave La Salle</Label>
<Input id="clave" type="clave" placeholder={`al${new Date().getFullYear().toString().slice(-2)}0000`} />
</div>
<div className="flex flex-col space-y-2">
<Label htmlFor="password" className="font-semibold text-gray-700">Contraseña</Label>
<Input id="password" type="password" placeholder="••••••••" />
</div>
</div>
</form>
</CardContent>
<CardFooter className="flex flex-col gap-4">
<Button
className="w-full font-bold text-lg py-2 bg-gradient-to-r from-blue-500 to-blue-700 text-white rounded-lg shadow-md transition-all duration-300 hover:scale-105 hover:shadow-lg active:shadow-sm" onClick={() => {
navigate("/");
}}
>
Iniciar sesión
</Button>
</CardFooter>
</Card>
</div>
);
}
export default Login;