-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignup.html
215 lines (189 loc) · 6.19 KB
/
signup.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
<!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>Signup
</title>
<style>
@import url(./font/font.css);
body{
font-family: 'PT Root UI Light';
}
#main{
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
height: 650px;
width: 80%;
margin:auto;
display: flex;
}
#sign{
height: 100%;
width: 50%;
}
#pic{
height: 100%;
width: 50%;
}
form{
display: block;
/* grid-template-rows: repeat(5,40px);
grid-template-columns: repeat(1,300px); */
/* grid-gap: 2px; */
padding-left: 80px;
/* margin-top: -30px; */
}
input{
border-radius: 10px;
padding: 7px;
width: 75%;
border-width:0.5px;
border-color: rgb(231, 216, 216);
border-width: 1px;
}
.inputlog{
background-color: blue;
color: white;
width:80%;
}
h1{
text-align: center;
}
#logo{
margin-left: 30%;
margin-top: 20px;
}
#banner{
background-color: #f2f5fc;
height: 100%;
width: 100%;
}
h4{
margin-bottom: 1px;
color: rgb(187, 179, 179);
}
#checkbox{
width:15%;
border-width: 5px;
border-color: black;
}
span:hover{
text-decoration: underline;
}
span{
color:blue
}
.last{
margin-top: 5px;
}
p{
margin-left:-10px
}
#lastline{
margin-left:20%
}
.sitelogin{
border:1px solid rgb(231, 216, 216);
width:80%;
height:32px;
border-radius: 5px;
text-align:center;
display:flex;
margin-top: 5px;
}
.sitelogin:hover{
background-color: rgb(228, 220, 220);
}
.siteloginpic{
height:70%;
padding-left: 80px;
padding-top: 5px;
}
.sitelogin>div{
height:80%;
weight:60%;
margin:auto;
}
.sitelogin>div>p{
margin-top: 0px;
font-size: 18px;
}
.line:hover{
border-color: rgb(161, 161, 228);
border-width: 2px;
}
</style>
</head>
<body>
<div id="main">
<div id="sign">
<img id="logo" src="https://id.tmetric.com/images/tmetric_logo_and_text.svg" alt="">
<h1>Create your account</h1>
<form>
<h4>Name</h4>
<input id="user" class="line" type="text" placeholder=" Join Smith"/>
<h4>Email</h4>
<input id="email" class="line" type="text" placeholder="[email protected]"/>
<h4>Password</h4>
<input id="pass" class="line" type="password" placeholder="Enter Your Password"/>
<br/>
<input type="checkbox" id="checkbox" /> <p style="display:inline-block">I accept <span>Terms of Service</span></p>
<input class="inputlog" type="submit" value="Sign Up" placeholder="signup"/>
<h3>---------------------Or-----------------------</h3>
<div class="sitelogin">
<img class="siteloginpic" src="https://id.tmetric.com/images/google_logo.svg" alt="">
<div onclick="window.location.href='https://www.facebook.com/suman.garai.9699'""> <p>Login with Google</p> </div>
</div>
<div class="sitelogin">
<img class="siteloginpic" src="https://id.tmetric.com/images/microsoft_logo.svg" alt="">
<div onclick="window.location.href='https://youtube.com/c/SSirScienceTeacher'""> <p>Login with Microsoft</p> </div>
</div>
<div class="sitelogin">
<img class="siteloginpic" src="https://id.tmetric.com/images/apple_logo.svg" alt="">
<div onclick="window.location.href='https://www.linkedin.com/in/suman-garai-353860204'""> <p>Login with Apple</p> </div>
</div>
<p id="lastline">Already have an account? <span onclick="window.location.href='login.html'">login </span></p>
</form>
</div>
<div id="pic">
<img id="banner"src="https://id.tmetric.com/images/side_image_register.svg" alt="">
</div>
</div>
</body>
</html>
<script>
document.querySelector("form").addEventListener("submit",formSubmit);
var userStack=JSON.parse(localStorage.getItem("userDataBase")) || [];
function formSubmit(event){
event.preventDefault();
var email=document.querySelector("#email").value;
var pass=document.querySelector("#pass").value;
var user=document.querySelector("#user").value;
var userData={
emailAdd:email,
passwd:pass,
userName:user,
};
let isValid = isUserValid(userData);
if (isValid) {
userStack.push(userData);
localStorage.setItem("userDataBase",JSON.stringify(userStack));
alert("Sign up successful");
window.location.href="login.html";
console.log(userStack);
}
else{
alert("User already Exists!!")
}
}
function isUserValid(user){
for (let i = 0; i < userStack.length; i++) {
if(userStack[i].emailAdd==user.emailAdd){
return false;
}
}
return true;
// console.log(user, userStack);
}
</script>