-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.html
216 lines (188 loc) · 5.61 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
216
<!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>Clockify</title>
<link rel="icon" href="https://clockify.me/assets/images/favicon.ico">
<style>
*{
font-family: sans-serif;
}
#main{
text-align: center;
}
#avi-top{
display:flex;
justify-content: space-around;
}
#avi_top{
display:flex;
justify-content: space-between;
margin-top: 20px;
margin-bottom:100px;
margin-left: 20px;
}
#sp{
display: flex;
justify-content: space-between;
}
button div{
display: grid;
grid-auto-flow: column;
align-items: center;
width:100%;
}
#avi_login{
padding:30px 40px;
border-radius: 10px;
margin:auto;
margin-bottom:100px;
display: grid;
gap:15px;
width:300px;
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#fp{
color:#03A9F4;
}
#log{
background-color:#03A9F4;
color:white;
border:transparent;
height:50px;
border-radius: 5px;
}
#log:hover{
cursor: pointer;
}
#google{
background-color: white;
color:black;
text-align: center;
height:50px;
}
#google:hover{
background-color: rgb(242, 236, 236);
color:black;
}
#email,#pass{
height:30px;
}
#lang{
margin:auto;
width: 90px;
}
select{
border:transparent;
}
#right{
background-color: #434FB5;
text-align: center;
color:white;
margin-left:20px;
}
h3{
width:70%;
margin: auto;
margin-bottom: 20px;
}
#right>img{
margin-left: 10%;
}
#right>button:nth-child(4){
margin-bottom: 20px;
height:40px;
background-color: #333333;
color:white;
border: transparent;
}
#new{
margin-top:10px;
}
#na{
color: #999999;
}
#logbtn{
background-color: white;
border: transparent;
}
input{
padding-left: 10px;
}
</style>
</head>
<body>
<div id="main">
<div id="avi-top">
<img src="https://app.clockify.me/assets/logo.svg" alt="error">
<button id="logbtn"><a href="login.html">Log In</a></button>
</div>
<div>
<h1>Get started with Clockify</h1>
<h3>Create a free account to start tracking time and supercharge your productivity.</h3>
<p>No credit card required · Unsubscribe at any time</p>
<div id="avi_login">
<h2>Sign up</h2>
<input type="email" placeholder="Enter Email" id="email">
<input type="password" placeholder="Choose Password" id="pass">
<span id="sp"><p><input type="checkbox">I agree to the <a href="#" id="fp">Terms of Use</a></p></span>
<button id="log" onclick="myFunction()">CREATE FREE ACCOUNT</button>
<hr>
<button id="google">
<div>
<img src="https://app.clockify.me/assets/ui-icons/icon-google.svg" alt="Error">
<p>Continue with Google</p>
</div>
</button>
</div>
<div id="lang">
<select name="" id="">
<option value="English">English</option>
<option value="Francais">Francais</option>
<option value="Espanol">Espanol</option>
<option value="Portugues">Portugues</option>
<option value="Deutsch">Deutsch</option>
<option value="pyccknn">pyccknn</option>
</select>
</div>
</div>
</div>
</body>
</html>
<script>
//https://nameless-earth-14050.herokuapp.com/api/signup
let signupArr = JSON.parse(localStorage.getItem("signupKey")) || [];
function myFunction(event) {
let signupObj = {
oEmail: document.querySelector("#email").value,
oPassword: document.querySelector("#pass").value,
};
if (
signupObj.oEmail == "" ||
signupObj.oPassword == ""
) {
alert("Please Enter Your Details");
} else {
if (checkEmail(signupObj.oEmail) === true) {
signupArr.push(signupObj);
localStorage.setItem("signupKey", JSON.stringify(signupArr));
alert("Account Created Successfully, Click On Log In");
}
}
}
/*Email validation check*/
function checkEmail(oEmail) {
let filtered = signupArr.filter(function (el) {
return oEmail === el.oEmail;
});
//console.log(filtered);
if (filtered.length > 0) {
alert("Account Already Exists Click On Log In");
return false;
} else {
return true;
}
}
</script>