-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.html
More file actions
176 lines (166 loc) · 5.28 KB
/
signup.html
File metadata and controls
176 lines (166 loc) · 5.28 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Details | HangTime</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/narrow.css" rel="stylesheet" type="text/css" />
<link href="css/mid.css" rel="stylesheet" type="text/css" />
<link href="css/wide.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.firebase.com/js/client/2.4.1/firebase.js"></script>
<script src="js/firebase.js"></script>
<script src="js/auth.js"></script>
</head>
<body>
<div class="container navbar">
<div class="container center">
<div class="leftside">
<div id="navbutt"></div>
<div class="logo"><img src="img/hangtimewhite.png" /> HangTime</div>
<br class="clear" />
</div>
<div class="rightside">
<div id="navlinks" class="hidden">
<ul>
<div id="loggedout">
<li><a href="index.html">Home</a></li>
<li><a href="#" id="loginbutt">Log In</a></li>
</div>
<div id="loggedin">
<li><a href="dashboard.html">Dashboard</a></li>
<li><a href="friends.html">Friends</a></li>
<li><a href="editsched.html">My Account</a></li>
<li><a href="#" id="logoutbutt">Log Out</a></li>
</div>
</ul>
</div>
</div>
<script>
var navbutt = document.getElementById("navbutt"),
navlinks = document.getElementById("navlinks");
navbutt.addEventListener("click", function(){
if(navbutt.className == "opened"){
navbutt.className = "";
navlinks.className = "hidden";
} else{
navbutt.className = "opened";
navlinks.className = "";
}
}, false);
</script>
<br class="clear" />
</div>
</div>
<div id="SIGNUP">
<div class="navbackground"></div>
<div class="container center hidden" id="fblog">
<div class="signupcenter">
<h1>Sign in with Facebook</h1>
<p>
We at HangTime use Facebook login to simplify the process of getting started.
</p>
<button class="facebooklogin" onclick="login(true)">Log in with Facebook</button>
</div>
</div>
<div class="container center hidden" id="signup">
<div class="signupcenter">
<h1>Tell us about yourself</h1>
<p>
Help us help you!
</p>
<form id="extrainfo" action="editsched.html">
<input placeholder="School" value="" id="school" type="text" />
<input placeholder="Student ID (Optional)" value="" id="id" type="text"/>
<input type="submit" value="Continue" />
</form>
</div>
</div>
<script>
window.addEventListener("load", function(){
if(user == null){
document.getElementById("fblog").className = "container center";
} else{
document.getElementById("signup").className = "container center";
}
document.getElementById("extrainfo").addEventListener("submit", function(){
var n = {};
n = {};
n.name = user.facebook.displayName;
n.school = document.getElementById("school").value;
n.id = document.getElementById("id").value;
n.sched = {};
n.sched.monday = {};
n.sched.tuesday = {};
n.sched.wednesday = {};
n.sched.thursday = {};
n.sched.firday = {};
n.sched.saturday = {};
n.friends = {};
n.friends[user.facebook.id] = 1;
console.log(n);
fire.child("accounts/" + user.facebook.id).set(n);
}, false);
}, false);
</script>
<style>
.signupcenter{
max-width: 600px;
margin: auto;
padding: 20px;
}
.signupcenter h1{
font-size: 40px;
font-weight: 100;
color: #555;
line-height: 50px;
margin: 0;
padding: 20px;
}
.signupcenter p{
color: #333;
font-weight: 100;
padding: 20px;
margin: 0;
padding-top: 0;
line-height: 30px;
}
.facebooklogin{
border: 0;
background-color: #3b5998;
color: white;
font-size: 20px;
padding: 20px;
font-weight: 300;
text-align: center;
width: 100%;
cursor: pointer;
}
.signupcenter input[type=text]{
box-sizing: border-box;
width: 100%;
padding: 20px;
font-size: 15px;
margin-bottom: 10px;
}
.signupcenter input[type=submit]{
box-sizing: border-box;
width: 100%;
padding: 20px;
font-size: 15px;
border: 0;
background-color: #076293;
color: white;
cursor: pointer;
}
</style>
</div>
<style>
#HOMEPAGE, #TESTPAGE{
display: none;
}
#SIGNUP{
display: block;
}
</style>
</body>
</html>