forked from dhairyagothi/100_days_100_web_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforgot-password.html
141 lines (122 loc) · 2.72 KB
/
forgot-password.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forgot Password</title>
<style type="text/css">
/* General Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
background: linear-gradient(135deg, #4a90e2, #1abc9c);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
/* Forgot Password Container */
.forgot-password-container {
background: rgba(255, 255, 255, 0.1);
padding: 30px;
border-radius: 10px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
width: 100%;
max-width: 400px;
text-align: center;
}
.form-wrapper h1 {
font-size: 2rem;
margin-bottom: 10px;
}
.form-wrapper p {
font-size: 1rem;
margin-bottom: 20px;
}
/* Form Inputs */
form {
display: flex;
flex-direction: column;
}
label {
text-align: left;
margin-bottom: 8px;
font-size: 0.9rem;
}
input[type="email"] {
padding: 12px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
outline: none;
font-size: 1rem;
background: rgba(255, 255, 255, 0.8);
color: #333;
}
input[type="email"]:focus {
background: #fff;
border: 2px solid #4a90e2;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
/* Submit Button */
.submit-button {
padding: 12px;
border: none;
border-radius: 5px;
background: #9013fe;
color: #fff;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease-in-out;
}
.submit-button:hover {
background: #4a90e2;
transform: scale(1.05);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}
/* Responsiveness */
@media (max-width: 480px) {
.forgot-password-container {
padding: 20px;
}
.form-wrapper h1 {
font-size: 1.5rem;
}
.form-wrapper p {
font-size: 0.9rem;
}
}
</style>
</head>
<body>
<div class="forgot-password-container">
<div class="form-wrapper">
<h1>Forgot Password</h1>
<p>Enter your registered email address to reset your password.</p>
<form id="forgot-password-form">
<label for="email">Email Address</label>
<input type="email" id="email" placeholder="Enter your email" required>
<button type="submit" class="submit-button">Send Reset Link</button>
</form>
</div>
</div>
<script>
document.getElementById('forgot-password-form').addEventListener('submit', function (e) {
e.preventDefault();
const email = document.getElementById('email').value;
if (email) {
alert(`Password reset link has been sent to ${email}`);
document.getElementById('email').value = ''; // Clear input field
} else {
alert('Please enter a valid email address!');
}
});
</script>
</body>
</html>