-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·173 lines (153 loc) · 5.79 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<!-- added cache control -->
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<!-- end cache control -->
<title>PennApps XIV Expo</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
<link href='//fonts.googleapis.com/css?family=Roboto:400,700,900,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://pennapps.github.io/pennapps-unified-styles/css/pennapps-styles.min.css" >
<link rel='stylesheet' type='text/css' href='css/main.css'>
<link rel="shortcut icon" href="http://nealrs.github.io/devpost-follow-button/icon/devpost-128.png">
<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js'></script>
<script type='text/javascript' src='js/papaparse.min.js'></script>
<script type='text/javascript' src='js/mustache.min.js'></script>
<script type='text/javascript' src="js/list.js"></script>
</head>
<body>
<div class="container">
<div id="header">
<h1>
<div id="logo-container">
<a href="http://pennapps-xiv.devpost.com/" title="PennApps XIV Expo">
PennApps XIV
</a>
</div>
</h1>
</div>
<div id="fullTable"></div>
</div>
<script id="template" type="x-tmpl-mustache">
<div class="search_container">
<input class="search" type="search" placeholder="Filter by sponsor prize, project name, route or whatever" id="filter"/>
</div>
<table id="expoTable">
<thead>
<tr>
<th class="number">Expo / Table</th>
<th class="name">Project</th>
<th class="prize">Sponsor Prizes</th>
<th class="route">Route</th>
<th class="judge_code" style="display: none !important">Judge Code</th>
</tr>
</thead>
<tbody class="list">
{{#data}}
<tr>
<td class="number">Expo {{expo}} Table {{table}}</td>
<td class="name"><a href="{{{link}}}" target="_blank">{{project}}</a></td>
<td class="prize">{{sponsors}}</td>
<td class="route">{{route}}</td>
<th class="judge_code" style="display: none !important">{{judge_code}}</th>
</tr>
{{/data}}
</tbody>
</table>
</script>
<br>
<div class="container">
<div class="row">
<div class="col-lg-12" style="text-align: center">
<p>Sponsors, want analytics about who's using your API, what they're building, and where?</p>
<p>Organizers, want your own slick expo / table number app?</p>
<p>Email <a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="http://devpost.com"><img src="http://devpost0.assetspost.com/assets/shared/devpost_logo-646bdf6ac6663230947a952f8d354cad.svg" style="height: 30px;"></a></p>
</div>
</div>
</div>
<footer>
<div class="row">
<div class="col-lg-6 col-sm-6">
<div class="footer-col">
<img height="50px" src="//pennapps.github.io/pennapps-unified-styles/img/logo_white.svg">
<p>
© 2016 PennApps <br>
<a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="footer-col">
<p>
<a href="https://www.facebook.com/pennapps">Facebook</a> <br>
<a href="https://twitter.com/pennapps">Twitter</a>
</p>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="footer-col">
<p>Organized with support from:</p>
<a href="http://www.seas.upenn.edu">
<img height="50px" style="margin-top: 10px;" src="//pennapps.github.io/pennapps-unified-styles/img/penn_engineering_logo_white.png">
</a>
</div>
</div>
</div>
</footer>
<script type="text/javascript">
var tableData;
function getParam(variable){
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
document.addEventListener('DOMContentLoaded', function() {
// CSV format: https://gist.githubusercontent.com/nealrs/510b6ab766d97b42f572/raw/92188f386410fe9ebdfdea381562a4ddff4a02b7/test.csv
Papa.parse("data/data.csv", {
download: true,
header: true,
complete: function(results) {
tableData = results;
// print raw data
console.log(tableData);
// add commas to sponsor prize data
for (var x in tableData.data) {
//var s = tableData.data[x]['sponsors'];
//tableData.data[x]['sponsors'] = s.replace(/,/ig, ", ");
}
// print cleaned data
console.log(tableData);
// process and render template
var template = $('#template').html();
Mustache.parse(template); // optional, speeds up future uses
var rendered = Mustache.render(template, tableData);
//console.log(rendered);
$('#fullTable').html(rendered);
// list.js search init
var listOptions = {
valueNames: [ 'number', 'name', 'prize', 'route', 'judge_code' ],
page: 1000000
};
var userList = new List('fullTable', listOptions);
// grab filter url param and activate filter
var filter = decodeURI(getParam("filter"));
if (filter != "false"){
$("#filter").val(filter);
userList.search(filter);
};
}
});
});
</script>
</body>
</html>