Files
dockerank2/resources/views/auth/login.blade.php
T
2026-09-01 07:49:48 -03:00

89 lines
5.5 KiB
PHP
Executable File

@extends("layouts.public")
@section("title", __("auth.Log in"))
@section("content")
<div class="w-full max-w-md">
<div class="bg-white rounded-2xl shadow-2xl p-8">
<div class="text-center mb-8">
<h2 class="text-3xl font-bold text-gray-900">{{ __("auth.Welcome Back") }}</h2>
<p class="mt-2 text-gray-600">{{ __("auth.Sign in to your account to continue") }}</p>
</div>
<form method="POST" action="{{ route("login") }}">
@csrf
<div class="mb-4">
<label for="email" class="block text-sm font-medium text-gray-700 mb-2">{{ __("auth.Email") }}</label>
<input type="email" name="email" id="email" value="{{ old("email") }}" required autofocus
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition"
placeholder="{{ __('auth.your@email.com') }}">
@error("email")
<p class="text-red-500 text-sm mt-1">{{ $message }}</p>
@enderror
</div>
<div class="mb-4">
<label for="password" class="block text-sm font-medium text-gray-700 mb-2">{{ __("auth.Password") }}</label>
<div class="relative">
<input type="password" name="password" id="password" required
class="w-full px-4 py-3 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition"
placeholder="••••••••">
<button type="button" onclick="togglePassword('password', this)" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<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.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
</svg>
</button>
</div>
@error("password")
<p class="text-red-500 text-sm mt-1">{{ $message }}</p>
@enderror
</div>
<div class="mb-4 flex items-center justify-between">
<label class="flex items-center">
<input type="checkbox" name="remember" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500">
<span class="ml-2 text-sm text-gray-600">{{ __("auth.Remember me") }}</span>
</label>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">{{ __("auth.Security check") }}</label>
<div class="bg-gray-50 rounded-lg p-3 mb-3">
<p class="text-sm text-gray-600 text-center font-medium">{{ session('math_captcha_question') }}</p>
</div>
<input type="text" name="math_captcha" id="math_captcha" required
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition"
placeholder="{{ __('auth.Enter the answer') }}">
@error('math_captcha')
<p class="text-red-500 text-sm mt-1">{{ $message }}</p>
@enderror
</div>
<button type="submit" class="w-full bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-3 px-4 rounded-lg hover:from-indigo-700 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition font-medium">
{{ __("auth.Log in") }}
</button>
<p class="mt-6 text-center text-sm text-gray-600">
{{ __("auth.Don't have an account?") }}
<a href="{{ route("register") }}" class="text-indigo-600 hover:text-indigo-800 font-medium">{{ __("auth.Register") }}</a>
</p>
</form>
<script>
function togglePassword(fieldId, btn) {
var input = document.getElementById(fieldId);
if (input.type === 'password') {
input.type = 'text';
btn.innerHTML = '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"/></svg>';
} else {
input.type = 'password';
btn.innerHTML = '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>';
}
}
</script>
</div>
</div>
@endsection