Merge pull request #363 from FreeCodeCamp/root

Root
This commit is contained in:
Nathan
2015-04-24 19:16:43 -04:00
20 changed files with 208 additions and 262 deletions

9
app.js
View File

@ -85,11 +85,12 @@ console.log(process.env.NODE_ENV);
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
app.all(/.*/, function (req, res, next) { app.all(/.*/, function (req, res, next) {
var host = req.header("host"); var host = req.header('host');
var originalUrl = req['originalUrl'];
if (host.match(/^www\..*/i)) { if (host.match(/^www\..*/i)) {
next(); next();
} else { } else {
res.redirect(301, "http://www." + host); res.redirect(301, "http://www." + host + originalUrl);
} }
}); });
} }
@ -297,9 +298,9 @@ app.get('/nodeschool-challenges', function(req, res) {
app.get('/news', function(req, res) { app.get('/news', function(req, res) {
res.redirect(301, '/stories/hot'); res.redirect(301, '/stories/hot');
}); });
app.get('/learn-to-code', resourcesController.about); app.get('/learn-to-code', challengeMapController.challengeMap);
app.get('/about', function(req, res) { app.get('/about', function(req, res) {
res.redirect(301, '/learn-to-code'); res.redirect(301, '/map');
}); });
app.get('/signin', userController.getSignin); app.get('/signin', userController.getSignin);

View File

@ -52,14 +52,31 @@ module.exports = {
if (challenge.challengeType === 4) { return challenge } if (challenge.challengeType === 4) { return challenge }
}); });
res.render('challengeMap/show', { function numberWithCommas(x) {
title: "A map of all Free Code Camp's Challenges", return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
bonfires: bonfireList, }
waypoints: waypoints,
ziplines: ziplines, var date1 = new Date("10/15/2014");
basejumps: basejumps, var date2 = new Date();
completedBonfireList: completedBonfireList, var timeDiff = Math.abs(date2.getTime() - date1.getTime());
completedCoursewareList: completedCoursewareList var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24));
User.count({}, function (err, camperCount) {
if (err) {
debug('User err: ', err);
return next(err);
}
res.render('challengeMap/show', {
daysRunning: daysRunning,
camperCount: numberWithCommas(camperCount),
title: "A map of all Free Code Camp's Challenges",
bonfires: bonfireList,
waypoints: waypoints,
ziplines: ziplines,
basejumps: basejumps,
completedBonfireList: completedBonfireList,
completedCoursewareList: completedCoursewareList
});
}); });
} }
}; };

View File

@ -1,59 +0,0 @@
/**
* GET /
* Challenges.
*/
var _ = require('lodash'),
debug = require('debug')('freecc:cntr:challenges'),
Challenge = require('./../models/Challenge'),
resources = require('./resources');
var highestChallengeNumber = 53;
exports.returnNextChallenge = function(req, res) {
if (req.user) {
ch = req.user.challengesHash;
if (req.user.challengesHash[0] > 0) {
var max = Object.keys(ch).reduce(function(max, key) {
return (max === undefined || ch[key] > ch[max]) ? +key : max;
});
nextChallenge = max + 1;
res.redirect('challenges/' + nextChallenge);
} else {
res.redirect('challenges/0');
}
} else {
return res.redirect('../challenges/0');
}
};
exports.returnChallenge = function(req, res, next) {
var challengeNumber = parseInt(req.params.challengeNumber) || 0;
if (challengeNumber > highestChallengeNumber) {
req.flash('errors', {
msg: "It looks like you've either completed all the challenges we have available or requested a challenge we don't have."
});
return res.redirect('../challenges/0');
}
Challenge.find({}, null, { sort: { challengeNumber: 1 } }, function(err, c) {
if (err) {
debug('Challenge err: ', err);
return next(err);
}
res.render('challenges/show', {
title: 'Challenge: ' + c[challengeNumber].name,
name: c[challengeNumber].name,
video: c[challengeNumber].video,
time: c[challengeNumber].time,
steps: c[challengeNumber].steps,
number: challengeNumber,
cc: req.user ? req.user.challengesHash : undefined,
points: req.user ? req.user.points : undefined,
verb: resources.randomVerb(),
phrase: resources.randomPhrase(),
compliment: resources.randomCompliment(),
challenges: c
});
});
};

View File

