forked from ayush-that/FinVeda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loginPage.html
698 lines (615 loc) · 21.1 KB
/
loginPage.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Register & Login</title>
<link rel="stylesheet" href="./loginPage.css" />
<link rel="shortcut icon" href="./assets/images/favicon2.webp" type="image/png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
/>
<style>
.loader {
position: fixed;
top: 0;
left: 0;
display: table;
height: 100%;
width: 100%;
background: #fff;
z-index: 99999;
}
.loader {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.loader .ytp-spinner {
position: absolute;
left: 50%;
top: 50%;
width: 64px;
margin-left: -32px;
z-index: 18;
pointer-events: none;
}
.loader .ytp-spinner .ytp-spinner-container {
pointer-events: none;
position: absolute;
width: 100%;
padding-bottom: 100%;
top: 50%;
left: 50%;
margin-top: -50%;
margin-left: -50%;
-webkit-animation: ytp-spinner-linspin 1568.23529647ms linear infinite;
-moz-animation: ytp-spinner-linspin 1568.23529647ms linear infinite;
-o-animation: ytp-spinner-linspin 1568.23529647ms linear infinite;
animation: ytp-spinner-linspin 1568.23529647ms linear infinite;
}
.loader .ytp-spinner .ytp-spinner-container .ytp-spinner-rotator {
position: absolute;
width: 100%;
height: 100%;
-webkit-animation: ytp-spinner-easespin 5332ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
-moz-animation: ytp-spinner-easespin 5332ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
-o-animation: ytp-spinner-easespin 5332ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
animation: ytp-spinner-easespin 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite
both;
}
.loader
.ytp-spinner
.ytp-spinner-container
.ytp-spinner-rotator
.ytp-spinner-left {
position: absolute;
top: 0;
left: 0;
bottom: 0;
overflow: hidden;
right: 50%;
}
.loader
.ytp-spinner
.ytp-spinner-container
.ytp-spinner-rotator
.ytp-spinner-right {
position: absolute;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
left: 50%;
}
.loader .ytp-spinner-circle {
box-sizing: border-box;
position: absolute;
width: 200%;
height: 100%;
border-style: solid;
border-color: #361cc1 #361cc1 #e1e1e1;
border-radius: 50%;
border-width: 6px;
}
.loader .ytp-spinner-left .ytp-spinner-circle {
left: 0;
right: -100%;
border-right-color: #e1e1e1;
-webkit-animation: ytp-spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
-moz-animation: ytp-spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
-o-animation: ytp-spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1)
infinite both;
animation: ytp-spinner-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite
both;
}
.loader .ytp-spinner-right .ytp-spinner-circle {
left: -100%;
right: 0;
border-left-color: #e1e1e1;
-webkit-animation: ytp-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite
both;
-moz-animation: ytp-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite
both;
-o-animation: ytp-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
animation: ytp-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
}
@-webkit-keyframes ytp-spinner-linspin {
to {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes ytp-spinner-linspin {
to {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes ytp-spinner-easespin {
12.5% {
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
transform: rotate(135deg);
}
25% {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
}
37.5% {
-webkit-transform: rotate(405deg);
-moz-transform: rotate(405deg);
-ms-transform: rotate(405deg);
-o-transform: rotate(405deg);
transform: rotate(405deg);
}
50% {
-webkit-transform: rotate(540deg);
-moz-transform: rotate(540deg);
-ms-transform: rotate(540deg);
-o-transform: rotate(540deg);
transform: rotate(540deg);
}
62.5% {
-webkit-transform: rotate(675deg);
-moz-transform: rotate(675deg);
-ms-transform: rotate(675deg);
-o-transform: rotate(675deg);
transform: rotate(675deg);
}
75% {
-webkit-transform: rotate(810deg);
-moz-transform: rotate(810deg);
-ms-transform: rotate(810deg);
-o-transform: rotate(810deg);
transform: rotate(810deg);
}
87.5% {
-webkit-transform: rotate(945deg);
-moz-transform: rotate(945deg);
-ms-transform: rotate(945deg);
-o-transform: rotate(945deg);
transform: rotate(945deg);
}
to {
-webkit-transform: rotate(1080deg);
-moz-transform: rotate(1080deg);
-ms-transform: rotate(1080deg);
-o-transform: rotate(1080deg);
transform: rotate(1080deg);
}
}
@keyframes ytp-spinner-easespin {
12.5% {
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
transform: rotate(135deg);
}
25% {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
}
37.5% {
-webkit-transform: rotate(405deg);
-moz-transform: rotate(405deg);
-ms-transform: rotate(405deg);
-o-transform: rotate(405deg);
transform: rotate(405deg);
}
50% {
-webkit-transform: rotate(540deg);
-moz-transform: rotate(540deg);
-ms-transform: rotate(540deg);
-o-transform: rotate(540deg);
transform: rotate(540deg);
}
62.5% {
-webkit-transform: rotate(675deg);
-moz-transform: rotate(675deg);
-ms-transform: rotate(675deg);
-o-transform: rotate(675deg);
transform: rotate(675deg);
}
75% {
-webkit-transform: rotate(810deg);
-moz-transform: rotate(810deg);
-ms-transform: rotate(810deg);
-o-transform: rotate(810deg);
transform: rotate(810deg);
}
87.5% {
-webkit-transform: rotate(945deg);
-moz-transform: rotate(945deg);
-ms-transform: rotate(945deg);
-o-transform: rotate(945deg);
transform: rotate(945deg);
}
to {
-webkit-transform: rotate(1080deg);
-moz-transform: rotate(1080deg);
-ms-transform: rotate(1080deg);
-o-transform: rotate(1080deg);
transform: rotate(1080deg);
}
}
@-webkit-keyframes ytp-spinner-left-spin {
0% {
-webkit-transform: rotate(130deg);
-moz-transform: rotate(130deg);
-ms-transform: rotate(130deg);
-o-transform: rotate(130deg);
transform: rotate(130deg);
}
50% {
-webkit-transform: rotate(-5deg);
-moz-transform: rotate(-5deg);
-ms-transform: rotate(-5deg);
-o-transform: rotate(-5deg);
transform: rotate(-5deg);
}
to {
-webkit-transform: rotate(130deg);
-moz-transform: rotate(130deg);
-ms-transform: rotate(130deg);
-o-transform: rotate(130deg);
transform: rotate(130deg);
}
}
@keyframes ytp-spinner-left-spin {
0% {
-webkit-transform: rotate(130deg);
-moz-transform: rotate(130deg);
-ms-transform: rotate(130deg);
-o-transform: rotate(130deg);
transform: rotate(130deg);
}
50% {
-webkit-transform: rotate(-5deg);
-moz-transform: rotate(-5deg);
-ms-transform: rotate(-5deg);
-o-transform: rotate(-5deg);
transform: rotate(-5deg);
}
to {
-webkit-transform: rotate(130deg);
-moz-transform: rotate(130deg);
-ms-transform: rotate(130deg);
-o-transform: rotate(130deg);
transform: rotate(130deg);
}
}
@-webkit-keyframes ytp-right-spin {
0% {
-webkit-transform: rotate(-130deg);
-moz-transform: rotate(-130deg);
-ms-transform: rotate(-130deg);
-o-transform: rotate(-130deg);
transform: rotate(-130deg);
}
50% {
-webkit-transform: rotate(5deg);
-moz-transform: rotate(5deg);
-ms-transform: rotate(5deg);
-o-transform: rotate(5deg);
transform: rotate(5deg);
}
to {
-webkit-transform: rotate(-130deg);
-moz-transform: rotate(-130deg);
-ms-transform: rotate(-130deg);
-o-transform: rotate(-130deg);
transform: rotate(-130deg);
}
}
@keyframes ytp-right-spin {
0% {
-webkit-transform: rotate(-130deg);
-moz-transform: rotate(-130deg);
-ms-transform: rotate(-130deg);
-o-transform: rotate(-130deg);
transform: rotate(-130deg);
}
50% {
-webkit-transform: rotate(5deg);
-moz-transform: rotate(5deg);
-ms-transform: rotate(5deg);
-o-transform: rotate(5deg);
transform: rotate(5deg);
}
to {
-webkit-transform: rotate(-130deg);
-moz-transform: rotate(-130deg);
-ms-transform: rotate(-130deg);
-o-transform: rotate(-130deg);
transform: rotate(-130deg);
}
}
/* Tooltip styling for the input field */
.input-field {
position: relative; /* Positioning for the tooltip */
display: flex; /* Flexbox for alignment */
align-items: center;
}
/* Tooltip text styling */
.tooltip-text {
position: absolute; /* Absolute positioning relative to .input-field */
left: 50%; /* Center tooltip horizontally */
bottom: 100%; /* Position above the toggle icon */
transform: translateX(-50%); /* Adjust to center */
margin-bottom: 5px; /* Space between the tooltip and the icon */
background-color: #333; /* Tooltip background */
color: #fff; /* Tooltip text color */
padding: 5px; /* Inner spacing */
border-radius: 4px; /* Rounded corners */
font-size: 12px; /* Font size */
white-space: nowrap; /* Prevent text wrapping */
opacity: 0; /* Initial hidden state */
visibility: hidden; /* Initial hidden state */
transition: opacity 0.2s; /* Fade-in transition */
}
/* Show tooltip on hover over the password toggle icon */
#toggle-password:hover + .tooltip-text,
#toggle-password-signup:hover + .tooltip-text {
opacity: 1; /* Fade in */
visibility: visible; /* Make visible */
}
</style>
</head>
<body>
<div class="preloader">
<div class="loader">
<div class="ytp-spinner">
<div class="ytp-spinner-container">
<div class="ytp-spinner-rotator">
<div class="ytp-spinner-left">
<div class="ytp-spinner-circle"></div>
</div>
<div class="ytp-spinner-right">
<div class="ytp-spinner-circle"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="forms-container">
<div class="signin-signup">
<form action="#" class="sign-in-form">
<h2 class="title">Sign in</h2>
<div class="input-field">
<i class="fas fa-user"></i>
<input type="text" placeholder="Username" />
</div>
<div class="input-field">
<i class="fas fa-lock" id="toggle-password" style="cursor: pointer;"></i>
<span class="tooltip-text">Click to view password</span>
<input
type="password"
placeholder="Password"
id="password-input" />
</div>
<div class="forgot-password">
<a href="#" onclick="forgotPassword()">Forgot Password?</a>
</div>
<input type="submit" value="Login" class="btn solid" />
<p class="social-text">Or Sign in with social platforms</p>
<div class="social-icons">
<div class="social-icon-frame">
<a href="https://www.google.com" target="_blank" class="social-icon">
<i class="fab fa-google"></i>
</a>
</div>
<div class="social-icon-frame">
<a href="https://facebook.com/YourPage" target="_blank" class="social-icon">
<i class="fab fa-facebook-f"></i>
</a>
</div>
<div class="social-icon-frame">
<a href="https://github.com/YourGitHubProfile" target="_blank" class="social-icon">
<i class="fab fa-github"></i>
</a>
</div>
</div>
</form>
<form action="#" class="sign-up-form">
<h2 class="title">Sign up</h2>
<div class="input-field">
<i class="fas fa-user"></i>
<input type="text" placeholder="Username" />
</div>
<div class="input-field">
<i class="fas fa-envelope"></i>
<input type="email" placeholder="Email" />
</div>
<div class="input-field">
<i class="fas fa-lock" id="toggle-password-signup" style="cursor: pointer;"></i>
<span class="tooltip-text">Click to view password</span>
<input type="password" placeholder="Password" id="password-input-signup" />
</div>
<!-- Password strength meter starts here (initially hidden) -->
<div id="password-strength-section" style="display: none;">
<label for="password-input-signup">Password Strength:</label>
<div class="strength-meter" style="width: 100%; max-width: 300px; height: 10px; background-color: #e0e0e0; border-radius: 5px; margin: 10px auto;">
<div id="strength-bar-signup" style="height: 100%; width: 1%; background-color: #d73f40; border-radius: 5px; transition: width 0.5s, background-color 0.5s;"></div>
</div>
<div class="strength-label" id="strength-label-signup" style="font-size: 14px; margin-top: 10px;">Weak</div>
</div>
<!-- Password strength meter ends here -->
<input type="submit" class="btn" value="Sign up" />
<p class="social-text">Or Sign up with social platforms</p>
<div class="social-icons">
<div class="social-icon-frame">
<a href="https://www.google.com" target="_blank" class="social-icon">
<i class="fab fa-google"></i>
</a>
</div>
<div class="social-icon-frame">
<a href="https://facebook.com/YourPage" target="_blank" class="social-icon">
<i class="fab fa-facebook-f"></i>
</a>
</div>
<div class="social-icon-frame">
<a href="https://github.com/YourGitHubProfile" target="_blank" class="social-icon">
<i class="fab fa-github"></i>
</a>
</div>
</div>
</form>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/4.2.0/zxcvbn.js"></script>
<script>
let passwordSignup = document.getElementById("password-input-signup");
let strengthBarSignup = document.getElementById("strength-bar-signup");
let strengthLabelSignup = document.getElementById("strength-label-signup");
let passwordStrengthSection = document.getElementById("password-strength-section");
passwordSignup.oninput = function () {
let value = passwordSignup.value;
// Show the strength meter when the user starts typing
if (value.length > 0) {
passwordStrengthSection.style.display = "block";
} else {
passwordStrengthSection.style.display = "none";
}
let result = zxcvbn(value);
let score = result.score; // Score is between 0 and 4
let widths = ["1%", "25%", "50%", "75%", "100%"];
let colors = ["#d73f40", "#dc6551", "#f2b84f", "#bde952", "#3ba62f"];
let labels = ["Very Weak", "Weak", "Fair", "Good", "Strong"];
strengthBarSignup.style.width = widths[score];
strengthBarSignup.style.backgroundColor = colors[score];
strengthLabelSignup.textContent = labels[score];
};
function forgotPassword() {
const email = prompt('Please enter your email address:');
if (email) {
firebase
.auth()
.sendPasswordResetEmail(email)
.then(() => {
alert('Password reset email sent!');
})
.catch((error) => {
console.error('Error:', error.message);
});
}
}
</script>
</div>
</div>
<div class="panels-container">
<a href="index.html" class="homeBtn">
<i class="fas fa-home"></i>
</a>
<div class="panel left-panel">
<div class="content">
<h3>New here ?</h3>
<p>
Discover new experiences with FinVeda! <br />Get access to
exclusive content and features. <br />
Create your account.
</p>
<a href="index.html" class="homeBtn">
<i class="fas fa-home"></i>
</a>
<button class="btn transparent" id="sign-up-btn">Sign up</button>
</div>
<img src="img/log.svg" class="image" alt="" />
</div>
<div class="panel right-panel">
<div class="content">
<h3>One of us ?</h3>
<p>Welcome to our community</p>
<button class="btn transparent" id="sign-in-btn">Sign in</button>
</div>
<img src="img/register.svg" class="image" alt="" />
</div>
</div>
</div>
<script>
const sign_in_btn = document.querySelector("#sign-in-btn");
const sign_up_btn = document.querySelector("#sign-up-btn");
const container = document.querySelector(".container");
sign_up_btn.addEventListener("click", () => {
container.classList.add("sign-up-mode");
});
sign_in_btn.addEventListener("click", () => {
container.classList.remove("sign-up-mode");
});
// Toggle password visibility
function togglePassword(fieldId, icon) {
const field = document.getElementById(fieldId);
const isPassword = field.type === "password";
// Toggle between 'password' and 'text'
field.type = isPassword ? "text" : "password";
// Change the icon class between eye and eye-slash
icon.classList.toggle("fa-lock-open", isPassword);
icon.classList.toggle("fa-lock", isPassword === false);
}
// Add event listeners for password toggle
document
.getElementById("toggle-password")
.addEventListener("click", function () {
togglePassword("password-input", this);
});
document
.getElementById("toggle-password-signup")
.addEventListener("click", function () {
togglePassword("password-input-signup", this);
});
// Check password strength
function checkPasswordStrength() {
const password = document.querySelector(
".sign-up-form input[type='password']"
).value;
const strengthWeak = document.getElementById("strength-weak");
const strengthMedium = document.getElementById("strength-medium");
const strengthStrong = document.getElementById("strength-strong");
let strength = 0;
if (password.length >= 8) strength++;
if (password.match(/[A-Z]/)) strength++;
if (password.match(/[a-z]/)) strength++;
if (password.match(/[0-9]/)) strength++;
if (password.match(/[^a-zA-Z0-9]/)) strength++;
strengthWeak.className = "";
strengthMedium.className = "";
strengthStrong.className = "";
if (strength >= 1) strengthWeak.className = "weak";
if (strength >= 3) strengthMedium.className = "medium";
if (strength >= 5) strengthStrong.className = "strong";
}
document
.querySelector(".sign-up-form input[type='password']")
.addEventListener("input", checkPasswordStrength);
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.3.2/uuid.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.18.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.18.0/firebase-auth-compat.js"></script>
<script src="firebase.js"></script>
<script src="./assets/js/vendor/jquery-1.12.4.min.js"></script>
<script src="./assets/js/main.js"></script>
<script src="./loginpage.js"></script>
</body>
</html>