forked from tanviSAM/Meesho-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LogInPage.html
210 lines (199 loc) · 7.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="icon" href="https://static.meeshosupply.com/web/meesho-logo-fav.png">
<link rel="stylesheet" href="./css/homePage.css">
<link rel="stylesheet" href="./css/search.css">
<title>Sign In | Messho</title>
</head>
<body>
<!-- Navigation Bar -->
<section class="navbar">
<div class="uppernav">
<a href="index.html"><img
src="https://cdn.hevodata.com/customer/logo/8c76f62bd88177a78bb6e2810a244446.png"
alt="logo"
class="logo"
/></a>
<div class="navSearch">
<img
src="https://i.postimg.cc/90c6jfMm/search-interface-symbol.png"
alt="search"
class="NavSearchIcon"
/>
<input
type="text"
id="keyword"
class="searchContainer"
placeholder="Try Saree,Kurthi or Seach by Product Code"
onkeypress="handleKeyPress(event)"
/>
</div>
<div class="navRightSec">
<div class="navAppPromo">
<img
src="https://i.postimg.cc/sXqr2Fz4/smartphone.png"
alt="app"
class="navAppIcon"
/>
<span id="tagDwn">Download App</span>
</div>
<span class="navSuplier">Become a Supplier</span>
<div class="navProfile" onclick="window.location.href='SignUpPage.html'">
<img
src="https://i.postimg.cc/wjtLkcVz/user.png"
alt="account"
class="navAccountIcon"
/>
<span
class="SignUpHover"
>Profile</span
>
</div>
<div class="navcart" onclick="window.location.href='CartPage.html'">
<img
src="https://i.postimg.cc/sXBgkwMf/bag.png"
alt="cart"
class="cartIcon"
/>
<span
class="SignUpHover"
onclick="window.location.href='CartPage.html'"
>Cart</span
>
</div>
<div id="cart-item-counter">0</div>
</div>
</div>
<div class="bottomNav">
<div class="nav-menu">
<ul>
<li class="dropdown" onclick="window.location.href='viewall.html'">View All</li>
<li class="dropdown" onclick="window.location.href='WomenWestern.html'">Women Western
<div class="submenu">
<div class="subCat">
<span class="catHeading">Topwear</span>
<span>Dresses</span>
<span>Tops</span>
<span>Sweaters</span>
<span>Jumpsuits</span>
</div>
<div class="subCat" style="margin-left: 1em;">
<span class="catHeading">Bottomwear</span>
<span>Jeans</span>
<span>Jeggings</span>
<span>Palazzos</span>
<span>Shorts</span>
<span>Skirts</span>
</div>
</div>
</li>
<li onclick="window.location.href='Jewellery.html'">Jewellery & Accessories</li>
<li onclick="window.location.href='Men.html'">Men</li>
<li>Beauty & Health</li>
<li>Bath & Body</li>
<li>Bags & Footwear</li>
<li>Home & Kitchen</li>
<li>Kids</li>
<li>Electronics</li>
</ul>
</div>
</div>
</section>
<section class="searchWindow">
<div class="searchCloseBtn">
<img src="https://i.postimg.cc/Lgdct409/close.png" alt="">
</div>
<div id="searchWindowDiv">
</div>
</section>
<section class="blurBack"></section>
<!-- <label for="">Sign Up</label> -->
<div id="RegBox">
<div id="SignInBox">
<p style="font-weight: bold">SIGN IN | Already have an account</p>
<br>
<br>
<form action="" id="form">
<!-- <label for="">Email</label> -->
<input id="email" type="email" placeholder="Please Enter your E-Mail ID*" />
<br>
<!-- <label for="">Password</label> -->
<input id="password" type="password" placeholder="Enter Password*" />
<br>
<button id="SignUpBut" type="submit">SIGN IN</button>
<button id="SignUpBut" type="submit" onclick="window.location.href='SignUpPage.html'">SIGN UP</button>
</form>
</div>
</div>
<br>
</body>
</html>
<script type="text/javascript" src="./script/search.js"></script>
<script>
document.getElementById("form").addEventListener("submit", signIn);
var regUser = JSON.parse(localStorage.getItem("user")) || [];
function signIn(e) {
e.preventDefault();
var email = document.getElementById("email").value;
var password = document.getElementById("password").value;
if (!email || !password) {
alert("Enter All of the details");
}
else {
for (var i = 0; i < regUser.length; i++) {
if (regUser[i].email === email && regUser[i].password === password) {
alert("WELCOME BACK! We missed you .");
window.location.href = "index.html";
return;
}
else if (email == "admin@gmail.com" && password == "admin") {
alert("SignIn Sucessfully !");
//redirect Home page
window.location.href = "index.html";
return;
}
}
alert("ERROR! Wrong E-Mail Id or Password");
}
}
</script>
<!-- <script>
document.getElementById("form").addEventListener("submit", Login);
async function Login(e) {
e.preventDefault();
let bodyLogin = {
email: document.querySelector("#email").value,
password: document.querySelector("#password").value
};
bodyLogin = JSON.stringify(bodyLogin);
let url = `http://localhost:3000/login`;
try {
let res = await fetch(url, {
method: "POST",
body: bodyLogin,
headers: {
"content-Type": "application/json",
},
});
let data = await res.json();
if (!data.message) {
alert("Registration Success");
localStorage.setItem("user", JSON.stringify(data.user));
localStorage.setItem("token", JSON.stringify(data.token));
window.open("../index.html", "_self");
} else {
alert(data.message);
}
console.log(data);
} catch (err) {
console.log(err);
}
}
</script>
-->