@ -28,6 +28,10 @@ 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;
}); });
@ -247,6 +251,9 @@ exports.completedCourseware = function (req, res, next) {
var isCompletedDate = Math.round(+new Date()); var isCompletedDate = Math.round(+new Date());
var coursewareHash = req.body.coursewareInfo.coursewareHash; var coursewareHash = req.body.coursewareInfo.coursewareHash;
if (coursewareHash === "bd7139d8c441eddfaeb5bdef") {
req.user.finishedWaypoints = true;
}
req.user.completedCoursewares.push({ req.user.completedCoursewares.push({
_id: coursewareHash, _id: coursewareHash,

View File

@ -5,7 +5,7 @@
exports.index = function(req, res) { exports.index = function(req, res) {
if (req.user) { if (req.user) {
res.redirect('/challenges/') res.redirect('/map')
} else { } else {
res.render('home', { res.render('home', {
title: 'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits' title: 'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits'

View File

@ -140,6 +140,7 @@ var userSchema = new mongoose.Schema({
default: 0 default: 0
}, },
needsMigration: { type: Boolean, default: true }, needsMigration: { type: Boolean, default: true },
finishedWaypoints: { type: Boolean, default: false },
challengesHash: {} challengesHash: {}
}); });

View File

@ -273,11 +273,6 @@ ul {
height: 30px; height: 30px;
margin-top: -5px; margin-top: -5px;
} }
@media (min-width: 767px) and (max-width: 890px) {
height: 30px;
margin-top: -5px;
}
} }
.navbar-right { .navbar-right {
@ -790,10 +785,52 @@ iframe.iphone {
transition: background .2s ease-in-out, border .2s ease-in-out; transition: background .2s ease-in-out, border .2s ease-in-out;
} }
@media (max-width: 991px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse.collapse {
display: none !important;
}
.navbar-nav {
float: none !important;
margin: 7.5px -15px;
}
.navbar-nav > li {
float: none;
}
.navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar-text {
float: none;
margin: 15px 0;
}
/* since 3.1.0 */
.navbar-collapse.collapse.in {
display: block !important;
}
.collapsing {
overflow: hidden !important;
}
}
.hamburger { .hamburger {
width: 80px; width: 80px;
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 8px;
margin-left: 0px; margin-left: 0px;
margin-right: 2px; margin-right: 2px;
text-align:left; text-align:left;
@ -804,7 +841,7 @@ iframe.iphone {
line-height: 0.75em; line-height: 0.75em;
margin-top: 10px; margin-top: 10px;
font-size: 16px; font-size: 16px;
margin-left: -5px; margin-left: -8px;
} }
.tight-h3 { .tight-h3 {

View File

@ -4,13 +4,6 @@ $(document).ready(function() {
ga('send', 'event', 'Challenge', 'load', challengeName); ga('send', 'event', 'Challenge', 'load', challengeName);
} }
// When introducing a new announcement, change the localStorage attribute
// and the HTML located in the footer
if (!localStorage || !localStorage.nodeSchoolAnnouncement) {
$('#announcementModal').modal('show');
localStorage.fccShowAnnouncement = "true";
}
var CSRF_HEADER = 'X-CSRF-Token'; var CSRF_HEADER = 'X-CSRF-Token';
var setCSRFToken = function(securityToken) { var setCSRFToken = function(securityToken) {
@ -204,10 +197,6 @@ $(document).ready(function() {
} }
}); });
$('.all-challenges').on('click', function() {
$('#show-all-dialog').modal('show');
});
$('#showAllButton').on('click', function() { $('#showAllButton').on('click', function() {
$('#show-all-dialog').modal('show'); $('#show-all-dialog').modal('show');
}); });
@ -217,7 +206,7 @@ $(document).ready(function() {
window.location = '/challenges/' + (parseInt(l[l.length - 1]) + 1); window.location = '/challenges/' + (parseInt(l[l.length - 1]) + 1);
}); });
// Bonfire instructions functions // Bonfire instructions functions
$('#more-info').on('click', function() { $('#more-info').on('click', function() {
ga('send', 'event', 'Challenge', 'more-info', challengeName); ga('send', 'event', 'Challenge', 'more-info', challengeName);
$('#brief-instructions').hide(); $('#brief-instructions').hide();

View File

@ -532,7 +532,7 @@
"_id": "bd7153d8c441eddfaeb5bdff", "_id": "bd7153d8c441eddfaeb5bdff",
"name": "Start a Node.js Server", "name": "Start a Node.js Server",
"difficulty": 0.39, "difficulty": 0.39,
"challengeSeed": "", "challengeSeed": "114685061",
"description": [ "description": [
"We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.",
"If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.", "If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.",
@ -556,7 +556,7 @@
"_id": "bd7153d8c441eddfaeb5bd0f", "_id": "bd7153d8c441eddfaeb5bd0f",
"name": "Manage Packages with NPM", "name": "Manage Packages with NPM",
"difficulty": 0.40, "difficulty": 0.40,
"challengeSeed": "", "challengeSeed": "114685061",
"description": [ "description": [
"We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.",
"If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.", "If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.",
@ -580,7 +580,7 @@
"_id": "bd7153d8c441eddfaeb5bd1f", "_id": "bd7153d8c441eddfaeb5bd1f",
"name": "Build Web Apps with Express.js", "name": "Build Web Apps with Express.js",
"difficulty": 0.41, "difficulty": 0.41,
"challengeSeed": "", "challengeSeed": "114685061",
"description": [ "description": [
"We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.",
"If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.", "If you don't already have Cloud 9 account, create one now at <a href='http://c9.io' target='_blank'>http://c9.io</a>.",
@ -634,10 +634,8 @@
"Go to <a href='http://freecodecamp.com/bonfires' target='_blank'>http://freecodecamp.com/bonfires</a> and start working through our Bonfire challenges.", "Go to <a href='http://freecodecamp.com/bonfires' target='_blank'>http://freecodecamp.com/bonfires</a> and start working through our Bonfire challenges.",
"Once you you finish pair programming, end the session in Screen Hero session.", "Once you you finish pair programming, end the session in Screen Hero session.",
"Congratulations! You have completed your first pair programming session.", "Congratulations! You have completed your first pair programming session.",
"Pair program as much as possible with different campers until you've completed all the Bonfire, Zipline and Basejump challenges. This is a big time investment, but the JavaScript practice you get will be well worth it!", "Pair program as much as possible with different campers until you've completed all the Bonfire challenges. This is a big time investment, but the JavaScript practice you get will be well worth it!",
"Mark this challenge as complete and move on to the Bonfires.", "Mark this challenge as complete and move on to the Bonfires."
"Keep in mind, the Bonfires are a significant challenge in and of themselves. You are not expected to complete them in one sitting, or to complete them before moving on to our next challenges. Mix them in as you keep learning and have fun!",
"In order to participate in our non-profit projects you will need to have successfully completed all \"3 flame\" bonfires and below. Lastly, completing bonfires is not meant to be a sisyphean task. You won't be required to complete new bonfires that are of lower difficuly than you've already completed!"
], ],
"challengeType": 2, "challengeType": 2,
"tests": [] "tests": []
@ -681,7 +679,7 @@
"<span class='text-info'>Hint:</span> The relevant documentation about this API call is here: <a href='https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel' target='_blank'>https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel</a>.", "<span class='text-info'>Hint:</span> The relevant documentation about this API call is here: <a href='https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel' target='_blank'>https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel</a>.",
"<span class='text-info'>Hint:</span> Here's an array of the Twitch.tv usernames of people who regularly stream coding: <code>[\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"notmichaelmcdonald\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"joe_at_underflow\",\"noobs2ninjas\",\"mdwasp\",\"beohoff\",\"xenocomagain\"]</code>", "<span class='text-info'>Hint:</span> Here's an array of the Twitch.tv usernames of people who regularly stream coding: <code>[\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"notmichaelmcdonald\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"joe_at_underflow\",\"noobs2ninjas\",\"mdwasp\",\"beohoff\",\"xenocomagain\"]</code>",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -700,7 +698,7 @@
"<span class='text-info'>User Story:</span> As a user, I can click a button to show me a new random quote.", "<span class='text-info'>User Story:</span> As a user, I can click a button to show me a new random quote.",
"<span class='text-info'>Bonus User Story:</span> As a user, I can press a button to tweet out a quote.", "<span class='text-info'>Bonus User Story:</span> As a user, I can press a button to tweet out a quote.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -723,7 +721,7 @@
"<span class='text-info'>Hint:</span> Get a zipcode's weather (in Kelvin) at <code>http://api.openweathermap.org/data/2.5/weather?q=99705</code>.", "<span class='text-info'>Hint:</span> Get a zipcode's weather (in Kelvin) at <code>http://api.openweathermap.org/data/2.5/weather?q=99705</code>.",
"<span class='text-info'>Hint:</span> Get your current user's zipcode (based on their IP address) with this line of jQuery: <code>$.get(\"http://ipinfo.io\", function(response) {}, \"jsonp\");</code>", "<span class='text-info'>Hint:</span> Get your current user's zipcode (based on their IP address) with this line of jQuery: <code>$.get(\"http://ipinfo.io\", function(response) {}, \"jsonp\");</code>",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -745,7 +743,7 @@
"<span class='text-info'>Bonus User Story:</span> As a user, I can see how many upvotes each story has.", "<span class='text-info'>Bonus User Story:</span> As a user, I can see how many upvotes each story has.",
"<span class='text-info'>Hint:</span> Here's the Camper News Hot Stories API endpoint: <code>http://www.freecodecamp.com/stories/hotStories</code>.", "<span class='text-info'>Hint:</span> Here's the Camper News Hot Stories API endpoint: <code>http://www.freecodecamp.com/stories/hotStories</code>.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -766,7 +764,7 @@
"<span class='text-info'>Bonus User Story:</span>As a user, when I type in the search box, I can see a dropdown with autocomplete options for matching wikipedia entries.", "<span class='text-info'>Bonus User Story:</span>As a user, when I type in the search box, I can see a dropdown with autocomplete options for matching wikipedia entries.",
"<span class='text-info'>Hint:</span> Here's an entry on using Wikipedia's API: <code>http://www.mediawiki.org/wiki/API:Main_page</code>.", "<span class='text-info'>Hint:</span> Here's an entry on using Wikipedia's API: <code>http://www.mediawiki.org/wiki/API:Main_page</code>.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -786,7 +784,7 @@
"<span class='text-info'>Bonus User Story:</span> As a user, I can reset the clock for my next pomodoro.", "<span class='text-info'>Bonus User Story:</span> As a user, I can reset the clock for my next pomodoro.",
"<span class='text-info'>Bonus User Story:</span> As a user, I can customize the length of each pomodoro.", "<span class='text-info'>Bonus User Story:</span> As a user, I can customize the length of each pomodoro.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -806,7 +804,7 @@
"<span class='text-info'>Bonus User Story:</span> I can clear the input field with a clear button.", "<span class='text-info'>Bonus User Story:</span> I can clear the input field with a clear button.",
"<span class='text-info'>Bonus User Story:</span> I can keep chaining mathematical operations together until I hit the clear button and it will tell me the correct output.", "<span class='text-info'>Bonus User Story:</span> I can keep chaining mathematical operations together until I hit the clear button and it will tell me the correct output.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -827,7 +825,7 @@
"<span class='text-info'>Bonus User Story:</span> As a user, I can choose whether I want to play as X or O.", "<span class='text-info'>Bonus User Story:</span> As a user, I can choose whether I want to play as X or O.",
"<span class='text-info'>Hint:</span> Here's an example call to Twitch.tv's JSON API: <code>https://api.twitch.tv/kraken/streams/freecodecamp</code>.", "<span class='text-info'>Hint:</span> Here's an example call to Twitch.tv's JSON API: <code>https://api.twitch.tv/kraken/streams/freecodecamp</code>.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 3, "challengeType": 3,
"tests": [] "tests": []
@ -909,7 +907,7 @@
"<span class='text-info'>Bonus User Story:</span> As an unauthenticated or authenticated user, I can see the in chart form. (This could be implemented using Chart.js or Google Charts.)", "<span class='text-info'>Bonus User Story:</span> As an unauthenticated or authenticated user, I can see the in chart form. (This could be implemented using Chart.js or Google Charts.)",
"<span class='text-info'>Bonus User Story:</span> As an authenticated user, if I don't like the options on a poll I can create a new option.", "<span class='text-info'>Bonus User Story:</span> As an authenticated user, if I don't like the options on a poll I can create a new option.",
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 4, "challengeType": 4,
"tests": [] "tests": []
@ -930,7 +928,7 @@
"<span class='text-info'>User Story:</span> As an authenticated user, I can remove myself from a bar if I no longer want to go there.", "<span class='text-info'>User Story:</span> As an authenticated user, I can remove myself from a bar if I no longer want to go there.",
"<span class='text-info'>Bonus User Story:</span> As an unauthenticated user, when I login I should not have to search again.", "<span class='text-info'>Bonus User Story:</span> As an unauthenticated user, when I login I should not have to search again.",
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 4, "challengeType": 4,
"tests": [] "tests": []
@ -951,7 +949,7 @@
"<span class='text-info'>User Story:</span> As a user, I can remove stocks.", "<span class='text-info'>User Story:</span> As a user, I can remove stocks.",
"<span class='text-info'>Bonus User Story:</span> As a user, I can see changes in real-time when any other user adds or removes a stock.", "<span class='text-info'>Bonus User Story:</span> As a user, I can see changes in real-time when any other user adds or removes a stock.",
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 4, "challengeType": 4,
"tests": [] "tests": []
@ -972,14 +970,14 @@
"<span class='text-info'>User Story:</span> As an authenticated user, I can update my settings to store my full name, city, and state.", "<span class='text-info'>User Story:</span> As an authenticated user, I can update my settings to store my full name, city, and state.",
"<span class='text-info'>Bonus User Story:</span> As an authenticated user, I should be able to propose a trade and wait for the other user to accept the trade.", "<span class='text-info'>Bonus User Story:</span> As an authenticated user, I should be able to propose a trade and wait for the other user to accept the trade.",
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 4, "challengeType": 4,
"tests": [] "tests": []
}, },
{ {
"_id": "bd7158d8c443eddfaeb5bdee", "_id": "bd7158d8c443eddfaeb5bdee",
"name": "Basejump: Build Pintrest Clone", "name": "Basejump: Build a Pintrest Clone",
"difficulty": 2.05, "difficulty": 2.05,
"challengeSeed": "123488494", "challengeSeed": "123488494",
"description": [ "description": [
@ -998,7 +996,7 @@
"<span class='text-info'>Bonus User Story:</span> As an authenticated user, if I don't like the options on a poll I can create a new option.", "<span class='text-info'>Bonus User Story:</span> As an authenticated user, if I don't like the options on a poll I can create a new option.",
"<span class='text-info'>Hint:</span> <a href='http://masonry.desandro.com/'>Masonry.js</a> is a library that allows for Pintrest-style image grids.", "<span class='text-info'>Hint:</span> <a href='http://masonry.desandro.com/'>Masonry.js</a> is a library that allows for Pintrest-style image grids.",
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.", "Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your Github repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>." "If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
], ],
"challengeType": 4, "challengeType": 4,
"tests": [] "tests": []

View File

@ -8,10 +8,13 @@ block content
h1 #{username}'s portfolio h1 #{username}'s portfolio
.panel-body .panel-body
if (user && user.profile.username === username) if (user && user.profile.username === username)
.col-xs-12 .row.text-center
.text-center .col-xs-12.col-sm-10.col-sm-offset-1
a.btn.btn-big.btn-primary(href="/account") Update my portfolio page or manage my account a.btn.btn-big.btn-primary.btn-block(href="/account") Update my portfolio page or manage my account
br .spacer
.col-xs-12.col-sm-10.col-sm-offset-1
a.btn.btn-big.btn-success.btn-block(href="/signout") Sign out of Free Code Camp
.spacer
.row .row
.col-xs-12 .col-xs-12
.col-xs-12.col-sm-12.col-md-5 .col-xs-12.col-sm-12.col-md-5

View File

@ -5,10 +5,19 @@ block content
.panel-heading.text-center .panel-heading.text-center
h1 Challenge Map h1 Challenge Map
.panel-body .panel-body
.row .col-xs-12
.col-xs-12.col-sm-12.col-md-10.col-md-offset-2 if (Math.random() > 0.99)
h3 Complete all of these challenges from top to bottom. img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner-dino.png')
h3 Then we'll assign you to your first nonprofit project. else
img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png')
.col-xs-12.col-md-8.col-md-offset-2
h2.text-center
span.text-primary #{camperCount} &thinsp;
| campers have joined our community
br
| since we launched &thinsp;
span.text-primary #{daysRunning} &thinsp;
| days ago.
h2 h2
span.fa.fa-flag span.fa.fa-flag
| &nbsp; Waypoints (200 hours of lessons) | &nbsp; Waypoints (200 hours of lessons)
@ -92,7 +101,7 @@ block content
li li
a(href="/challenges/#{basejump.name}")= basejump.name a(href="/challenges/#{basejump.name}")= basejump.name
h2 h2
span.ion-ios-heart &nbsp; Nonprofit Projects (800 hours of real-world experience) span.ion-ios-heart &nbsp; Nonprofit Projects (800 hours of real-world experience)*
h3.negative-15 h3.negative-15
ul ul
.row .row
@ -101,3 +110,23 @@ block content
.col-xs-12.col-sm-9.col-md-10 .col-xs-12.col-sm-9.col-md-10
li li
a(href="/nonprofits/directory") Browse our nonprofit projects a(href="/nonprofits/directory") Browse our nonprofit projects
p * Complete all Waypoints, Bonfires, Ziplines and Basejumps to be assigned your first nonprofit project
//#announcementModal.modal(tabindex='-1')
// .modal-dialog
// .modal-content
// .modal-header.challenge-list-header We've updated our curriculum
// a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
// .modal-body
// h3.text-left We now have a 1,600 hour curriculum and tons of new challenges. Read more about it
// a(href='http://blog.freecodecamp.com', target='_blank') here
// | .
// a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='http://blog.freecodecamp.com/', target='_blank') Take me to the blog post.
// a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up!
//script.
// $(document).ready(function () {
// if (!localStorage || !localStorage.newCurriculum) {
// $('#announcementModal').modal('show');
// localStorage.campWideMeeting = "true";
// }
// });

View File

@ -1,50 +0,0 @@
extends ../layout
block content
.row
.col-sm-12.col-md-12.col-xs-12
.panel.panel-primary
.panel-heading.text-center
h1 #{name} (takes #{time} minutes)
script.
var challengeName = null;
.panel.panel-body
.embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src='//player.vimeo.com/video/#{video}')
.col-xs-12.col-sm-10.col-sm-offset-1.col-md-8.col-md-offset-2
h3 Steps:
h4
ol
for step in steps
li!= step
.btn.btn-primary.btn-big.btn-block.completed-challenge I've completed this challenge
.ten-pixel-break
.btn.btn-success.btn-big.btn-block.all-challenges Show me all the challenges
#complete-challenge-dialog.modal(tabindex='-1')
.modal-dialog.animated.zoomIn.fast-animation
.modal-content
.modal-header.challenge-list-header= compliment
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
.text-center
.animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
- if (cc)
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-challenge-button(name='_csrf', value=_csrf, aria-hidden='true') Take me to my next challenge
- if (points && points > 2)
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank")
i.fa.fa-twitter &thinsp;
= phrase
- else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
script.
$.ajax({
url: 'https://api-ssl.bitly.com/v3/shorten?access_token=75e7931a19befaafcf108021b6d597e554b2c5c3&longUrl=http%3A%2F%2Ffreecodecamp.com%2Fchallenges%2F' + !{JSON.stringify(number)} + '&format=txt'
})
.success(
function (data) {
console.log(data);
url = "https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Challenge:%20#{name}&url=" + data + "&hashtags=LearnToCode, JavaScript";
$('.btn-twitter').attr('href', url);
}
);

View File

@ -6,8 +6,8 @@ html(ng-app='profileValidation', lang='en')
body.no-top-and-bottom-margins.full-screen-body-background body.no-top-and-bottom-margins.full-screen-body-background
include partials/css-cdns include partials/css-cdns
include partials/navbar-wide include partials/navbar
include partials/flash include partials/flash
block content block content
include partials/footer include partials/footer
!= js('application') != js('application')

View File

@ -5,7 +5,7 @@ html(ng-app='profileValidation', lang='en')
!= css('main') != css('main')
body.top-and-bottom-margins body.top-and-bottom-margins
include partials/css-cdns include partials/css-cdns
include partials/navbar-narrow include partials/navbar
.container .container
include partials/flash include partials/flash
block content block content

View File

@ -4,7 +4,6 @@
a.ion-social-twitch-outline(href="/twitch") &thinsp;Twitch&nbsp; a.ion-social-twitch-outline(href="/twitch") &thinsp;Twitch&nbsp;
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank') &nbsp;Github&nbsp;&nbsp; a.ion-social-github(href="http://github.com/freecodecamp", target='_blank') &nbsp;Github&nbsp;&nbsp;
a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank') &nbsp;Twitter&nbsp;&nbsp; a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank') &nbsp;Twitter&nbsp;&nbsp;
a.ion-information-circled(href="/learn-to-code") &nbsp;About&nbsp;&nbsp;
a.ion-locked(href="/privacy") &nbsp;Privacy&nbsp;&nbsp; a.ion-locked(href="/privacy") &nbsp;Privacy&nbsp;&nbsp;
.col-xs-12.visible-xs.visible-sm .col-xs-12.visible-xs.visible-sm
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank') a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank')
@ -15,7 +14,5 @@
span.sr-only Free Code Camp on GitHub span.sr-only Free Code Camp on GitHub
a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank') a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank')
span.sr-only Free Code Camp on Twitter span.sr-only Free Code Camp on Twitter
a.ion-information-circled(href="/learn-to-code")
span.sr-only About Free Code Camp
a.ion-locked(href="/privacy") a.ion-locked(href="/privacy")
span.sr-only Free Code Camp's Privacy Policy span.sr-only Free Code Camp's Privacy Policy

View File

@ -1,3 +0,0 @@
nav.navbar.navbar-default.navbar-fixed-top.nav-height
.container
include ./navbar

View File

@ -1,2 +0,0 @@
nav.navbar.navbar-default.navbar-fixed-top.nav-height
include ./navbar

View File

@ -1,54 +1,57 @@
.navbar-header nav.navbar.navbar-default.navbar-fixed-top.nav-height
button.hamburger.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') .navbar-header
.col-xs-6 button.hamburger.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
span.hamburger-text Menu .col-xs-6
.col-xs-6 span.hamburger-text Menu
span.sr-only Toggle navigation .col-xs-6
span.icon-bar span.sr-only Toggle navigation
span.icon-bar span.icon-bar
span.icon-bar span.icon-bar
a.navbar-brand(href='/') span.icon-bar
img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo') a.navbar-brand(href='/')
.collapse.navbar-collapse img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo')
ul.nav.navbar-nav.navbar-right.hamburger-dropdown .collapse.navbar-collapse
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
li if user
a(href='/map') Map li
a(href='/challenges') Next Challenge
if (user && user.sentSlackInvite)
li li
a(href='/chat', target='_blank') Chat a(href='/map') Map
else if (user && user.sentSlackInvite)
li
a(href='/chat', target='_blank') Chat
else
li
a(href='/challenges/join-our-chat-room') Chat
li li
a(href='/challenges/join-our-chat-room') Chat a(href='/stories/hot') News
li
a(href='/stories/hot') News
li
a(href='/field-guide') Field Guide
if !user
li &thinsp; &thinsp; &thinsp;
li li
a.btn.signup-btn.signup-btn-nav(href='/login') Sign in a(href='/field-guide') Field Guide
else if !user
li li &thinsp; &thinsp; &thinsp;
if (user.profile.username) li
a.btn.signup-btn.signup-btn-nav(href='/login') Sign in
a(href='/' + user.profile.username) [&nbsp;#{user.progressTimestamps.length}&nbsp;] else
li
else
a(href='/account') [&thinsp;#{user.progressTimestamps.length}&thinsp;]
.hidden-xs
if user.profile.picture
if (user.profile.username) if (user.profile.username)
a(href='/' + user.profile.username)
img.profile-picture.float-right(src='#{user.profile.picture}') a(href='/' + user.profile.username) [&nbsp;#{user.progressTimestamps.length}&nbsp;]
else else
a(href='/account') a(href='/account') [&thinsp;#{user.progressTimestamps.length}&thinsp;]
img.profile-picture.float-right(src='#{user.profile.picture}') .hidden-xs.hidden-sm
else if user.profile.picture
if (user.profile.username) if (user.profile.username)
a(href='/' + user.profile.username) a(href='/' + user.profile.username)
img.profile-picture.float-right(src='#{user.gravatar(60)}') img.profile-picture.float-right(src='#{user.profile.picture}')
else
a(href='/account')
img.profile-picture.float-right(src='#{user.profile.picture}')
else else
a(href='/account') if (user.profile.username)
img.profile-picture.float-right(src='#{user.gravatar(60)}') a(href='/' + user.profile.username)
img.profile-picture.float-right(src='#{user.gravatar(60)}')
else
a(href='/account')
img.profile-picture.float-right(src='#{user.gravatar(60)}')

View File

@ -63,21 +63,3 @@ block content
.col-xs-12.github-and-twitter-button-text .col-xs-12.github-and-twitter-button-text
html. 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> <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>
//#announcementModal.modal(tabindex='-1')
// .modal-dialog
// .modal-content
// .modal-header.challenge-list-header Camp-wide Meeting on Saturday at Noon EST
// a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
// .modal-body
// h3.text-left We'll live-stream some of Free Code Camp's new features, and campers will show what they're building. Live Saturday, March 28 at Noon EST on our &thinsp;
// a(href='http://twitch.tv/freecodecamp', target='_blank') Twitch.tv channel
// | .
// a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='http://twitch.tv/freecodecamp', target='_blank') Take me to Twitch so I can follow Free Code Camp
// a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up!
//script.
// $(document).ready(function () {
// if (!localStorage || !localStorage.campWideMeeting) {
// $('#announcementModal').modal('show');
// localStorage.campWideMeeting = "true";
// }
// });

View File

@ -26,35 +26,31 @@ block content
h2 Check out our scheduled shows. You can add them to your calendar. h2 Check out our scheduled shows. You can add them to your calendar.
.embed-responsive.embed-responsive-16by9 .embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src="https://www.google.com/calendar/embed?src=freecodecamp.com_r06116ile3o6ucpif7s0g281tc%40group.calendar.google.com&ctz=America/New_York&mode=AGENDA" style="border: 0" width="800" height="600" frameborder="0" scrolling="no") iframe.embed-responsive-item(src="https://www.google.com/calendar/embed?src=freecodecamp.com_r06116ile3o6ucpif7s0g281tc%40group.calendar.google.com&ctz=America/New_York&mode=AGENDA" style="border: 0" width="800" height="600" frameborder="0" scrolling="no")
br
.row .row
.col-xs-12 .col-xs-12
h2 Here are some of our previous shows (you can full-screen them) h2 Here are some of our previous shows (you can full-screen them):
.row .row.negative-20
.col-xs-12.col-sm-12.col-md-6 .col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break .embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/_BErpDdmBOw') iframe.embed-responsive-item(src='//www.youtube.com/embed/YMz_vrK_KlQ')
p.wrappable.negative-45 link: &thinsp; p.wrappable.negative-45 link: &thinsp;
a(href="http://www.youtube.com/watch/_BErpDdmBOw") http://www.youtube.com/watch/_BErpDdmBOw a(href="http://www.youtube.com/watch/_BErpDdmBOw") http://www.youtube.com/watch/YMz_vrK_KlQ
.col-xs-12.col-sm-12.col-md-6 .col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break .embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/Fn9HMn79KH0') iframe.embed-responsive-item(src='//www.youtube.com/embed/vLcuOanKVMw')
p.wrappable.negative-45 link: &thinsp; p.wrappable.negative-45 link: &thinsp;
a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/Fn9HMn79KH0 a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/vLcuOanKVMw
.col-xs-12.col-sm-12.col-md-6 .col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break .embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/S7iRBZJwOAs') iframe.embed-responsive-item(src='//www.youtube.com/embed/bbFVxaza8Ik')
p.wrappable.negative-45 link: &thinsp; p.wrappable.negative-45 link: &thinsp;
a(href="http://www.youtube.com/watch/S7iRBZJwOAs") http://www.youtube.com/watch/S7iRBZJwOAs a(href="http://www.youtube.com/watch/S7iRBZJwOAs") http://www.youtube.com/watch/bbFVxaza8Ik
.col-xs-12.col-sm-12.col-md-6 .col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break .embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/BHNRg39ZblE') iframe.embed-responsive-item(src='//www.youtube.com/embed/6okiEBZ2y-Y')
p.wrappable.negative-45 link: &thinsp; p.wrappable.negative-45 link: &thinsp;
a(href="http://www.youtube.com/watch/BHNRg39ZblE") http://www.youtube.com/watch/BHNRg39ZblE a(href="http://www.youtube.com/watch/BHNRg39ZblE") http://www.youtube.com/watch/6okiEBZ2y-Y
.col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/YDfkHlDmehA')
p.wrappable.negative-45 link: &thinsp;
a(href="http://www.youtube.com/watch/YDfkHlDmehA") http://www.youtube.com/watch/YDfkHlDmehA
br br
br br
br br