Merge branch 'master' into bonfire
This commit is contained in:
10
app.js
10
app.js
@ -228,16 +228,22 @@ app.post('/email-signup', userController.postEmailSignup);
|
||||
app.post('/email-signin', userController.postLogin);
|
||||
app.get('/nonprofits', contactController.getNonprofitsForm);
|
||||
app.post('/nonprofits', contactController.postNonprofitsForm);
|
||||
|
||||
app.get(
|
||||
'/done-with-first-100-hours',
|
||||
passportConf.isAuthenticated,
|
||||
contactController.getDoneWithFirst100Hours
|
||||
);
|
||||
app.post(
|
||||
'/done-with-first-100-hours',
|
||||
passportConf.isAuthenticated,
|
||||
contactController.postDoneWithFirst100Hours
|
||||
);
|
||||
|
||||
// # Protected routes, user must be logged in.
|
||||
app.get(
|
||||
'/nonprofit-project-instructions',
|
||||
passportConf.isAuthenticated,
|
||||
resourcesController.nonprofitProjectInstructions
|
||||
);
|
||||
app.post(
|
||||
'/update-progress',
|
||||
passportConf.isAuthenticated,
|
||||
|
@ -24,6 +24,25 @@ exports.returnChallenge = function(req, res, next) {
|
||||
'ANNIHILATED',
|
||||
'NUKED'
|
||||
];
|
||||
var compliments = [
|
||||
"You've got the power!",
|
||||
"Nicely done!",
|
||||
"Rock and roll!",
|
||||
"High five!",
|
||||
"Bravo!",
|
||||
"Encore!",
|
||||
"Challenge destroyed!",
|
||||
"Power level 9000!",
|
||||
"Most efficient!",
|
||||
"Party on Wayne!",
|
||||
"You've got the touch!",
|
||||
"You're on fire!",
|
||||
"Don't hurt 'em, Hammer!",
|
||||
"The town is now red",
|
||||
"To the nines!",
|
||||
"Nothing but net!",
|
||||
"Even grumpy cat is impressed"
|
||||
];
|
||||
var phrases = [
|
||||
"Shout it from on top of a mountain",
|
||||
"Tell everyone and their dogs",
|
||||
|
@ -47,10 +47,15 @@ module.exports = {
|
||||
},
|
||||
|
||||
getDoneWithFirst100Hours: function(req, res) {
|
||||
res.render('contact/done-with-first-100-hours', {
|
||||
title:
|
||||
'Congratulations on finishing the first 100 hours of Free Code Camp!'
|
||||
});
|
||||
console.log(req.user.points)
|
||||
if (req.user.points >= 53) {
|
||||
res.render('contact/done-with-first-100-hours', {
|
||||
title: 'Congratulations on finishing the first 100 hours of Free Code Camp!'
|
||||
});
|
||||
} else {
|
||||
req.flash('errors', {msg: 'Hm... have you finished all the challenges?'});
|
||||
res.redirect('/');
|
||||
}
|
||||
},
|
||||
|
||||
postDoneWithFirst100Hours: function(req, res) {
|
||||
@ -68,7 +73,7 @@ module.exports = {
|
||||
return res.redirect('/done-with-first-100-hours');
|
||||
}
|
||||
req.flash('success', {msg: 'Email has been sent successfully!'});
|
||||
res.redirect('/');
|
||||
res.redirect('/nonprofit-project-instructions');
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
@ -52,6 +52,12 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
nonprofitProjectInstructions: function nonprofitProjectInstructions(req, res) {
|
||||
res.render('resources/nonprofit-project-instructions', {
|
||||
title: 'Nonprofit Project Instructions'
|
||||
});
|
||||
},
|
||||
|
||||
gmailShortcuts: function gmailShortcuts(req, res) {
|
||||
res.render('resources/gmail-shortcuts', {
|
||||
title: 'These Gmail Shortcuts will save you Hours'
|
||||
|
@ -255,7 +255,7 @@ exports.returnUser = function(req, res, next) {
|
||||
});
|
||||
} else {
|
||||
req.flash('errors', {
|
||||
msg: "We couldn't find a Code Camper with that username."
|
||||
msg: "404: We couldn't find a page with that url. Please double check the link."
|
||||
});
|
||||
return res.redirect('/');
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ block content
|
||||
.animated.fadeIn.delay-2
|
||||
h2 You've completed the first 100 hours of Free Code Camp!
|
||||
.animated.fadeIn.delay-4
|
||||
h3 Now you're ready to continue your learning by building solutions for nonprofits! If you've completed all the Free Code Camp challenges and the Easy and Medium CoderByte challenges, enter your email below. We'll send you an email with the next steps.
|
||||
h3 Now you're ready to continue your learning by building solutions for nonprofits!
|
||||
h3 First, please enter your email below.
|
||||
br
|
||||
form.form-horizontal(role='form', action="/done-with-first-100-hours/", method='POST', novalidate='novalidate', name='doneWithFirst100HoursForm')
|
||||
input(type='hidden', name='_csrf', value=_csrf)
|
||||
|
@ -5,4 +5,4 @@ h3
|
||||
a(href="/challenges/#{challenge.challengeNumber}", class="#{ (cc && cc[challenge.challengeNumber] > 0) ? 'strikethrough' : '' }") #{challenge.name}
|
||||
| (#{challenge.time} mins)
|
||||
|
||||
a.btn.btn-lg.btn-primary.btn-block(href="/done-with-first-100-hours", class="#{ ((cc && cc[53] === 0) || (!cc)) ? 'disabled' : '' }") I'm done with all the challenges!
|
||||
a.btn.btn-lg.btn-primary.btn-block(href="/done-with-first-100-hours", class="#{ ((points && points < 54) || (!points)) ? 'disabled' : '' }") I'm done with all the challenges!
|
21
views/resources/nonprofit-project-instructions.jade
Normal file
21
views/resources/nonprofit-project-instructions.jade
Normal file
@ -0,0 +1,21 @@
|
||||
extends ../layout
|
||||
block content
|
||||
.jumbotron
|
||||
.col-sm-offset-1
|
||||
h1 Nonprofit projects
|
||||
h3 It's time to apply what you've learned here at Free Code Camp.
|
||||
h3 By the end of this process, you'll have a portfolio of live apps being used by real people.
|
||||
h3 Please do the following immediately:
|
||||
h4
|
||||
ol
|
||||
li Complete this form:
|
||||
a(href="http://goo.gl/forms/f61dLt67t8" target="_blank") http://goo.gl/forms/f61dLt67t8
|
||||
| .
|
||||
li Read this document, which will answer many questions you may have about our nonprofit projects:
|
||||
a(href="http://forum.freecodecamp.com/t/an-introduction-to-our-nonprofit-projects/856" target="_blank") http://forum.freecodecamp.com/t/an-introduction-to-our-nonprofit-projects/856
|
||||
| .
|
||||
li We'll send you an invite to our Nonprofit Projects Trello board. Once we do, go there and add yourself to each of the nonprofit projects that interests you.
|
||||
li Finish any unfinished easy and medium coderbyte challenges. These challenges serve as the Free Code Camp "exit test". You must be complete these before you can start working on nonprofit projects.
|
||||
h4 Please email us if you have further questions:
|
||||
a(href="mailto:team@freecodecamp.com") team@freecodecamp.com
|
||||
| .
|
Reference in New Issue
Block a user