-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.html
302 lines (266 loc) · 8.35 KB
/
signup.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style type="text/css">
body{
margin: 0;
padding: 0;
font-family: 'Noto Sans', sans-serif;
overflow: hidden; /* Prevent horizontal scrollbar due to animation */
position: relative;
background: url('res/depth_1.png') no-repeat center center fixed;
background-size: cover;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #3458a300, #00bcd482, #8bc34a94, #ffcc2959);
}
#parallax {
position: relative;
width: 100%;
height: 100vh;
background-image: url(res/depth_3.png), url(res/depth_2.png), url(res/depth_1.png);
background-repeat: no-repeat;
background-position: center;
background-position: 50% 50%;
}
.animation-container {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
z-index: -1;
}
.animate-gradient {
position: absolute;
width: 100px;
height: 100px;
border-radius: 50%;
background: linear-gradient(45deg, #F8BD00, #1877F2);
opacity: 0.2;
animation: floatAnimation 10s infinite linear;
}
@keyframes floatAnimation {
0%, 100% {
transform: translate(0, 0);
}
50% {
transform: translate(50px, 50px);
}
}
.signup-box {
background: linear-gradient(116deg, #f8bd00ab, #00bcd494);
backdrop-filter: blur(10px);
padding: 46px;
border-radius: 8px;
border: 2px solid rgba(255, 255, 255, 0.1);
text-align: center;
max-width: 425px;
width: 100%;
box-shadow: inset 1px 1px 18px 7px #0000006e;
padding-left: 45px;
padding-right: 73px;
}
h1 {
color: #fff;
}
form input {
backdrop-filter: opacity(17.5);
border-color: #faebd78c;
border-width: 1px;
width: 100%;
margin-bottom: 10px;
padding: 10px;
border-radius: 10px;
background: rgb(255 255 255 / 23%);
color: #fff;
}
form button {
border-radius: 10px;
width: 105%;
padding: 12px;
background-color: #ffcc29;
border: none;
border-radius: 11px;
color: #fff;
cursor: pointer;
font-weight: bold;
transition: background-color 0.3s ease;
}
form button:hover {
background-color: #f2b700;
}
p {
margin-top: 20px;
color: #fff;
}
a {
color: #fff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.password-input-container {
position: relative;
display: flex;
align-items: center;
}
.password-toggle {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #888;
font-size: 18px;
transition: color 0.3s;
}
.password-toggle:hover {
color: #333;
}
.error {
color: red;
margin-top: 5px;
font-size: 12px;
}
.password-indicators {
display: none;
flex-direction: column;
margin-top: 15px;
box-shadow: 0px 2px 11px 1px rgba(0, 0, 0, 0.1);
background-color: #ffffff1f;
padding: 10px;
border-radius: 8px;
margin-bottom: 15px;
}
.indicator {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.indicator::before {
content: '';
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
margin-right: 10px;
background-color: transparent;
font-size: 16px; /* Adjust the font size as needed */
text-align: center;
line-height: 20px;
box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.2);
transition: box-shadow 0.3s, transform 0.3s;
}
.indicator.passed::before {
background-color: green;
box-shadow: inset 0px 0px 5px rgba(0, 255, 0, 0.4);
content: '\f00c'; /* Font Awesome check icon */
font-family: “Font Awesome 5 Free“;
font-weight: 900;
color: white;
}
.indicator.failed::before {
background-color: red;
content: '\f00d'; /* Font Awesome times icon */
font-family: “Font Awesome 5 Free“;
font-weight: 900;
color: white;
}
/* Add a smooth transition for the glowing effect */
.indicator:hover::before {
transform: scale(1.2);
box-shadow: inset 0px 0px 10px rgba(255, 0, 0, 0.7);
}
</style>
</head>
<body>
<div class="animation-container">
<div class="animate-gradient"></div>
</div>
<div id="parallax">
<div class="container">
<div class="signup-box">
<h1>Signup</h1>
<form action="signup.php" method="POST">
<input type="text" name="fname" placeholder="First Name" required>
<p class="error" id="error-fname"></p>
<input type="text" name="lname" placeholder="Last Name" required>
<p class="error" id="error-lname"></p>
<input type="email" name="email" placeholder="Email" required>
<p class="error" id="error-email"></p>
<div class="password-input-container">
<input type="password" name="password" id="password" placeholder="Password" autocomplete="new-password" required data-visible="false">
<div class="password-toggle" id="password-toggle" onclick="togglePasswordVisibility('password')"><i class="fas fa-eye"></i></div>
</div>
<p class="error" id="error-password"></p>
<div class="password-indicators" id="password-indicators">
<div class="indicator" id="indicator-lowercase">Atleast One Lower Case Character</div>
<div class="indicator" id="indicator-uppercase">Atleast One Upper Case Character</div>
<div class="indicator" id="indicator-number">At least one Number
</div>
<div class="indicator" id="indicator-special">At least one special character
</div>
<div class="indicator" id="indicator-length">*At least 8 character
</div>
</div>
<div class="password-input-container">
<input type="password" name="confirmPassword" id="confirmPassword" placeholder="Confirm Password" autocomplete="new-password" required>
<div class="password-toggle" id="confirmPassword-toggle" onclick="toggleConfirmPasswordVisibility('confirmPassword')"><i class="fas fa-eye"></i></div>
</div>
<p class="error" id="error-confirmPassword"></p>
<button id='signupButton' type="submit">Signup</button>
</form>
<p>Already have an account? <a href="login.html">Login</a></p>
</div>
</div>
</div>
<script>
function togglePasswordVisibility(inputId) {
const passwordInput = document.getElementById(inputId);
const passwordToggle = document.getElementById(inputId + '-toggle');
console.log(`Before toggling: ${inputId} visibility is ${passwordInput.type}`);
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
passwordInput.dataset.visible = 'true';
passwordToggle.classList.add('active');
console.log(`Toggled ${inputId} to visible`);
} else {
passwordInput.type = 'password';
passwordInput.dataset.visible = 'false';
passwordToggle.classList.remove('active');
console.log(`Toggled ${inputId} to hidden`);
}
console.log(`After toggling: ${inputId} visibility is ${passwordInput.type}`);
}
function toggleConfirmPasswordVisibility(inputId) {
const passwordInput = document.getElementById(inputId);
const passwordToggle = document.getElementById(inputId + '-toggle');
console.log(`Before toggling: ${inputId} visibility is ${passwordInput.type}`);
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
passwordInput.dataset.visible = 'true';
passwordToggle.classList.add('active');
console.log(`Toggled ${inputId} to visible`);
} else {
passwordInput.type = 'password';
passwordInput.dataset.visible = 'false';
passwordToggle.classList.remove('active');
console.log(`Toggled ${inputId} to hidden`);
}
console.log(`After toggling: ${inputId} visibility is ${passwordInput.type}`);
}
</script>
<script src="res/js/validation.js"></script>
</body>
</html>