File size: 1,812 Bytes
d0a6b4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Verify OTP</title>
  <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="min-h-screen bg-gradient-to-br from-orange-500 to-red-500 flex items-center justify-center">

  <div class="bg-white w-full max-w-md rounded-2xl shadow-xl p-8 text-center">
    <h2 class="text-3xl font-bold text-gray-800">Verify Email</h2>
    {% if error %}
<script>

  showAlert("{{ error }}", "error");

</script>
{% endif %}

    <p class="text-gray-500 mt-2">Enter the 6-digit OTP sent to your email</p>

    <form method="POST" class="mt-6 space-y-4">
      <input type="text" name="otp" maxlength="6" placeholder="Enter OTP"

        required

        class="w-full text-center text-xl tracking-widest px-4 py-3 rounded-lg border focus:ring-2 focus:ring-orange-500 outline-none">

      <button

        class="w-full bg-orange-600 hover:bg-orange-700 text-white py-3 rounded-lg font-semibold transition">
        Verify OTP
      </button>
    </form>

    <a href="/auth/resend/{{ email }}"

       class="block mt-4 text-sm text-orange-600 hover:underline">
      Resend OTP
    </a>
  </div>
<div id="alertBox"

     class="hidden fixed top-5 right-5 max-w-sm px-5 py-4 rounded-lg shadow-lg text-white">
</div>
<script>

  function showAlert(message, type = "error") {

    const alertBox = document.getElementById("alertBox");



    alertBox.textContent = message;



    alertBox.className =

      "fixed top-5 right-5 max-w-sm px-5 py-4 rounded-lg shadow-lg text-white " +

      (type === "success" ? "bg-green-600" : "bg-red-600");



    alertBox.classList.remove("hidden");



    setTimeout(() => {

      alertBox.classList.add("hidden");

    }, 3000);

  }

</script>

</body>
</html>