Merge branch 'courseware' into challenge-restructure
This commit is contained in:
2
app.js
2
app.js
@ -335,6 +335,8 @@ app.get('/privacy', function(req, res) {
|
|||||||
res.redirect(301, '/field-guide/what-is-the-free-code-camp-privacy-policy?');
|
res.redirect(301, '/field-guide/what-is-the-free-code-camp-privacy-policy?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get('/submit-cat-photo', resourcesController.catPhotoSubmit);
|
||||||
|
|
||||||
app.get('/api/slack', function(req, res) {
|
app.get('/api/slack', function(req, res) {
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
if (req.user.email) {
|
if (req.user.email) {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
"font-awesome": "~4.3.0",
|
"font-awesome": "~4.3.0",
|
||||||
"moment": "~2.10.2",
|
"moment": "~2.10.2",
|
||||||
"angular-bootstrap": "~0.13.0",
|
"angular-bootstrap": "~0.13.0",
|
||||||
"ramda": "~0.13.0"
|
"ramda": "~0.13.0",
|
||||||
|
"jshint": "~2.7.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ module.exports = {
|
|||||||
coursewareList = resources.allCoursewareNames();
|
coursewareList = resources.allCoursewareNames();
|
||||||
completedCoursewareList = noDuplicatedCoursewares;
|
completedCoursewareList = noDuplicatedCoursewares;
|
||||||
waypoints = coursewareList.filter(function(challenge) {
|
waypoints = coursewareList.filter(function(challenge) {
|
||||||
if (challenge.challengeType === 2) { return challenge }
|
if (challenge.challengeType === 2 || challenge.challengeType === 0) { return challenge }
|
||||||
});
|
});
|
||||||
ziplines = coursewareList.filter(function(challenge) {
|
ziplines = coursewareList.filter(function(challenge) {
|
||||||
if (challenge.challengeType === 3) { return challenge }
|
if (challenge.challengeType === 3) { return challenge }
|
||||||
|
@ -28,9 +28,6 @@ exports.returnNextCourseware = function(req, res, next) {
|
|||||||
if (!req.user) {
|
if (!req.user) {
|
||||||
return res.redirect('../challenges/learn-how-free-code-camp-works');
|
return res.redirect('../challenges/learn-how-free-code-camp-works');
|
||||||
}
|
}
|
||||||
if (req.user.finishedWaypoints && req.user.uncompletedBonfires.length > 0) {
|
|
||||||
return res.redirect('../bonfires')
|
|
||||||
}
|
|
||||||
|
|
||||||
var completed = req.user.completedCoursewares.map(function (elem) {
|
var completed = req.user.completedCoursewares.map(function (elem) {
|
||||||
return elem._id;
|
return elem._id;
|
||||||
@ -46,7 +43,6 @@ exports.returnNextCourseware = function(req, res, next) {
|
|||||||
|
|
||||||
var uncompletedCoursewares = req.user.uncompletedCoursewares[0];
|
var uncompletedCoursewares = req.user.uncompletedCoursewares[0];
|
||||||
|
|
||||||
|
|
||||||
var displayedCoursewares = Courseware.find({'_id': uncompletedCoursewares});
|
var displayedCoursewares = Courseware.find({'_id': uncompletedCoursewares});
|
||||||
displayedCoursewares.exec(function(err, courseware) {
|
displayedCoursewares.exec(function(err, courseware) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -207,6 +207,10 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
catPhotoSubmit: function catPhotoSubmit(req, res) {
|
||||||
|
res.send('Success! You have submitted your cat photo. Return to your website by typing any letter into your code editor.')
|
||||||
|
},
|
||||||
|
|
||||||
nonprofits: function nonprofits(req, res) {
|
nonprofits: function nonprofits(req, res) {
|
||||||
res.render('resources/nonprofits', {
|
res.render('resources/nonprofits', {
|
||||||
title: 'A guide to our Nonprofit Projects'
|
title: 'A guide to our Nonprofit Projects'
|
||||||
|
@ -107,11 +107,11 @@ var tests = tests || [];
|
|||||||
var allSeeds = '';
|
var allSeeds = '';
|
||||||
(function() {
|
(function() {
|
||||||
challengeSeed.forEach(function(elem) {
|
challengeSeed.forEach(function(elem) {
|
||||||
allSeeds += elem + '\n';
|
allSeeds += elem.replace(/fccss/g, '<script>').replace(/fcces/g,'</script>') + '\n';
|
||||||
});
|
});
|
||||||
|
editor.setValue(allSeeds);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
editor.setValue(allSeeds);
|
|
||||||
|
|
||||||
function doLinting () {
|
function doLinting () {
|
||||||
editor.operation(function () {
|
editor.operation(function () {
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ block content
|
|||||||
script(type='text/javascript', src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
script(type='text/javascript', src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
||||||
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/lint.js')
|
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/lint.js')
|
||||||
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
||||||
script(type='text/javascript', src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js')
|
script(type='text/javascript', src='/bower_components/jshint/dist/jshint.js')
|
||||||
script(type='text/javascript', src='/js/lib/chai/chai.js')
|
script(type='text/javascript', src='/js/lib/chai/chai.js')
|
||||||
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
||||||
link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
|
link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
|
||||||
|
@ -5,7 +5,7 @@ block content
|
|||||||
script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
||||||
script(src='/js/lib/codemirror/addon/lint/lint.js')
|
script(src='/js/lib/codemirror/addon/lint/lint.js')
|
||||||
script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
||||||
script(src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js')
|
script(src='/bower_components/jshint/dist/jshint.js')
|
||||||
script(src='/js/lib/chai/chai.js')
|
script(src='/js/lib/chai/chai.js')
|
||||||
script(src='/js/lib/chai/chai-jquery.js')
|
script(src='/js/lib/chai/chai-jquery.js')
|
||||||
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
||||||
|
@ -5,7 +5,7 @@ block content
|
|||||||
script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
||||||
script(src='/js/lib/codemirror/addon/lint/lint.js')
|
script(src='/js/lib/codemirror/addon/lint/lint.js')
|
||||||
script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
||||||
script(src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js')
|
script(src='/bower_components/jshint/dist/jshint.js')
|
||||||
script(src='/js/lib/chai/chai.js')
|
script(src='/js/lib/chai/chai.js')
|
||||||
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
||||||
link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
|
link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
|
||||||
|
@ -3,6 +3,11 @@ block content
|
|||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-12.col-md-4.bonfire-top
|
.col-xs-12.col-sm-12.col-md-4.bonfire-top
|
||||||
h1.text-center= name
|
h1.text-center= name
|
||||||
|
p.text-center Tips: Use 
|
||||||
|
a(href='/field-guide/how-do-i-get-help-when-I-get-stuck' target='_blank') RSAP
|
||||||
|
| . Try using  
|
||||||
|
a(href='http://api.jquery.com/jquery.each/' target='_blank') jQuery's $.getJSON()
|
||||||
|
|  to consume APIs.
|
||||||
.well
|
.well
|
||||||
h4
|
h4
|
||||||
ol
|
ol
|
||||||
|
Reference in New Issue
Block a user