';
var items = [];
// GitHub
items.push({
icon: '
',
text: 'GitHub',
href: 'https://github.com/' + repo
});
// Stars
items.push({
icon: '
',
text: 'Stars',
apiKey: 'stargazers_count',
href: 'https://github.com/' + repo + '/stargazers'
});
// Forks
items.push({
icon: '
',
text: 'Forks',
apiKey: 'forks_count',
href: 'https://github.com/' + repo + '/network/members'
});
// Releases
items.push({
icon: '
',
text: 'Releases',
href: 'https://github.com/' + repo + '/releases'
});
// Download
items.push({
icon: '
',
text: 'Download Zip',
href: 'https://github.com/' + repo + '/archive/refs/heads/' + branch + '.zip'
});
items.forEach((item, i) => {
el += '
';
el += '
';
// left
el += '';
el += '' + item.text + '';
el += '
';
// right
el += '';
if (item.apiKey) {
el += '';
}
if (item.icon) {
el += item.icon;
}
el += '
';
el += '';
});
el += '