refactor announcement modal and add nodeschool-challenges
This commit is contained in:
1
app.js
1
app.js
@ -230,6 +230,7 @@ app.get('/deploy-a-website', resourcesController.deployAWebsite);
|
||||
app.get('/gmail-shortcuts', resourcesController.gmailShortcuts);
|
||||
app.get('/control-shortcuts', resourcesController.controlShortcuts);
|
||||
app.get('/control-shortcuts', resourcesController.deployAWebsite);
|
||||
app.get('/nodeschool-challenges', resourcesController.nodeSchoolChallenges);
|
||||
app.get('/stats', function(req, res) {
|
||||
res.redirect(301, '/learn-to-code');
|
||||
});
|
||||
|
@ -132,6 +132,13 @@ module.exports = {
|
||||
title: 'JavaScript in your Inbox'
|
||||
});
|
||||
},
|
||||
|
||||
nodeSchoolChallenges: function(req, res) {
|
||||
res.render('resources/nodeschool-challenges', {
|
||||
title: 'NodeSchool Challenges'
|
||||
});
|
||||
},
|
||||
|
||||
githubCalls: function(req, res) {
|
||||
var githubHeaders = {headers: {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36'}, port:80 };
|
||||
request('https://api.github.com/repos/freecodecamp/freecodecamp/pulls?client_id=' + secrets.github.clientID + '&client_secret=' + secrets.github.clientSecret, githubHeaders, function(err, status1, pulls) {
|
||||
|
@ -4,6 +4,13 @@ $(document).ready(function() {
|
||||
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 setCSRFToken = function(securityToken) {
|
||||
@ -37,6 +44,7 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash) {
|
||||
$('#complete-bonfire-dialog').modal('show');
|
||||
// Only post to server if there is an authenticated user
|
||||
|
@ -1,3 +1,13 @@
|
||||
#announcementModal.modal(tabindex='-1')
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header.challenge-list-header New NodeSchool Challenges
|
||||
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
||||
.modal-body
|
||||
h3.text-left Some of Code School's courses are no longer free. We're switching to NodeSchool.io for our Node.js and Express.js challenges.
|
||||
a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='/nodeschool-challenges') Take me to these new challenges
|
||||
a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up!
|
||||
|
||||
.fcc-footer
|
||||
.col-xs-12.hidden-xs.hidden-sm
|
||||
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank')  Blog  
|
||||
|
22
views/resources/nodeschool-challenges.jade
Normal file
22
views/resources/nodeschool-challenges.jade
Normal file
@ -0,0 +1,22 @@
|
||||
extends ../layout
|
||||
block content
|
||||
.jumbotron.text-center
|
||||
h1.hug-top NodeSchool Challenges
|
||||
h2 Learn Node.js, NPM, Express.js, and advanced JavaScript like Functional Programming and Promises
|
||||
br
|
||||
.embed-responsive.embed-responsive-16by9
|
||||
iframe.embed-responsive-item(src='//player.vimeo.com/video/115194017')
|
||||
.text-left
|
||||
h3 Here are the NodeSchool courses you should complete:
|
||||
ol
|
||||
li
|
||||
a(href='http://runnable.com/VQuO_Y4BbkhaOOsV/nodeschool-io-s-learnyounode-course-available-in-your-browser-for-node-js-and-freecodecamp' target='_blank') NodeSchool.io's LearnYouNode course
|
||||
li
|
||||
a(href='http://runnable.com/VQt7deuMe6RZ3Gcl/nodeschool-io-s-learn-to-npm-course-running-in-your-browser-for-node-js-and-hello-world' target='_blank') NodeSchool.io's Learn-to-NPM course
|
||||
li
|
||||
a(href='http://runnable.com/VQufnaRAlaNc9JuM/nodeschool-io-s-express-js-course-available-in-your-browser-for-node-js-and-freecodecamp' target='_blank') NodeSchool.io's Express.js course
|
||||
li
|
||||
a(href='http://runnable.com/VQuZjvia8Gxcqkpy/nodeschool-io-s-functional-programming-in-javascript-course-available-in-your-browser-for-node-js-and-freecodecamp' target='_blank') NodeSchool.io's Functional Programming in JavaScript course
|
||||
li
|
||||
a(href='http://runnable.com/VQunH26qdytcbLBg/nodeschool-io-s-promise-it-won-t-hurt-promises-course-available-in-your-browser-for-node-js-javascript-and-freecodecamp' target='_blank') NodeSchool.io's Promise It Won't Hurt Promises course
|
||||
br
|
@ -13,6 +13,13 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/nodeschool-challenges
|
||||
changefreq weekly
|
||||
lastmod= now
|
||||
priority= 0.5
|
||||
|
||||
|
||||
url
|
||||
loc http://www.freecodecamp.com/deploy-a-website
|
||||
changefreq weekly
|
||||
|
Reference in New Issue
Block a user