-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.html
169 lines (147 loc) · 4.75 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
<!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>Sign Up Page</title>
<link rel="stylesheet" href="signin.html">
<style>
.create_account {
display: grid;
grid-template-columns: 46% 46%;
padding: 1%;
gap: 2%;
color: rgb(87, 84, 84);
padding: 2%;
}
.account {
margin-left: 80px;
}
.account>input {
width: 70%;
height: 14%;
border: 1px solid grey;
border-radius: 5px;
margin: 6px 20px;
}
.account>button {
width: 71.5%;
margin: 40px 20px;
height: 14%;
background-color: orange;
border-radius: 5px;
border: 1px solid orange;
color: white;
font-size: 20px;
}
.text {
font-size: large;
line-height: 25px;
}
.upper {
display: grid;
grid-template-columns: 50% 50%;
text-align: center;
color: orange;
}
.hr {
width: 100%;
border: 1px solid orange;
}
#name {
margin-left: 50px;
}
#username {
margin-left: 20 px;
}
#mobile {
margin-left: 20px;
}
#email {
margin-left: 50px;
}
#password {
margin-left: 26px;
}
.p {
font-size: small;
margin: -30px 0 0 100px;
}
#RegisterBtn {
margin-left: 90px;
}
</style>
</head>
<body>
<div class="upper">
<h2>NEW USER</h2>
<h2>REGISTRATION</h2>
</div>
<hr class="hr">
<div class="create_account">
<div class="text">
<p>At Sportsjam.in, buy your favourite brand and sportsgear at great prices. Don't forget to use our welcome gift vouchers (worth Rs.2000)* for more savings! Register online and and enjoy the following benefits:</p>
<ul>
<li>
Get Discount Vouchers, Special Promotions & Offers
</li>
<li>
Checkout faster while making your purchases
</li>
<li>
View your Order History and track your Order Status
</li>
<li>
Make changes to your account information or password
</li>
</ul>
</div>
<form action="submit" class="account">
<label>Name</label>
<input id="name" type="text" placeholder="Name" required="">
<br>
<label>UserName</label>
<input id="username" type="text" placeholder="User Name" required="">
<br>
<label>Mobile No</label>
<input id="mobile" type="tel" placeholder="Mobile Number" required="">
<br>
<label>Email</label>
<input id="email" type="email" placeholder="Email" required="">
<br>
<label> Password</label>
<input id="password" type="password" placeholder="Password" required="">
<br>
<button id="RegisterBtn">Submit</button>
<p class="p">
By clicking "Register" button, you confirm that you accept our
<a href="#"> terms and conditions.</a></p>
</form>
</div>
</body>
</html>
<script>
// document.getElementById("navbar").innerHTML = navbar()
var form = document.querySelector("form");
// createDropdown(categories)
// updateCart()
// checkLogStatus()
// document.getElementById("footer").innerHTML = footer()
document.getElementById("RegisterBtn").addEventListener("click", signUp);
var usersData = JSON.parse(localStorage.getItem("DataOfUsers")) || [];
function signUp() {
event.preventDefault()
let register_data = {
name: document.getElementById("name").value,
email: document.getElementById("email").value,
password: document.getElementById("password").value,
username: document.getElementById("username").value,
mobile: document.getElementById("mobile").value,
description: "sportsjam.in user",
};
alert("sign up is successful");
window.location.href = "signin.html";
localStorage.setItem("DataOfUsers", JSON.stringify(register_data));
}
</script>