-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin.html
162 lines (150 loc) · 4.24 KB
/
admin.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
<!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">
<title>Admin</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
font-family: Georgia, 'Times New Roman', Times, serif;
background-image:linear-gradient(to right,indigo,rgb(243,4,49)) ;
}
.form{
max-width: 450px;
margin: auto;
margin-top: 50px;
background-color: #0d58a1;
max-width: 450px;
margin: auto;
margin-top: 50px;
background-image: linear-gradient(45deg, black, transparent);
border-radius: 1.2rem;
box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;
}
.form-content{
width: 100%;
padding: 30px;
border-radius: 6px;
margin: auto;
}
header{
font-size: 28px;
font-weight: 600;
text-align: center;
color: white;
}
form {
margin-top: 30px;
}
form .field{
height: 50px;
width: 100%;
margin-top: 20px;
}
#login{
/* background-color: rgb(0, 128, 109); */
background-color: rgb(0, 128, 109);
color: white;
}
.field input,
.field button{
height: 100%;
width: 100%;
border: none;
font-size: 15px;
font-weight: 400;
border-radius: 6px;
/* background-color: rgb(255, 127, 133); */
}
.field input{
border: 1px solid #CACACA;
padding: 0 15px;
}
#eyeClosed{
position: relative;
bottom: 30px;
left: 350px;
}
#eyeOpen{
position: relative;
display: none;
bottom: 30px;
left: 350px;
}
.show{
display: block;
}
.field input:hover{
background-color: azure;
}
.field input[type='email']{
border:none;
}
.field input[type="email"]:focus{
outline:none;
}
.field input[type='password']{
border:none;
}
.field input[type="password"]:focus{
outline:none;
}
</style>
</head>
<body>
<div class="form admin">
<div class="form-content">
<header>Sign In</header>
<form id="signIn" action="#">
<div class="field input-field">
<input id="mailIn" type="email" placeholder="Email" class="input">
</div>
<div class="field input-field">
<input id="passIn" type="password" placeholder="Password" class="password">
<i id="eyeOpen" class="fa-sharp fa-solid fa-eye "></i>
<i id='eyeClosed'class="fa-solid fa-eye-slash"></i>
</div>
<div class="field button-field">
<!-- <button>Login</button> -->
<input id="login" type="submit" value="Login" />
</div>
</form>
</div>
</div>
</body>
</html>
<script>
let logBtn=document.getElementById("login");
let form=document.querySelector("form");
// let admins=["mshahnwaj10@gmail.com", "deepak@gmail.com"]
form.addEventListener("submit",()=>{
if(form.passIn.value=="admin"){
alert("login successful");
}else{
alert("enter the correct credentials")
}
})
let eyeClosed=document.getElementById("eyeClosed");
let eyeOpen=document.getElementById("eyeOpen");
eyeClosed.addEventListener("click",()=>{
let passText=document.querySelector("#passIn");
eyeOpen.style.display = "block";
eyeClosed.style.display = "none";
// eyeOpen.classList.add('show');
passText.type='text';
})
eyeOpen.addEventListener("click",()=>{
let passText=document.querySelector("#passIn");
eyeOpen.style.display = "none";
eyeClosed.style.display = "block";
passText.type='password';
})
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js" integrity="sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>