This repository has been archived by the owner on Dec 21, 2021. It is now read-only.
forked from luminopolis/codeforkc.org
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpeople.html
137 lines (112 loc) · 4.59 KB
/
people.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>People - OpenOakland</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- <link href="css/font-awesome.css" rel="stylesheet"> -->
<!-- Custom styles for this template -->
<link href="css/custom.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class='col-md-10 col-md-offset-1'>
<div class="header">
<h3 class="text-muted"><a href="index.html" >OpenOakland's Project Crew</a></h3>
</div>
<!-- Begin page content-->
<h1>People <small id='people-count'></small></h1>
<p>Developers, designers, and data scientists that work on <a href='projects.html'>civic tech projects</a> at OpenOakland. <a href='data/people.json'>View the data powering this page</a>.</p>
<br>
<table id='hack-night-people' class='table people'>
<thead>
<tr>
<th>Name</th>
<th>Location</th>
<th>Civic projects</th>
<th>Contributions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<!-- End page content-->
<div class="footer">
<p class='pull-right'>Forked from <a href='https://github.com/open-city/open-gov-hack-night'><i class='icon-github'></i> Open Gov Hack Night</a></p>
</div>
</div>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/analytics_lib.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/jquery.dataTables.sorting.js"></script>
<script src="js/jquery.address.js"></script>
<script src="js/mustache.js"></script>
<script src="js/spin.min.js"></script>
<script src="js/jquery.spin.js"></script>
<script>
// Set this up like this to make it easier to dev this locally -- evz
// var data_host = 'http://127.0.0.1:5000'
// var data_host = 'http://civic-json.datamade.dev.work'
var people_table;
// this is a template used for mustache.js. Each one represents a table row.
var template = "\
<tr>\
<td>\
<a href='{{html_url}}'>\
<img class='img-thumbnail' src='{{avatar_url}}' alt='{{login}}' />\
{{name}}\
</a>\
</td>\
<td>{{location}}</td>\
<td><a href='projects.html#/?search={{login}}'>{{repositories}}</a></td>\
<td><a href='https://github.com/{{login}}?tab=activity'>{{contributions}}</a></td>\
</tr>\
";
$('#hack-night-people tbody').spin({top: '40px'}); //show a spinner while loading data
$.when( $.getJSON( "data/people.json" ) ).then(function( data, textStatus, jqXHR ) {
// update project count at the top of the page
$('#people-count').html(data.length);
// loop through our json data
$.each(data, function(i, json){
if (json['name'] == null)
json['name'] = json['login'];
$("#hack-night-people tbody").append(Mustache.render(template, json));
})
// initialize datatables
people_table = $('#hack-night-people').dataTable( {
"aaSorting": [ [2,'desc'], [3, 'desc'] ],
"aoColumns": [
null,
null,
{ "sType": "num-html" },
{ "sType": "num-html" }
],
"bInfo": false,
"bPaginate": false
});
// allows linking directly to searches
if ($.address.parameter('search') != undefined)
people_table.fnFilter( $.address.parameter('search') );
// when someone types a search value, it updates the URL
$('#hack-night-people_filter input').keyup(function(e){
$.address.parameter('search', $('#hack-night-people_filter input').val());
});
});
</script>
</body>
</html>