-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.html
181 lines (163 loc) · 5.37 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
<!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>Document</title>
<link rel="stylesheet" href="./style/navbar.css">
<style>
*{
box-sizing: border-box;
}
body{
background-color: #f5f5f5;
color: #fff;
font-family: "Muli", sans-serif;
display: flex;
flex-direction: column;
align-items: flex-end ;
overflow: hidden;
background-image: url("https://images.unsplash.com/photo-1514995669114-6081e934b693?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTZ8fGZvb2QlMjBpbmdyZWRpZW50c3xlbnwwfHwwfHw%3D&auto=format&fit=crop&w=800&q=60=");
background-repeat: no-repeat;
background-size: cover;
}
.container{
margin-top: 8px;
margin-right: 50px;
background-color: rgba(0, 0, 0 ,0.4);
padding: 10px 40px;
border-radius: 5px;
}
.container h1{
text-align: center;
margin-bottom: 10px;
}
.container a{
text-decoration: none;
color: lightblue;
}
.btn{
cursor: pointer;
display: inline-block;
width: 100%;
background: lightblue;
padding: 15px;
/* font-family: inherit; */
font-size: 16px;
border: 0;
border-radius: 5PX;
}
.btn:focus{
outline: 0;
}
.btn:active{
transform: scale(.98);
}
.text{
margin-top:30px ;
}
.form-control{
position: relative;
margin: 10px 0 15px;
width: 300px;
}
.form-control input{
background-color: transparent;
border: 0;
border-bottom: 2px #fff solid;
display: block;
width: 100%;
padding: 18px 0;
font-size: 18px;
color: #fff;
}
.form-control input:focus ,.form-control input:valid{
outline: 0;
border-bottom-color: lightblue;
}
.form-control label{
position: absolute;
top: 10PX;
left: 0px;
font-size: 18px;
color: #fff;
}
.form-control label span{
display: inline-block;
font-size: 18px;
min-width: 5px;
transition: 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
}
.form-control input:focus + label span,.form-control input:valid + label span {
color: lightblue;
transform: translateY(-20px);
}
</style>
</head>
<body>
<div id="navbar">
<a class="logo" href="./index.html"><img src="https://static.otta.com/uploads/images/company-logos/1791-chKstLMHpIGRPw_KTfO5UZSkDNTPAGzKQtw5mqlaU_E.png" alt=""></a>
<ul class="nav">
<li><a href="./index.html">Home</a></li>
<li><a href="./login.html">Login</a></li>
<li><a href="./signup.html">signup</a></li>
<!-- <i class="fa fa-cart-shopping"></i> -->
</ul>`
</div>
<div class="mainbody">
<div class="container">
<h1>Signup</h1>
<form id="signupForm">
<div class="form-control">
<input type="text" required id="name">
<label>Name</label>
</div>
<div class="form-control">
<input type="text" required id="email">
<label>Email</label>
</div>
<div class="form-control">
<input type="Phone No." required id="mobile">
<label>Phone No.</label>
</div>
<div class="form-control">
<input type="password" required id="password">
<label>Password</label>
</div>
<button class="btn" id="signupButton">Sign Up</button>
<p class="text">Already have an account? <a href="login.html">Login</a></p>
</form>
</div>
</div>
</body>
</html>
<script>
const labels = document.querySelectorAll('.form-control label')
labels.forEach(label => {
label.innerHTML = label.innerText
.split('')
.map((letter, idx) => `<span style="transition-delay:${idx * 50}ms">${letter}</span>`)
.join('')
})
document.querySelector('.btn').addEventListener("click",getSignupData);
let data =JSON.parse(localStorage.getItem("plateway")) ||[];
function Cf(name,email,phone,password){
this.name = name;
this.email=email;
this.password=password;
this.phone=phone;
}
function getSignupData(){
event.preventDefault();
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
const name = document.getElementById("name").value;
const phone = document.getElementById("mobile").value;
let CfObj= new Cf(name,email,phone,password)
// console.log(CfObj)
data.push(CfObj);
console.log(data);
localStorage.setItem('plateway',JSON.stringify(data))
}
</script>