add trello ajax partial

This commit is contained in:
Michael Q Larson
2015-02-17 13:06:46 -08:00
parent 8e209d6bca
commit bc57bbdc37
2 changed files with 48 additions and 36 deletions

View File

@ -1,36 +1,35 @@
//h2.stats-text
// .row
// .col-xs-6.text-right Days since we launched:
// .col-xs-6.text-left= daysRunning
// .row
// .col-xs-6.text-right Nonprofit Projects:
// .col-xs-6.text-left= nonprofitProjects
// | &nbsp
// a(href="https://trello.com/b/BA3xVpz9/nonprofit-projects") (view them)
// .row
// .col-xs-6.text-right Open Issues:
// .col-xs-6.text-left= issues
// | &nbsp
// a(href="https://github.com/freecodecamp/freecodecamp/issues") (create one)
// .row
// .col-xs-6.text-right Pull Requests:
// .col-xs-6.text-left= pulls
// | &nbsp
// a(href="https://github.com/freecodecamp/freecodecamp/pulls") (create one)
// .row
// .col-xs-6.text-right Campers with at least...
// .col-xs-4
// .row
// .col-xs-6.text-right 3 Points:
// .col-xs-6.text-left= c3
// .row
// .col-xs-6.text-right 10 Points:
// .col-xs-6.text-left= c10
// .row
// .col-xs-6.text-right All 54 Points:
// .col-xs-6.text-left= all
// .row
// .col-xs-6.text-right Star our project here:
// .col-xs-6.text-left.github-button-container
// html.
// <iframe src="http://ghbtns.com/github-btn.html?user=freecodecamp&repo=freecodecamp&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>
h2.stats-text
.row
.col-xs-6.text-right Days since we launched:
.col-xs-6.text-left= daysRunning
.row
.col-xs-6.text-right Nonprofit Projects:
.col-xs-6.text-left
include ../partials/trello
//.row
// .col-xs-6.text-right Open Issues:
// .col-xs-6.text-left= issues
// | &nbsp
// a(href="https://github.com/freecodecamp/freecodecamp/issues") (create one)
//.row
// .col-xs-6.text-right Pull Requests:
// .col-xs-6.text-left= pulls
// | &nbsp
// a(href="https://github.com/freecodecamp/freecodecamp/pulls") (create one)
.row
.col-xs-6.text-right Campers with at least...
.col-xs-4
.row
.col-xs-6.text-right 3 Points:
.col-xs-6.text-left= c3
.row
.col-xs-6.text-right 10 Points:
.col-xs-6.text-left= c10
.row
.col-xs-6.text-right All 54 Points:
.col-xs-6.text-left= all
.row
.col-xs-6.text-right Star our project here:
.col-xs-6.text-left.github-button-container
html.
<iframe src="http://ghbtns.com/github-btn.html?user=freecodecamp&repo=freecodecamp&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>

View File

@ -0,0 +1,13 @@
#trello
script.
(function() {
$.ajax({
url: 'http://localhost:3001/api/trello',
type: 'GET'
}).done(
function(data) {
var trello = document.createElement('div');
$(trello).html(data.trello + ' <a href="https://trello.com/b/BA3xVpz9/nonprofit-projects">(view them)</a></h2></div>').prependTo($('#trello'))
}
);
})();