forked from kjsce-codecell/m-indicated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
30 lines (26 loc) · 858 Bytes
/
index.js
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
var users = []
var i = 0
var getData = (function ($) {
var URL = 'https://api.github.com/repos/KJSCE-Codecell/m-indicated/contributors'
$.get(URL, function (data, status) {
data.forEach(function (d) {
if (d.login == null) {
return true
}
if (users.indexOf(d.url) == -1) {
var template =
"<div class='col-md-3 col-xs-6 col-lg-3' id='author'><div class='container-fluid'>" +
"<a class='thumbnail' target='_blank' href='" + d.html_url + "'>" +
"<img src='" + d.avatar_url + "' alt='' class='img-responsive'>" +
'</a>' +
"<div class='caption'>" +
'<strong>' + d.login + '</strong>' +
'<p> Contributions: ' + d.contributions + '</p>' +
'</div></div></div>'
$('#contributors').append(template)
users[i] = d.url
i = i + 1
}
})
})
})($)