Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _layouts/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<title>{% if page.title != "code52" %}{{ page.title }} - code52{% else %}{{ page.title }}{% endif %}</title>
<link rel="stylesheet" type="text/css" href="/css/style20120128.css" />
<link rel="shortcut icon" href="/img/favicon.ico" />
<script id="contributorTemplate" type="text/x-jQuery-tmpl">
{% literal %}
{{each contributors}}
<h3 style="margin-top:0px;"><img src="http://gravatar.com/avatar/${gravatar_id}?s=25" alt="${ name }" /> <a href="https://github.com/${login}">${name || login}</a> - (${contributions} commits)</h3>
{{/each}}
{% endliteral %}
</script>
</head>
<body>
<div id="container">
Expand Down
46 changes: 46 additions & 0 deletions js/contrib.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
function getContribs(projectName) {
$.ajax({
url: "http://github.com/api/v2/json/repos/show/Code52/" + projectName + "/contributors",
dataType: 'jsonp',
success: function(data)
{
data.contributors = data.contributors.sort(function (a, b)
{
if (a.contributions > b.contributions) return -1;
if (a.contributions < b.contributions) return 1;
return 0;
});
$("#contributors").append("<h2>" + projectName +"</h2>");
$("#contributorTemplate").tmpl(data).appendTo("#contributors");
}
});
}


$(function()
{
$.ajax({
url: "http://github.com/api/v2/json/repos/show/code52",
dataType: 'jsonp',
success: function(data)
{
var count = data.repositories.length;
data.repositories = data.repositories.sort(function (a, b)
{
var adate = new Date(a.created_at).getTime();
var bdate = new Date(b.created_at).getTime();
if (adate < bdate) return -1;
if (adate > bdate) return 1;
return 0;
});

for(var i = 0; i < count; i++)
{
var repo = data.repositories[i];

if (repo.name != "code52.github.com")
getContribs(repo.name);
}
}
});
});
14 changes: 14 additions & 0 deletions projects.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: post
title: Previous Projects
---

<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
<script type="text/javascript" src="/js/contrib.js"></script>

<img style="float:right;" src="http://code52.org/DownmarkerWPF/icon.png" />
##[MarkPad](http://code52.org/DownmarkerWPF/)
**Contributors**

<div id="contributors"></div>
90 changes: 0 additions & 90 deletions projects.md

This file was deleted.