forked from BishalPatgiri/SEPHORA-E-commerce-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.html
129 lines (122 loc) · 3.43 KB
/
check.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
<!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 rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<title>Vrification</title>
<style>
body{
background-image:url("home_img.png");
}
body>div{
width: 25%;
margin: auto;
margin-top: 60px;
background-color: white;
padding-top: 5px;
}
p{
font-family: Avenir-Next,sans-serif;
font-size: 12px;
color: #746f6f;
}
div>div{
width:80%;
margin: auto;
margin-top: 10px;
}
i{
margin-left: -30px;
cursor: pointer;
}
input{
width: 98%;
height: 34px;
}
h1{
text-align: center;
padding: 0px 2% 0px 2%;
}
img{
margin-top: 10px;
margin-bottom: 20px;
}
#btn{
width: 100%;
height: 38px;
margin-top: 50px;
margin-bottom: 50px;
color: white;
background-color: rgb(203, 27, 212);
font-weight: 600;
border: 0;
cursor: pointer;
}
a{
color: rgb(190, 54, 211);
font-size: 35px;
cursor: pointer;
text-decoration: none;
}
i+p{
text-align: right;
color: rgb(191, 53, 229);
cursor: pointer;
}
@media all and (min-width: 761px) and (max-width:1000px)
{
body>div{
width: 30%;
}
}
@media all and (min-width: 451px) and (max-width:760px)
{
body>div{
width: 45%;
}
}
</style>
</head>
<body>
<div>
<div>
<a href="signin.html"><</a>
<h1>ENTER PASSWORD</h1>
<center><img src="https://static.nnnow.com/Group%2043389.svg" alt=""></center>
<p>Password*</p>
<input type="password" minlength="8" id="pass">
<i class="far fa-eye" id="togglePassword" ></i>
<p id="forgot">Forgot Password?</p>
<button id="btn">CONTINUE</button>
</div>
</div>
</body>
</html>
<script>
document.querySelector('#togglePassword').addEventListener('click', function (e) {
const type = document.querySelector('#pass').getAttribute('type') === 'password' ? 'text' : 'password';
document.querySelector('#pass').setAttribute('type', type);
this.classList.toggle('fa-eye-slash');
})
var data=JSON.parse(localStorage.getItem("data"))
document.querySelector("#btn").addEventListener("click",pass_check)
function pass_check(){
var pass=document.querySelector("#pass").value
if(pass==data.password)
{
alert("Successfuly Loged In")
window.location.href="index.html"
localStorage.setItem("logIn","Yes")
}
else{
alert("Wrong Password!! Try again")
localStorage.setItem("logIn","No")
}
}
document.querySelector("#forgot").addEventListener("click",reset_mail)
function reset_mail(){
window.location.href="forget_password.html"
}
</script>