File tree Expand file tree Collapse file tree 4 files changed +67
-90
lines changed Expand file tree Collapse file tree 4 files changed +67
-90
lines changed Original file line number Diff line number Diff line change 1212 < title > {% if page.title != "code52" %}{{ page.title }} - code52{% else %}{{ page.title }}{% endif %}</ title >
1313 < link rel ="stylesheet " type ="text/css " href ="/css/style20120128.css " />
1414 < link rel ="shortcut icon " href ="/img/favicon.ico " />
15+ < script id ="contributorTemplate " type ="text/x-jQuery-tmpl ">
16+ { % literal % }
17+ { { each contributors } }
18+ < 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 >
19+ { { / e a c h } }
20+ { % endliteral % }
21+ </ script >
1522 </ head >
1623 < body >
1724 < div id ="container ">
Original file line number Diff line number Diff line change 1+ function getContribs ( projectName ) {
2+ $ . ajax ( {
3+ url : "http://github.com/api/v2/json/repos/show/Code52/" + projectName + "/contributors" ,
4+ dataType : 'jsonp' ,
5+ success : function ( data )
6+ {
7+ data . contributors = data . contributors . sort ( function ( a , b )
8+ {
9+ if ( a . contributions > b . contributions ) return - 1 ;
10+ if ( a . contributions < b . contributions ) return 1 ;
11+ return 0 ;
12+ } ) ;
13+ $ ( "#contributors" ) . append ( "<h2>" + projectName + "</h2>" ) ;
14+ $ ( "#contributorTemplate" ) . tmpl ( data ) . appendTo ( "#contributors" ) ;
15+ }
16+ } ) ;
17+ }
18+
19+
20+ $ ( function ( )
21+ {
22+ $ . ajax ( {
23+ url : "http://github.com/api/v2/json/repos/show/code52" ,
24+ dataType : 'jsonp' ,
25+ success : function ( data )
26+ {
27+ var count = data . repositories . length ;
28+ data . repositories = data . repositories . sort ( function ( a , b )
29+ {
30+ var adate = new Date ( a . created_at ) . getTime ( ) ;
31+ var bdate = new Date ( b . created_at ) . getTime ( ) ;
32+ if ( adate < bdate ) return - 1 ;
33+ if ( adate > bdate ) return 1 ;
34+ return 0 ;
35+ } ) ;
36+
37+ for ( var i = 0 ; i < count ; i ++ )
38+ {
39+ var repo = data . repositories [ i ] ;
40+
41+ if ( repo . name != "code52.github.com" )
42+ getContribs ( repo . name ) ;
43+ }
44+ }
45+ } ) ;
46+ } ) ;
Original file line number Diff line number Diff line change 1+ ---
2+ layout: post
3+ title: Previous Projects
4+ ---
5+
6+ < script src ="http://code.jquery.com/jquery.min.js " type ="text/javascript "> </ script >
7+ < script type ="text/javascript " src ="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.js "> </ script >
8+ < script type ="text/javascript " src ="/js/contrib.js "> </ script >
9+
10+ < img style ="float:right; " src ="http://code52.org/DownmarkerWPF/icon.png " />
11+ ##[MarkPad](http://code52.org/DownmarkerWPF/)
12+ **Contributors**
13+
14+ < div id ="contributors "> </ div >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments