LearnMood/resources/views/auth/verify-code.blade.php

104 lines
4.7 KiB
PHP

{{-- resources/views/auth/verify-code.blade.php --}}
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Verifikasi OTP - LearnMood</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="font-sans antialiased bg-gray-100">
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gradient-to-br from-blue-50 to-purple-50">
<div class="w-full sm:max-w-md mt-6 px-6 py-8 bg-white shadow-xl rounded-2xl">
<!-- Logo -->
<div class="text-center mb-6">
<a href="/" class="text-2xl font-bold text-blue-600">
Learn<span class="text-gray-800">Mood</span>
</a>
<p class="text-sm text-gray-500 mt-2">Verifikasi Kode OTP</p>
</div>
<!-- Alert untuk development -->
@if(session('dev_otp'))
<div class="bg-yellow-100 border border-yellow-400 text-yellow-800 px-4 py-4 rounded-lg mb-4">
<div class="flex items-start gap-3">
<div class="text-2xl">🔧</div>
<div>
<p class="font-medium text-sm">{{ session('success') }}</p>
<div class="mt-3 p-4 bg-white rounded-lg text-center">
<p class="text-xs text-gray-600 mb-2">Kode OTP 6 Digit:</p>
<p class="text-4xl font-bold text-purple-600 tracking-[8px] font-mono">
{{ session('dev_otp') }}
</p>
</div>
<p class="text-xs text-gray-600 mt-3">
Kode berlaku selama 5 menit
</p>
</div>
</div>
</div>
@elseif(session('success'))
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded-lg mb-4 text-sm">
{{ session('success') }}
</div>
@endif
@if(session('error'))
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded-lg mb-4 text-sm">
{{ session('error') }}
</div>
@endif
<!-- Email Info -->
<div class="bg-gray-50 p-3 rounded-lg text-center mb-4">
<p class="text-xs text-gray-500">Kode OTP dikirim ke:</p>
<p class="text-sm font-medium text-gray-700">{{ $email }}</p>
</div>
<!-- Form -->
<form method="POST" action="{{ route('password.verify') }}" class="space-y-5">
@csrf
<input type="hidden" name="email" value="{{ $email }}">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">
Masukkan Kode OTP 6 Digit
</label>
<input type="text"
name="otp"
maxlength="6"
placeholder="000000"
class="w-full px-4 py-3 text-center text-2xl tracking-widest font-mono border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition"
required autofocus>
</div>
<div>
<button type="submit"
class="w-full bg-gradient-to-r from-blue-600 to-purple-600 text-white px-4 py-3 rounded-lg hover:from-blue-700 hover:to-purple-700 transition font-medium">
Verifikasi OTP
</button>
</div>
</form>
<div class="text-center mt-6">
<p class="text-sm text-gray-500">
Tidak menerima kode?
<a href="{{ route('password.request') }}" class="text-blue-600 hover:text-blue-800 font-medium">
Kirim ulang
</a>
</p>
</div>
</div>
</div>
</body>
</html>