-
-
Notifications
You must be signed in to change notification settings - Fork 442
/
login.html
229 lines (212 loc) · 10.1 KB
/
login.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
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<title>Login/Register - FinVeda</title>
<meta name="description" content="Explore FinVeda's secure login portal for seamless access to personalized financial management tools. Efficiently manage your finances with ease and confidence." />
<meta name="author" content="Ayush Singh">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="/assets/images/favicon2.webp" type="image/png" />
<link rel="stylesheet" href="./assets/css/animate.css" />
<link rel="stylesheet" href="./assets/css/magnific-popup.css" />
<link rel="stylesheet" href="./assets/css/slick.css" />
<link rel="stylesheet" href="./assets/css/LineIcons.css" />
<link rel="stylesheet" href="./assets/css/font-awesome.min.css" />
<link rel="stylesheet" href="./assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="./assets/css/default.css" />
<link rel="stylesheet" href="./assets/css/style.css" />
<link rel="stylesheet" href="./assets/css/login.css" />
<link rel="stylesheet" href="./assets/css/register.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
<link rel="stylesheet" href="navbar.css">
</head>
<body>
<header class="header-area">
<div class="navbar-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
<nav class="navbar navbar-expand-lg">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
</button>
<div class="collapse navbar-collapse sub-menu-bar" id="navbarSupportedContent">
<ul id="nav" class="navbar-nav ml-auto">
<li class="nav-item"><a class="page-scroll" href="./index.html">Home 🏡</a></li>
<li class="nav-item"><a class="page-scroll" href="./about.html">About Us 📖</a></li>
<li class="nav-item"><a class="page-scroll" href="./trends.html">Trends 📈</a></li>
<li class="nav-item"><a class="page-scroll" href="./tools/sip.html">Tools 🔧</a></li>
<li class="nav-item"><a class="page-scroll" href="./blog.html">Blogs 📰</a></li>
<li class="nav-item"><a class="page-scroll" href="./quiz.html">Quiz 🤔</a></li>
</ul>
</div>
<div class="navbar-btn d-none d-sm-inline-block">
<a class="main-btn" data-scroll-nav="0" href="#" onclick="openModal()">Login/Register 💻</a>
</div>
</nav>
</div>
</div>
</div>
</div>
</header>
<!-- Login/Register Modals -->
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close" style="display: flex; justify-content: right;">×</span>
<div class="mt-3">
<h3 class="join">Login to join us....</h3>
<form class="px-3 py-4" id="loginForm">
<table>
<tr>
<td><label class="d-flex">Email</label></td>
<td><input type="email" placeholder="Email" class="form-control" id="login-email" required /></td>
</tr>
<tr>
<td><label class="d-flex">Password</label></td>
<td class="password-container">
<input type="password" placeholder="Password" class="form-control" id="login-password" required />
<span class="toggle-password" onclick="togglePasswordVisibility('login-password')">
<i class="fa-regular fa-eye"></i>
<i class="fa-solid fa-eye-slash" style="display: none;"></i>
</span>
</td>
</tr>
<tr>
<td colspan="2">
<div class="form-check d-flex">
<input type="checkbox" class="form-check-input" id="login-remember" />
<label class="form-check-label">Remember me</label>
</div>
</td>
</tr>
</table>
<div class="error" id="login-error"></div>
<button type="submit" class="main-btn mt-2 w-100 mb-2" style="padding: 0px;" id="login-btn">Sign in</button>
</form>
</div>
</div>
</div>
<div id="registerModal" class="modal">
<div class="modal-content">
<span class="close" style="display: flex; justify-content: right;">×</span>
<div class="mt-3">
<h3 class="join">Register To join us....</h3>
<form class="px-3 py-4" id="registerForm">
<table>
<tr>
<td><label class="d-flex">Email</label></td>
<td><input type="email" placeholder="Email" class="form-control" id="register-email" required /></td>
</tr>
<tr>
<td><label class="d-flex">Username</label></td>
<td><input type="text" placeholder="Username" class="form-control" id="register-username" required /></td>
</tr>
<tr>
<td><label class="d-flex">DOB</label></td>
<td><input type="date" placeholder="DOB" class="form-control" id="register-DOB" required /></td>
</tr>
<tr>
<td><label class="d-flex">Password</label></td>
<td class="password-container">
<input type="password" placeholder="Password" class="form-control" id="register-password" required />
<span class="toggle-password" onclick="togglePasswordVisibility('register-password')">
<i class="fa-regular fa-eye"></i>
<i class="fa-solid fa-eye-slash" style="display: none;"></i>
</span>
</td>
</tr>
<tr>
<td colspan="2">
<div class="form-check d-flex">
<input type="checkbox" class="form-check-input" id="login-remember" />
<label class="form-check-label" for="login-remember">Remember me</label>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="form-check d-flex">
<input type="checkbox" class="form-check-input" id="register-terms" required />
<label class="form-check-label">I accept the <a href="./blogs/terms-of-service.html" target="_blank">Terms and Conditions</a></label>
</div>
</td>
</tr>
</table>
<div class="error" id="register-error"></div>
<button type="submit" class="main-btn mt-2 w-100 mb-3" style="padding: 0px;" id="register-btn">Register</button>
</form>
</div>
</div>
</div>
<footer id="footer" class="footer-area pt-120">
<div class="container">
<div class="footer-copyright text-center">
<p class="text" style="color: white;"> © <span id="copyright-year">2024</span> FinVeda. All rights are reserved<br />
Made with ♥ in India</p>
</div>
</div>
</footer>
<script>
document.querySelector('#login-btn').addEventListener('click', (event) => {
event.preventDefault();
const emailInput = document.getElementById('login-email');
const rememberMeCheckbox = document.getElementById('login-remember');
if (rememberMeCheckbox.checked) {
localStorage.setItem('rememberedEmail', emailInput.value);
} else {
localStorage.removeItem('rememberedEmail');
}
// Continue with your existing login logic...
});
document.getElementById("copyright-year").textContent = new Date().getFullYear();
const inputFields = document.querySelectorAll("#registerForm input[required]");
const checkbox = document.getElementById("register-terms");
const registerPassword = document.getElementById("register-password");
const error_div = document.getElementById("register-error");
document.querySelector('#register-btn').addEventListener('click', (event) => {
event.preventDefault();
let allFilled = true;
error_div.innerHTML = "";
inputFields.forEach(input => {
if (!input.value) {
allFilled = false;
error_div.innerHTML += `Please fill in the required field: ${input.placeholder}<br>`;
}
});
if (!checkbox.checked) {
allFilled = false;
error_div.innerHTML += "Please check the terms and conditions.<br>";
}
if (registerPassword.value.length < 8) {
allFilled = false;
error_div.innerHTML += "Password length should be at least 8 characters.<br>";
} else {
const specialCharacterRegex = /[!@#$%^&*(),.?":{}|<>]/;
if (!specialCharacterRegex.test(registerPassword.value)) {
allFilled = false;
error_div.innerHTML += "Password should contain at least one special character.<br>";
}
}
if (allFilled) {
document.getElementById('registerForm').submit();
}
});
function togglePasswordVisibility(inputId) {
const passwordInput = document.getElementById(inputId);
const eyeOpen = passwordInput.nextElementSibling.children[0];
const eyeClosed = passwordInput.nextElementSibling.children[1];
if (passwordInput.type === "password") {
passwordInput.type = "text";
eyeOpen.style.display = "none";
eyeClosed.style.display = "inline";
} else {
passwordInput.type = "password";
eyeOpen.style.display = "inline";
eyeClosed.style.display = "none";
}
}
</script>
</body>
</html>