-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSignup.html
290 lines (245 loc) · 7.96 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!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>Healthmug | Your Gateway to Health</title>
<meta name="theme-color" content="#51c9a6">
<meta name="msapplication-navbutton-color" content="#51c9a6">
<meta name="application-name" content="Healthmug LT">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Healthmug LT">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="apple-touch-icon" sizes="192x192" href="https://static.oxinis.com/healthmug/image/healthmug/healthmuglogo-192.png">
<link rel="shortcut icon" href="https://static.oxinis.com/healthmug/image/healthmug/healthmuglogo-32.png" type="image/x-icon">
<link rel="stylesheet" href="https://static.oxinis.com/healthmug/css/healthmug-combined-6a75d3cd87.min.css" />
<style>
.btn,
article,
body,
button,
div,
form,
h1,
h2,
h3,
h4,
h5,
h6,
html,
input,
label,
li,
ol,
p,
span,
ul {
font-family: Roboto, sans-serif;
}
.spriteHealthmug {
background-image: url(https://static.oxinis.com/healthmug/css/image/sprite-healthmug.png);
background-repeat: no-repeat;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
top: 100%;
left: 50%;
margin-left: -61px;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
body {
background-color: #F4F4F4;
}
nav {
background-color: #51C9A6;
height: 24px;
margin-top: 4%;
}
.noLink {
color: #FBFBFB;
padding: 0.84%;
font-size: 14px;
}
nav {
display: block;
}
.signupbox {
width: 400px;
height: 500px;
margin: auto;
margin-top: 1%;
}
.upperSign {
width: 400px;
height: 120px;
background-color: #51C9A6;
color: #fff;
border: 1px solid #51C9A6;
}
.signimg {
width: 100px;
height: 100px;
margin-left: 280px;
margin-top: -70px;
}
.text1 {
margin-left: 10px;
margin-top: 20px;
font-weight: initial;
}
.text2 {
margin-left: 10px;
margin-top: -10px;
font-weight: initial;
}
.form_1 {
width: 90%;
height: 30%;
border: none;
display: grid;
grid-template-rows: 20% 20% 20% 20%;
grid-gap: 10%;
margin: 10% 5% 5% 5%;
outline: none;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
}
button:hover {
opacity: 1;
}
.cont {
width: 100%;
height: 150%;
background-color: #EC971F;
font-size: 17px;
color: #fff;
border: none;
cursor: pointer;
opacity: 0.9;
margin-top: 3%;
}
.backtoLogin {
margin-top: 24%;
margin-right: 10%;
height: 15px;
color: #51C9A6;
}
input {
border: none;
outline: 0;
border-radius: 0;
border-bottom: 1px solid #b7b7b7;
transition: .2s;
}
.a {
background-color: #F4F4F4;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="brandName">
<a href="Header.html"><img src="https://static.oxinis.com/healthmug/image/healthmug/healthmug-logo.png" alt="Healthmug Logo"></a>
</div>
<div class="topSearch">
<form action="/search" method="get">
<div class="searchBox">
<input type="text" placeholder="Search Products" name="keywords" maxlength="100" autocomplete="off" required />
<button class="btn size-lg btn-healthmug"><i class="fa fa-search"></i></button>
</div>
</form>
</div>
<div class="headerTopRight">
<a href="contactus.html"><i class="spriteHealthmug contact"></i><span>Contact Us</span></a>
<a href="sellwith.html"><i class="spriteHealthmug sell"></i><span>Sell with us</span></a>
<div class="tooltip">
<a>
<i class="spriteHealthmug account"></i>
<span class="tooltiptext">Log In</span>
<span>Sign In</span>
</a>
<div>
</div>
</div><a href="cart.html" id="cartbigbutton" class="cartbutton openCart"><i data-reactroot="" class="spriteHealthmug"></i></a>
</div>
</div>
</div>
</div>
<br>
<nav>
<div class="container">
<a href="" class="noLink">Disease</a>
<a class="noLink">Allopathy</a>
<a class="noLink">Homeopathy</a>
<a class="noLink">Ayurveda</a>
<a class="noLink">Unani</a>
<a class="noLink">Nutrition</a>
<a class="noLink">Personal Care</a>
<a class="noLink">Baby Care</a>
<a class="noLink">Sexual wellness</a>
<a class="noLink">Fitness</a>
<a class="noLink">Consultation</a>
</div>
</nav>
<div class="signupbox">
<div class="upperSign">
<h1 class="text1">Sign Up</h1>
<p class="text2">Fill your basic details</p>
<img class="signimg" src="https://static.oxinis.com/healthmug/image/healthmug/login-info-img.png" />
</div>
<form class="form_1" onsubmit="signup(event)" id="myForm" action="">
<input class="a" type="email" id="email" placeholder="Enter Email Id" />
<input class="a" type="text" id="name" placeholder="Enter Name" />
<input class="a" type="password" id="password" placeholder="Enter Password" />
<input class="a" type="password" id="passwordcheck" placeholder="Confirm Password" />
<button type="submit" class="cont">Continue</button>
</form>
<p class="backtoLogin">
<a href="Login.html">Back to Login</a>
</p>
</div>
</body>
</html>
<script>
function signup(e) {
e.preventDefault();
let myForm = document.getElementById("myForm");
let name = myForm.name.value;
let email = myForm.email.value;
let password = myForm.password.value;
let passwordcheck = myForm.passwordcheck.value;
if (localStorage.getItem('users') === null) {
localStorage.setItem("users", JSON.stringify([]));
}
// grab and prepare user data
let user = {
name,
email,
password,
passwordcheck,
};
// get array from localstorage
let arr = JSON.parse(localStorage.getItem("users"));
// push new users to arr
arr.push(user); //added a new user
localStorage.setItem("users", JSON.stringify(arr));
}
</script>