-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (50 loc) · 1.57 KB
/
index.html
File metadata and controls
55 lines (50 loc) · 1.57 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
---
layout: default
---
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.5.0-dev/mustache.min.js"></script>
<script>
var Githubbers = {
apiBaseURL: 'https://api.github.com',
init: function() {
var githubberTemplate = $('#githubber-template').remove().html()
var $githubbers = $('#githubbers')
$('li', $githubbers).each(function(i, x, y, z) {
var $githubber = $(this)
$.ajax({
url: Githubbers.apiBaseURL + '/users/' + $githubber.text(),
dataType: 'jsonp'
}).done(function(response) {
$githubber.html(
Mustache.render(githubberTemplate, response.data)
).fadeIn()
})
if (i % 4 == 0) {
$githubber.addClass('alpha')
}
if ((i + 1) % 4 == 0) {
$githubber.addClass('omega')
}
})
}
}
$(document).ready(Githubbers.init)
</script>
<script id="githubber-template" type="text/html">
{{'{{'}}=<% %>=}}
<img src="<% avatar_url %>" alt="<% login %>">
<div class="info">
<span class="login"><a href="<% html_url %>" target="_blank"><% login %></a></span>
<span class="name"><% name %></span>
<span class="followers"><% followers %> followers</span>
<span class="location"><% location %></span>
<span class="bio"><% bio %></span>
</div>
</script>
<div id="githubbers">
<ul class="clearfix">
{% for githubber in site.githubbers %}
<li class="four columns">{{ githubber }}</li>
{% endfor %}
</ul>
</div>