diff --git a/controllers/resources.js b/controllers/resources.js index 99844a3095..54d566daf6 100644 --- a/controllers/resources.js +++ b/controllers/resources.js @@ -148,6 +148,9 @@ module.exports = { var timeDiff = Math.abs(date2.getTime() - date1.getTime()); var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24)); var announcements = resources.announcements; + function numberWithCommas(x) { + return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + } User.count({}, function (err, c3) { if (err) { debug('User err: ', err); @@ -158,10 +161,11 @@ module.exports = { debug('User err: ', err); next(err); } + res.render('resources/learn-to-code', { title: 'About Free Code Camp and Our Team of Volunteers', daysRunning: daysRunning, - c3: c3, + c3: numberWithCommas(c3), all: all, announcements: announcements }); diff --git a/public/css/main.less b/public/css/main.less index 82c2ba2b90..a76f1642d9 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -739,6 +739,10 @@ iframe.iphone { margin-left: -5px; } +.tight-h3 { + line-height: 0.5em; +} + //uncomment this to see the dimensions of all elements outlined in red //* { // border-color: red; diff --git a/views/partials/blogger.jade b/views/partials/blogger.jade index b77891fbe2..f2570c95bd 100644 --- a/views/partials/blogger.jade +++ b/views/partials/blogger.jade @@ -9,7 +9,7 @@ script. var props = Object.keys(data); for (var i = 0; i < props.length; i+=2) { var blogger = document.createElement('div'); - $(blogger).html('

' + data[props[i]] + '

').prependTo($('#blog')) + $(blogger).html('

' + data[props[i]] + '

').appendTo($('#blog')) } } ); diff --git a/views/partials/footer.jade b/views/partials/footer.jade index 95bb374ac0..f5e6b36523 100644 --- a/views/partials/footer.jade +++ b/views/partials/footer.jade @@ -7,7 +7,6 @@ a.ion-social-facebook(href="http://facebook.com/freecodecamp", target='_blank')  Facebook   a.ion-information-circled(href="/learn-to-code")  About   a.ion-locked(href="/privacy")  Privacy   - a(href="#" onclick="TogetherJS(this); return false;")   .col-xs-12.visible-xs.visible-sm a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank') span.sr-only Free Code Camp's Blog diff --git a/views/partials/github.jade b/views/partials/github.jade index 51a549c290..5336774f95 100644 --- a/views/partials/github.jade +++ b/views/partials/github.jade @@ -7,7 +7,7 @@ script. }).done( function(data) { var github = document.createElement('div'); - $(github).html('
Open GitHub Issues:
' + data.issues + ' (create one)
Open Pull Requests:
' + data.pulls + ' (create one)
').prependTo($('#github')) + $(github).html('

' + data.issues + ' GitHub issues are open. (create one)

' + data.pulls + ' pull requests are open. (create one)').prependTo($('#github')) } ); })(); \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index d58a425e62..221abeebf0 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -19,8 +19,6 @@ a(href='http://forum.freecodecamp.com' target='_blank') Forum li a(href='/bonfires') Bonfires - //li - // a(href="#" onclick="TogetherJS(this); return false;") Pair if !user li       li diff --git a/views/partials/trello.jade b/views/partials/trello.jade index a89abae24e..5e9218ac08 100644 --- a/views/partials/trello.jade +++ b/views/partials/trello.jade @@ -7,7 +7,7 @@ script. }).done( function(data) { var trello = document.createElement('div'); - $(trello).html(data.trello + ' (view them)

').prependTo($('#trello')) + $(trello).html('

We help ' + data.trello + ' nonprofits. (view them)

').prependTo($('#trello')) } ); })(); \ No newline at end of file diff --git a/views/resources/learn-to-code.jade b/views/resources/learn-to-code.jade index 20957e1269..c3ba9747f6 100644 --- a/views/resources/learn-to-code.jade +++ b/views/resources/learn-to-code.jade @@ -12,35 +12,24 @@ block content .col-xs-12.col-sm-12.col-md-4 .panel.panel-info .panel-heading.landing-panel-heading.text-center Get Connected - .panel-body + .panel-body.text-center.tight-h3 img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-chatroom.jpg" alt="A screen shot from Free Code Camp's main chat room") - h3 - .row - .col-xs-9.text-right Campers doing challenges: - .col-xs-3.text-left= c3 - .row - .col-xs-9.text-right Campers coding for nonprofits: - .col-xs-3.text-left= all + h3.tight-h3 #{c3} campers are doing challenges. + h3.tight-h3 #{all} campers are coding for nonprofits. .col-xs-12.col-sm-12.col-md-4 .panel.panel-info .panel-heading.landing-panel-heading.text-center Learn JavaScript - .panel-body + .panel-body.text-center.tight-h3 img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-github.jpg" alt="A screen shot of a GitHub commit graph showing a streak of 33 consecutive days of contributions") - h3 - include ../partials/github + include ../partials/github .col-xs-12.col-sm-12.col-md-4 .panel.panel-info .panel-heading.landing-panel-heading.text-center Help Nonprofits - .panel-body + .panel-body.text-center img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-trello.jpg" alt="a screen shot of Free Code Camp's nonprofit project Trello board showing several active projects") - h3 - .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 + h3.tight-h3 We launched #{daysRunning} days ago. + include ../partials/trello + br script.