-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysignup.html
298 lines (282 loc) · 6.83 KB
/
mysignup.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
291
292
293
294
295
296
297
298
<!doctype html>
<html>
<head>
<script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<style>
*,
*:before,
*:after,
ul,
li,
a,
button,
input,
h1,
h2,
h3,
h4,
h5,
h6,
p,
img,
image,
svg,
path,
g,
canvas {
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: transparent;
border: none;
text-decoration: none;
font-family: "Roboto";
user-select: none;
list-style: none;
position: relative;
}
.html, body {
background-color: #FAFAFA;
margin: 0;
padding: 0;
}
.button {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.12);
background-color: #F2F8FF;
text-transform: capitalize;
cursor: pointer;
}
.button:hover, .button:focus {
transition: 0.15s ease-in-out;
}
.login-container {
width: 400px;
height: auto;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin: 0 auto;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.12);
overflow: hidden;
padding-top: 10px;
padding-bottom: 10px;
}
.login-container .title {
text-transform: capitalize;
font-size: 1.6em;
font-weight: 300;
padding: 60px 0;
padding-bottom: 10px;
}
.login-container .login-button {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
width: 60%;
padding: 20px 15px;
background-color: #007AFF;
color: #fff;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 400;
margin: 40px 0;
}
.login-container .login-button:hover, .login-container .login-button:focus {
box-shadow: 0px 3px 20px 3px rgba(0, 122, 255, 0.3);
background-color: #007AFF;
}
.fluid-input {
width: 80%;
height: 50px;
max-width: 450px;
position: relative;
}
.fluid-input-bg {
width: calc(100% - 10%);
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
flex-direction: row;
position: absolute;
left: 5%;
top: 0;
color: #007AFF;
font-weight: 400;
font-size: 0.9em;
transition: 0.3s ease-in-out;
text-transform: capitalize;
}
.fluid-input-holder {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
will-change: transform, box-shadow;
transition: 0.2s ease-in-out;
background-color: #f1f3f4;
}
.fluid-input-input {
width: inherit;
height: inherit;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
background-color: #f1f3f4;
font-size: 1.05em;
padding: 0 5%;
}
.fluid-input-input:focus {
outline: None;
}
.fluid-input-label {
width: calc(100% - 10%);
height: 100%;
display: flex;
align-items: center;
justify-content: start;
flex-direction: row;
position: absolute;
font-size: 1em;
left: 5%;
top: 0;
color: #007AFF;
font-weight: 400;
text-transform: capitalize;
pointer-events: none;
transition: transform 0.2s ease-in-out, font-size 0.2s 0.15s ease-in-out;
will-change: transform, font-size;
}
.fluid-input--focus .fluid-input-holder {
box-shadow: 0px 5px 20px 0px rgba(0, 12, 47, 0.3);
}
.fluid-input--focus .fluid-input-bg {
transform: translateY(-40px);
transition: 0.2s 0.2s ease-in-out;
}
.fluid-input--focus .fluid-input-label {
transform: translateY(-40px);
}
.fluid-input--open .fluid-input-label {
transform: translateY(-40px);
}
.login-container .looo {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
width: 60%;
padding: 20px 15px;
background-color: #929CA4;
color: #fff;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 400;
margin: 40px 0;
}
</style>
</head>
<body>
<div id="root"></div>
<script type = "text/babel">
class FluidInput extends React.Component {
constructor(props) {
super(props);
this.state = {
focused: false,
value: ""
};
}
focusField() {
const { focused } = this.state;
this.setState({
focused: !focused
});
}
handleChange(event) {
const { target } = event;
const { value } = target;
this.setState({
value: value
});
}
render() {
const { type, label, style, id } = this.props;
const { focused, value } = this.state;
let inputClass = "fluid-input";
if (focused) {
inputClass += " fluid-input--focus";
} else if (value != "") {
inputClass += " fluid-input--open";
}
return (
<div className={inputClass} style={style}>
<div className="fluid-input-holder">
<input
className="fluid-input-input"
type={type}
id={id}
onFocus={this.focusField.bind(this)}
onBlur={this.focusField.bind(this)}
onChange={this.handleChange.bind(this)}
autocomplete="off"
/>
<label className="fluid-input-label" forHtml={id}>{label}</label>
</div>
</div>
);
}
}
class Button extends React.Component {
render() {
return (
<div className={`button ${this.props.buttonClass}`} onClick={this.props.onClick}>
{this.props.buttonText}
</div>
);
}
}
class LoginContainer extends React.Component {
render() {
const style = {
margin: "15px 0"
};
return (
<div className="login-container">
<form method="post" action="http://localhost:8080/signupsubmit" enctype = "multipart/form-data" class="login-container" >
<div className="title">
Login
</div>
<label>-----------</label>
<label>USER NAME</label>
<input type="email" label="name" name="uname" id="name" style={style} class="looo"/>
<label>Password</label>
<input type="password" label="password" name="password1" id="password" style={style} class="looo"/>
<label>confirm password</label>
<input type="password" name="password2" class="looo"id="password" style={style} label="password"/>
<input type="submit" class="login-button"/>
<a href="login"><label>log in</label></a>
</form>
</div>
);
}
}
ReactDOM.render(<LoginContainer />, document.getElementById("root"));
</script>
</body>
</html>