Merge branch 'master' into courseware
Conflicts: controllers/bonfire.js controllers/resources.json views/bonfire/show.jade
This commit is contained in:
@@ -62,7 +62,7 @@ exports.returnNextBonfire = function(req, res) {
|
||||
if (bonfire === undefined) {
|
||||
req.flash('errors', {
|
||||
msg: "It looks like you've completed all the bonfires we have available. Good job!"
|
||||
})
|
||||
});
|
||||
return res.redirect('../bonfires/meet-bonfire');
|
||||
}
|
||||
nameString = bonfire.name.toLowerCase().replace(/\s/g, '-');
|
||||
@@ -79,38 +79,43 @@ exports.returnIndividualBonfire = function(req, res, next) {
|
||||
if (err) {
|
||||
next(err);
|
||||
}
|
||||
|
||||
|
||||
if (bonfire.length < 1) {
|
||||
req.flash('errors', {
|
||||
msg: "404: We couldn't find a bonfire with that name. Please double check the name."
|
||||
});
|
||||
|
||||
return res.redirect('/bonfires');
|
||||
}
|
||||
|
||||
bonfire = bonfire.pop()
|
||||
var dashedNameFull = bonfire.name.toLowerCase().replace(/\s/g, '-');
|
||||
if (dashedNameFull != dashedName) {
|
||||
return res.redirect('../bonfires/' + dashedNameFull);
|
||||
}
|
||||
if (bonfire.length < 1) {
|
||||
req.flash('errors', {
|
||||
msg: "404: We couldn't find a bonfire with that name. Please double check the name."
|
||||
});
|
||||
return res.redirect('/bonfires')
|
||||
} else {
|
||||
res.render('bonfire/show', {
|
||||
completedWith: null,
|
||||
title: bonfire.name,
|
||||
dashedName: dashedName,
|
||||
name: bonfire.name,
|
||||
difficulty: Math.floor(+bonfire.difficulty),
|
||||
brief: bonfire.description[0],
|
||||
details: bonfire.description.slice(1),
|
||||
tests: bonfire.tests,
|
||||
challengeSeed: bonfire.challengeSeed,
|
||||
challengeEntryPoint: bonfire.challengeEntryPoint,
|
||||
cc: !!req.user,
|
||||
points: req.user ? req.user.points : undefined,
|
||||
verb: resources.randomVerb(),
|
||||
phrase: resources.randomPhrase(),
|
||||
compliment: resources.randomCompliment(),
|
||||
bonfires: bonfire,
|
||||
bonfireHash: bonfire._id
|
||||
|
||||
});
|
||||
}
|
||||
res.render('bonfire/show', {
|
||||
completedWith: null,
|
||||
title: bonfire.name,
|
||||
dashedName: dashedName,
|
||||
name: bonfire.name,
|
||||
difficulty: Math.floor(+bonfire.difficulty),
|
||||
brief: bonfire.description[0],
|
||||
details: bonfire.description.slice(1),
|
||||
tests: bonfire.tests,
|
||||
challengeSeed: bonfire.challengeSeed,
|
||||
challengeEntryPoint: bonfire.challengeEntryPoint,
|
||||
cc: !!req.user,
|
||||
points: req.user ? req.user.points : undefined,
|
||||
verb: resources.randomVerb(),
|
||||
phrase: resources.randomPhrase(),
|
||||
compliment: resources.randomCompliment(),
|
||||
bonfires: bonfire,
|
||||
bonfireHash: bonfire._id
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
@@ -164,6 +164,7 @@
|
||||
"Down the rabbit hole we go!",
|
||||
"Well, isn't that special!",
|
||||
"Somewhere over the rainbow!",
|
||||
"Follow the white rabbit!",
|
||||
"Eye of the tiger!",
|
||||
"Run, Forest, run!",
|
||||
"Welcome to the Rock!",
|
||||
@@ -214,6 +215,7 @@
|
||||
"It's alive. It's alive!",
|
||||
"Sonic Boom!",
|
||||
"Here's looking at you, Code!",
|
||||
"Ride like the wind!",
|
||||
"The more you code!",
|
||||
"Legen - wait for it - dary!",
|
||||
"Ludicrous Speed! Go!",
|
||||
@@ -224,7 +226,28 @@
|
||||
"By the power of Grayskull!",
|
||||
"You did it!",
|
||||
"Storm that castle!",
|
||||
"Face-melting guitar Solo!"
|
||||
"Face-melting guitar Solo!",
|
||||
"Checkmate!",
|
||||
"Remember the Alamo!",
|
||||
"Bodacious!",
|
||||
"You're the man now, dog!",
|
||||
"Tubular!",
|
||||
"You're outta sight!",
|
||||
"Keep calm and code on!",
|
||||
"Even sad panda smiles!",
|
||||
"Even grumpy cat approves!",
|
||||
"Koolaid Man says oh yeah!",
|
||||
"Bullseye!",
|
||||
"You stay classy, San Diego!",
|
||||
"Loud noises!",
|
||||
"Me want cookie!",
|
||||
"Far out!",
|
||||
"You're heating up!",
|
||||
"Crash override!",
|
||||
"This is Sparta!",
|
||||
"You ARE the law!",
|
||||
"Hasta la vista, challenge!",
|
||||
"Huh? It's just a box..."
|
||||
],
|
||||
"phrases": [
|
||||
"Shout it from on top of a mountain",
|
||||
|
Reference in New Issue
Block a user