-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
234 lines (177 loc) · 8.15 KB
/
index.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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
<title>SwampHacks Live!</title>
<meta name="description" content="
SwampHacks is a 36 hour open coding event where students become creators.
In the time allotted, students from around the country come together at the
University of Florida to collaborate on projects, mingle in activities, and
network with sponsors for a fully immersive experience.
"/>
<!-- Stylesheets
================================================== -->
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- <link href="https://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css" rel="stylesheet"> -->
<!-- Favicon
================================================== -->
<link rel="icon" type="image/png" href="favicon.png" />
<!-- Icons & Fonts
================================================== -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- MLH Badge
================================================== -->
<!-- <a id="mlh-trust-badge" style="display:block;max-width:100px;min-width:60px;position:absolute;right:50px;top:0;width:10%;z-index:0" href="https://mlh.io/seasons/na-2018/events?utm_source=na-2018&utm_medium=TrustBadge&utm_campaign=na-2018&utm_content=white" target="_blank"><img src="https://s3.amazonaws.com/logged-assets/trust-badge/2018/white.svg" alt="Major League Hacking 2017 Hackathon Season" style="width:100%"></a> -->
</head>
<body>
<section class="header">
<div class="col-md-12 head linkfoot">
<div class="linkcontainer">
<div class="linkout"><a class="footlink" href="#" id=""><span class="selected">Main Info</span></a></div>
<div class="linkout"><a class="footlink" href="stats.html" id="">Event Stats</a></div>
<div class="linkout"><a class="footlink" href="sponsors.html" id="">Sponsors</a></div>
</div>
</div>
</section>
<section id="mainInformation">
<div class="container">
<div class="row">
<div id="eventsSchedule" class="col-md-6">
<div class="header-main-type">Events</div>
<!-- <a class="titlelink" href="https://drive.google.com/open?id=17gaLWJsAr1YTVw7joOyi1Zzgr5_H5vLo55kFf2qMtGU" target="_blank"><div class="title-btn">Workshop Pre-Reqs</div></a>
<a class="titlelink" href="http://tinyurl.com/SW18Mentors" target="_blank"><div class="title-btn">Mentors</div></a> -->
<a class="titlelink" href="https://swamphacks-v.devpost.com" target="_blank"><div class="title-btn">Devpost</div></a>
<a class="titlelink" href="https://join.slack.com/t/swamphacks-2019/shared_invite/enQtNTIwNjU2NjIwNDA2LTFkNWY1ZTU1MGIzMmE4OGNmNTA4MTk2NWNiMzA5MzQ2ZGRkMjIzYjE4ZGE1NTllZmUwODljNjc4MmM5MmE2M2U" target="_blank"><div class="title-btn">Slack</div></a>
<div id="table-con"></div>
</div>
<div id="mapsPics" class="col-md-6">
<div class="header-main-type">Maps</div>
<div class="header-sub-type">First Floor Marston</div>
<img class="map-img" src="img/marstonfirst.png"></img>
<div class="header-sub-type">Marston Basement</div>
<img class="map-img" src="img/marstonbasement.png"></img>
</div>
</div>
</div>
</section>
<!-- <script src="js/menu.js"></script> -->
<script src="js/jquery.js"></script>
<script src="js/classie.js"></script>
<script src="js/jquerycsv.js"></script>
</body>
<script src="https://www.gstatic.com/firebasejs/3.7.6/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.7.6/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.7.6/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.7.6/firebase.js"></script>
<script src="https://cdn.firebase.com/js/client/2.3.1/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAPcSN9HohHuNUKOTVJ0Fm3wfoAqUaxzhk",
authDomain: "swamphacks-2019.firebaseapp.com",
databaseURL: "https://swamphacks-2019.firebaseio.com",
projectId: "swamphacks-2019",
storageBucket: "swamphacks-2019.appspot.com",
messagingSenderId: "243219143648"
};
firebase.initializeApp(config);
</script>
<script>
var ref = firebase.database().ref();
var usersRef = ref.child("applicants");
var acceptedRef = ref.child("accepted");
var checkedInRef = ref.child("confirmed");
var eventsDataRef = ref.child("eventsData");
var eventsRef = ref.child("events");
makeEventsTable();
function makeEventsTable() {
// get the reference for the body
var body = document.getElementById("table-con")
// creates a <table> element and a <tbody> element
var tbl = document.createElement("table");
var tblBody = document.createElement("tbody");
eventsRef.orderByChild("startTime").on("value", function(data) {
data.forEach(function(child){
// creates a table row
var data = child.val();
var row = document.createElement("tr");
var cell = document.createElement("td");
var cellTitle = document.createElement("div");
var titleText = document.createTextNode(data.name);
cellTitle.appendChild(titleText);
cellTitle.className = "event-title";
var startDate = new Date(data.startTime);
var hour = startDate.getHours();
var minutes = startDate.getMinutes();
var day = startDate.getDate();
var endDate = new Date(data.endTime);
var hour2 = endDate.getHours();
var minutes2 = endDate.getMinutes();
var cellTimes = document.createElement("div");
if (day === 18) {
day = "Friday"
} else if (day === 19) {
day = "Saturday"
} else if (day === 20) {
day = "Sunday"
}
var cellDay = document.createElement("div");
var dayText = document.createTextNode(day);
cellDay.appendChild(dayText);
cellDay.className = "event-day";
if (minutes === 0) {
minutes = "00";
}
if (minutes2 === 0) {
minutes2 = "00";
}
var time = "";
var amPM1 = (hour > 11) ? "pm" : "am";
var amPM2 = (hour2 > 11) ? "pm" : "am";
hour = (hour > 11) ? hour - 12 : hour;
hour2 = (hour2 > 11) ? hour2 - 12 : hour2;
hour = (hour === 0) ? 12 : hour;
hour2 = (hour2 === 0) ? 12 : hour2;
time = hour + ":" + minutes + amPM1 + " - " + hour2 + ":" + minutes2 + amPM2;
var timesText = document.createTextNode(time);
cellTimes.appendChild(timesText);
cellTimes.className = "event-times";
if (data.type === "Logistics") {
cell.id = "logistics";
} else if (data.type === "Food") {
cell.id = "food";
} else if (data.type === "Social") {
cell.id = "social";
} else if (data.type === "Techtalk") {
cell.id = "techtalk";
}
var cellLocation = document.createElement("div");
var locationText = document.createTextNode("Location: " + data.location);
cellLocation.appendChild(locationText);
cellLocation.className = "event-location";
var now = new Date();
if (now > startDate) {
cell.className = "greyedout";
}
cell.appendChild(cellTitle);
cell.appendChild(cellDay);
cell.appendChild(cellTimes);
cell.appendChild(cellLocation);
row.appendChild(cell);
// add the row to the end of the table body
tblBody.appendChild(row);
});
});
// put the <tbody> in the <table>
tbl.appendChild(tblBody);
// appends <table> into <body>
body.appendChild(tbl);
// sets the border attribute of tbl to 2;
tbl.setAttribute("border", "none");
tbl.setAttribute("width", "100%");
}
</script>
</html>