-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectGo.html
230 lines (184 loc) · 7.62 KB
/
ProjectGo.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<style type="text/css">
body {
background-image: url('maybe.jpg');
background-size: cover;
}
.container{
position: absolute;
left: 10px;
top:150px;
}
.container2{
position: absolute;
left: 20px;
top:120px;
}
legend {
border-color: black;
}
p{
color: #000000;
}
.navbar{
background-color: #000000;
}
</style>
</head>
<body>
<!-- -------NAV BAR------ -->
<nav class="navbar">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</nav>
<!-- -------END OF NAV BAR------ -->
<!-- ------- START OF DIV FOR THE FORM------ -->
<div class="container">
<h2><span style="">Login</span></h2>
<form class="form-horizontal" role="form">
<legend>
<div class="form-group " id="emaildiv">
<label class="control-label col-md-4" for="email">Email:</label>
<div class="col-md-4">
<input type="email" class="form-control" id="email" placeholder="Enter email">
<span id="emailspan" ></span>
<span id="ea">There's an error. A sample email Id would be [email protected]</span>
</div>
</div>
<div class="form-group" id="passdiv">
<label class="control-label col-md-4" for="pwd">Password:</label>
<div class="col-md-4">
<input type="password" class="form-control" id="pwd" placeholder="Enter password">
<span id="pa">Please enter the correct password...</span>
</div>
</div>
<div class="form-group" id="chechdiv">
<div class="col-md-offset-4 col-md-4">
<div class="checkbox">
<label><input type="checkbox"> Remember me</label>
</div>
</div>
</div>
<div class="form-group" id="buttondiv">
<div class="col-md-offset-4 col-md-4">
<button type="button" id="button1" class="btn btn-primary">Take Me In</button>
<button type="button" id="button2" class="btn btn-primary"> New User?</button>
</div>
</div>
</legend>
</form>
</div>
<!-- ------- END OF DIV FOR THE FORM------ -->
<!-- ------- START OF DIV FOR THE FORM TO REGISTER------ -->
<div class="container2">
<form class="form-horizontal" action='' method="POST">
<fieldset>
<div id="legend">
<legend class="">Register</legend>
</div>
<div class="control-group">
<!-- Username -->
<label class="control-label" for="username">Username</label>
<div class="controls">
<input type="text" id="username" name="username" placeholder="" class="input-xlarge">
<p class="help-block"><strong>Username can contain any letters or numbers, without spaces</strong></p>
</div>
</div>
<div class="control-group">
<!-- E-mail -->
<label class="control-label" for="email">E-mail</label>
<div class="controls">
<input type="text" id="email2" name="email" placeholder="" class="input-xlarge">
<p class="help-block"><strong>Please provide your E-mail</strong></p>
</div>
</div>
<div class="control-group">
<!-- Password-->
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" id="password2" name="password" placeholder="" class="input-xlarge">
<p class="help-block"><strong>Password should be at least 4 characters</strong></p>
</div>
</div>
<div class="control-group">
<!-- Password -->
<label class="control-label" for="password_confirm">Password (Confirm)</label>
<div class="controls">
<input type="password" id="password_confirm" name="password_confirm" placeholder="" class="input-xlarge">
<p class="help-block"><strong>Please confirm password</strong></p>
</div>
</div>
<div class="control-group">
<!-- Button -->
<div class="controls">
<button class="btn btn-success">Register</button>
</div>
</div>
</fieldset>
</form>
</div>
<!-- ------- END OF DIV FOR THE FORM TO REGISTER------ -->
<script type="text/javascript">
$('.container2').hide();
$('#button2').click(function() {
$( ".container" ).toggle( "bounce", { times: 3 }, "slow" );
setTimeout(function(){ $( ".container2" ).toggle( "bounce", { times: 3 }, "slow" );}, 1000);
});
//-----------------------------------------------------------------------------------------------------------------------
$('#ea').hide();
$('#pa').hide();
$("#button1").click(function(){
user = $("#email").val();
pass = $("#pwd").val();
if(user == '' || user.indexOf('@') === -1 || user.indexOf('.') === -1 ){
$('#ea').show();
$('#emaildiv').removeClass('has-success has-feedback ');
$('#emailspan').removeClass('glyphicon glyphicon-ok form-control-feedback');
$('#emaildiv').addClass('has-error has-feedback ');
$('#emailspan').addClass('glyphicon glyphicon-remove form-control-feedback');
}else{
$('#ea').hide();
$('#emaildiv').removeClass('has-error has-feedback ');
$('#emailspan').removeClass('glyphicon glyphicon-remove form-control-feedback');
$('#emaildiv').addClass('has-success has-feedback ');
$('#emailspan').addClass('glyphicon glyphicon-ok form-control-feedback');
}
if(pass == ''){
$('#pa').show();
$('#passdiv').removeClass('has-success has-feedback ');
$('#passdiv').addClass('has-error has-feedback ');
}else{
$('#pa').hide();
$('#passdiv').removeClass('has-error has-feedback ');
$('#passdiv').addClass('has-success has-feedback ');
}
});
//---------------------------------------------------------------------------------------------------------------------------
</script>
</body>
</html>