-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustomer_signup.html
183 lines (177 loc) · 4.05 KB
/
customer_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
<!DOCTYPE html>
<html>
<head>
</head>
<style>
body, html {
height: 100%;
}
body {
font-family: "Lato", sans-serif;
background: rgb(14, 168, 236);
display: flex;
align-items: center;
flex-direction: column;
align-content: center;
justify-content: center;
color: black;
}
.container {
width: 400px;
}
form {
display: flex;
flex-direction: column;
background: transparent;
max-width: 320px;
padding: 2rem 2rem 2rem 2rem;
position: relative;
}
form::before, form::after {
position: absolute;
content: "";
width: 100%;
height: 100%;
transition: all 0.5s ease;
}
form::before {
z-index: -1;
background: transparent;
transform: translateX(-3.5rem) translateY(-3.75rem);
border: 6px solid #88498f;
}
form::after {
background: rgb(255, 200, 253);
z-index: -2;
transform: translateX(-2rem) translateY(-2.25rem);
}
form h1 {
text-align: center;
margin: 0 0 0.25rem 0;
padding: 0;
font-size: 1.5rem;
}
form small {
display: block;
margin: 0 auto 1rem;
padding: 0;
font-size: 14px;
}
form:focus-within {
background: rgba(255, 200, 253, 1);
}
form:focus-within::before {
width: 0%;
height: 0%;
transform: translatex(0px) translatey(0px);
}
form .field {
display: flex;
flex-flow: column-reverse;
margin-bottom: 1em;
}
form label, form input {
transition: all 0.3s ease;
touch-action: manipulation;
}
form label {
opacity: 0;
}
form input {
padding: 10px 20px;
border: 4px solid black;
margin: 0 1.5rem;
background-color: transparent !important;
-webkit-appearance: none;
color: black;
}
form input:-webkit-autofill {
background-color: transparent !important;
-webkit-box-shadow: 0 0 0px 1000px #0ea8ec inset;
-webkit-text-fill-color: white !important;
}
form input::placeholder {
color: black;
}
form input:focus {
color: #88498f;
font-weight: bold;
outline: 0;
border: 6px solid #88498f;
}
form input::-webkit-input-placeholder {
opacity: 1;
transition: inherit;
}
form input:focus::-webkit-input-placeholder {
opacity: 0;
}
form button {
border: none;
padding: 0.85rem 1rem;
margin-top: 2rem;
background-color: #88498f;
color: white;
font-size: 0.75rem;
text-transform: uppercase;
width: 65%;
position: absolute;
bottom: -20px;
right: 18%;
letter-spacing: 0.15em;
transition: all 0.3s ease;
font-weight: bold;
}
form button:hover {
border: 6px solid ;
}
form p {
font-size: 0.75rem;
line-height: 1.125rem;
margin: 0.5rem 1.5rem 1.75rem 1.5rem;
}
.success-message {
font-size: 1.25rem;
text-align: center;
line-height: 2rem;
margin: 1.5rem auto 5rem auto;
}
#smallMessage{
color: red;
font-weight: bold;
}
</style>
<body>
<div class="container">
<form id="form" autocomplete="off">
<h1 id="message">Get Started</h1>
<small id="smallMessage"> </small>
<div class="field">
<input type="text" name="email" placeholder="Phone No." id="email" autocomplete="off"/>
<label for="email">Phone No.</label>
</div>
<div class="field">
<input type="text" name="password" placeholder="Pin" id="password" autocomplete="off"/>
<label for="password">Pin</label>
</div>
<button id="submit" onclick="validateForm(); return false">Sign Up</button>
<p>By signing up, I agree to to the Terms of Service and Privacy Policy.</p></form>
</div>
</body>
<script>
function validateForm(){
var phone = document.getElementById('email').value;
var otp = document.getElementById('password').value;
var correct_otp = phone.substring(6,11);
if(phone.length == 10){
if (otp == correct_otp)
{
window.location.href = "customer_login.html";
}else{
document.getElementById('smallMessage').innerHTML = "Create a valid Pin.";
}
}else{
document.getElementById('smallMessage').innerHTML = "Invalid mobile number.";
}
}
</script></html>