mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-01-15 20:12:49 +01:00
GitHub has added html_url to the user object throughout their API responses, per my support request, so we can now make use of it in this page.
26 lines
1020 B
JavaScript
26 lines
1020 B
JavaScript
$(function(){
|
|
$.ajax({
|
|
url: 'https://api.github.com/repos/klaussilveira/gitlist/contributors',
|
|
dataType: 'jsonp',
|
|
success: function(data) {
|
|
var items = [];
|
|
|
|
$.each(data.data, function(key, val) {
|
|
items.push('<li><a href="' + val.html_url + '" rel="avatarover" data-placement="top" data-title="' + val.login + '" data-content="' + val.login + ' has made ' + val.contributions + ' contributions to GitList"><img src="' + val.avatar_url + '" width="32" height="32" /></a></li>');
|
|
});
|
|
|
|
$('<ul/>', {
|
|
'class': 'contributor-list',
|
|
html: items.join('')
|
|
}).appendTo('#contributors');
|
|
$('[rel=avatarover]').popover();
|
|
}
|
|
});
|
|
|
|
$('[rel=carousel]').carousel();
|
|
$('[rel=tooltip]').tooltip();
|
|
$('[rel=popover]').popover();
|
|
$('.feature').each(function() {
|
|
$(this).css('top',$(this).data('top')).css('left',$(this).data('left'));
|
|
});
|
|
}); |