Files
LauckCycles/resources/views/login.blade.php
T
2026-05-27 15:59:44 -03:00

84 lines
5.2 KiB
PHP

<x-layout title="Login - Lauck">
<div class="w-full flex flex-col items-center justify-center pt-8">
<x-section-header
subtitle="Inicio de sesión"
title="Bicicletería "
highlight="Lauck"
/>
<div class="bg-gray-100 dark:bg-panel-bg p-8 rounded-xl shadow-lg w-full max-w-md border border-gray-300 dark:border-neutral-700">
<form action="{{ route('login.attempt') }}" method="POST" class="space-y-6">
@csrf
{{-- Bloque de errores --}}
@if ($errors->any())
<div class="bg-red-100 dark:bg-red-900/50 border border-red-500 text-red-600 dark:text-red-300 p-3 rounded-lg shadow-sm">
<p class="text-sm font-medium">
{{ $errors->first() }}
</p>
</div>
@endif
@if (session('status'))
<div class="bg-green-100 dark:bg-green-900/50 border border-green-500 text-green-700 dark:text-green-300 p-3 rounded-lg shadow-sm">
<p class="text-sm font-medium">
{{ session('status') }}
</p>
</div>
@endif
<div>
<label class="block text-sm font-bold text-gray-700 dark:text-gray-300 mb-2">Correo electrónico</label>
<input type="email" name="email" required autofocus
class="w-full px-4 py-2 bg-white dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-neon-lime focus:border-neon-lime transition-colors"/>
</div>
<div>
<label class="block text-sm font-bold text-gray-700 dark:text-gray-300 mb-2">Contraseña</label>
<div class="relative">
<input id="passwordInput" type="password" name="password" required
class="w-full px-4 py-2 bg-white dark:bg-neutral-900 border border-gray-300 dark:border-neutral-700 text-gray-900 dark:text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-neon-lime focus:border-neon-lime transition-colors pr-10"/>
<button type="button" id="togglePassword"
class="absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-700 dark:hover:text-white transition-colors">
{{-- Ojo abierto --}}
<svg id="iconShow" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.477 0 8.268 2.943 9.542 7-1.274 4.057-5.065 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
</svg>
{{-- Ojo cerrado --}}
<svg id="iconHide" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 hidden" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13.875 18.825A10.05 10.05 0 0112 19c-4.477 0-8.268-2.943-9.542-7a9.956 9.956 0 012.293-3.95M6.938 6.938A9.956 9.956 0 0112 5c4.477 0 8.268 2.943 9.542 7a9.97 9.97 0 01-1.88 3.118M3 3l18 18" />
</svg>
</button>
</div>
<div class="flex justify-end mt-2">
<a href="{{ route('password.request') }}" class="text-xs font-medium text-green-600 dark:text-neon-lime hover:underline transition-colors">
¿Olvidaste tu contraseña?
</a>
</div>
</div>
<div>
<button type="submit"
class="w-full bg-neutral-900 dark:bg-neon-lime text-neon-lime dark:text-neutral-900 font-bold py-2.5 rounded-lg hover:bg-neutral-800 hover:dark:bg-[#b3e600] transition-colors shadow-lg dark:shadow-neon-lime/20 uppercase tracking-wide">
Iniciar sesión
</button>
</div>
<div class="text-center mt-6 pt-4 border-t border-gray-300 dark:border-neutral-700">
<p class="text-sm text-gray-600 dark:text-gray-400">
¿No tienes una cuenta? <a href="{{ route('register') }}" class="font-bold text-gray-900 dark:text-white hover:text-green-600 dark:hover:text-neon-lime transition-colors">Regístrate acá</a>.
</p>
</div>
</form>
</div>
</div>
</x-layout>