-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
155 lines (136 loc) · 3.72 KB
/
index.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup, Signin & Forget Password</title>
<style>
/* Aesthetic theme with pastel colors */
body {
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
background: #F3E9E7;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 40px;
width: 350px;
max-width: 100%;
position: relative;
}
h2 {
text-align: center;
color: #555;
margin-bottom: 20px;
}
form {
display: none;
}
form.active {
display: block;
}
input[type="text"], input[type="password"], input[type="email"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
background: #F5F5F5;
}
.btn {
width: 100%;
background-color: #FFA69E;
border: none;
color: white;
padding: 10px;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
margin-top: 10px;
}
.btn:hover {
background-color: #FF847C;
}
.switch {
text-align: center;
margin-top: 10px;
color: #888;
font-size: 14px;
}
.switch a {
color: #FFA69E;
text-decoration: none;
font-weight: bold;
}
.switch a:hover {
color: #FF847C;
}
</style>
</head>
<body>
<div class="container">
<!-- Signup form -->
<form id="signup-form" class="active">
<h2>Signup</h2>
<input type="text" placeholder="Full Name" required>
<input type="email" placeholder="Email" required>
<input type="password" placeholder="Password" required>
<button type="submit" class="btn">Sign Up</button>
<div class="switch">
Already have an account? <a href="#" id="show-signin">Login</a>
</div>
</form>
<!-- Signin form -->
<form id="signin-form">
<h2>Login</h2>
<input type="email" placeholder="Email" required>
<input type="password" placeholder="Password" required>
<button type="submit" class="btn">Sign In</button>
<div class="switch">
<a href="#" id="show-signup">Don't have an account? Signup</a><br>
<a href="#" id="show-forget-password">Forgot Password?</a>
</div>
</form>
<!-- Forget Password form -->
<form id="forget-password-form">
<h2>Forget Password</h2>
<input type="email" placeholder="Enter your email" required>
<button type="submit" class="btn">Reset Password</button>
<div class="switch">
<a href="#" id="back-to-signin">Back to Login</a>
</div>
</form>
</div>
<script>
// Function to switch between forms
document.getElementById('show-signin').addEventListener('click', function() {
showForm('signin-form');
});
document.getElementById('show-signup').addEventListener('click', function() {
showForm('signup-form');
});
document.getElementById('show-forget-password').addEventListener('click', function() {
showForm('forget-password-form');
});
document.getElementById('back-to-signin').addEventListener('click', function() {
showForm('signin-form');
});
function showForm(formId) {
// Hide all forms
document.querySelectorAll('form').forEach(function(form) {
form.classList.remove('active');
});
// Show the selected form
document.getElementById(formId).classList.add('active');
}
</script>
</body>
</html>