Files
GitList/js/main.js
Nate Eagleson a00e3236f7 Use contributor's html_url as href for their anchor tag
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.
2013-02-17 16:13:07 -05:00

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'));
});
});