improve the footer
This commit is contained in:
2
app.js
2
app.js
@ -249,6 +249,8 @@ app.get('/jquery-exercises', resourcesController.jqueryExercises);
|
||||
|
||||
app.get('/chat', resourcesController.chat);
|
||||
|
||||
app.get('/twitch', resourcesController.twitch);
|
||||
|
||||
app.get('/map', challengeMapController.challengeMap);
|
||||
|
||||
app.get('/live-pair-programming', function(req, res) {
|
||||
|
@ -364,6 +364,7 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
});
|
||||
|
||||
var index = req.user.uncompletedCoursewares.indexOf(coursewareHash);
|
||||
console.log('index here', index)
|
||||
if (index > -1) {
|
||||
req.user.progressTimestamps.push(Date.now() || 0);
|
||||
req.user.uncompletedCoursewares.splice(index, 1);
|
||||
|
@ -87,7 +87,7 @@ module.exports = {
|
||||
res.redirect('http://gitter.im/freecodecamp/freecodecamp');
|
||||
} else {
|
||||
res.render('resources/chat', {
|
||||
title: "Enter Free Code Camp's Chat Rooms"
|
||||
title: "Watch us code live on Twitch.tv"
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -98,6 +98,12 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
twitch: function twitch(req, res) {
|
||||
res.render('resources/twitch', {
|
||||
title: "Enter Free Code Camp's Chat Rooms"
|
||||
});
|
||||
},
|
||||
|
||||
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) {
|
||||
|
@ -9,6 +9,7 @@ var R = require('ramda'),
|
||||
mongodb = require('mongodb'),
|
||||
MongoClient = mongodb.MongoClient,
|
||||
secrets = require('../config/secrets'),
|
||||
nodemailer = require('nodemailer'),
|
||||
sanitizeHtml = require('sanitize-html');
|
||||
|
||||
function hotRank(timeValue, rank) {
|
||||
@ -384,6 +385,7 @@ exports.commentSubmit = function(req, res, next) {
|
||||
topLevel: true,
|
||||
commentOn: Date.now()
|
||||
});
|
||||
|
||||
commentSave(comment, Story, res, next);
|
||||
};
|
||||
|
||||
@ -438,8 +440,74 @@ function commentSave(comment, Context, res, next) {
|
||||
res.send(true);
|
||||
});
|
||||
}
|
||||
User.findOne({'profile.username': associatedStory.author.username}, function(err, recipient) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
Comment.findById(associatedStory._id, function(err, originalStory) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
debug('is it a comment?', originalStory);
|
||||
if (!originalStory) {
|
||||
Story.findById(associatedStory.associatedPost, function(err, originalStory) {
|
||||
debug('is it a story?', originalStory);
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
var transporter = nodemailer.createTransport({
|
||||
service: 'Mandrill',
|
||||
auth: {
|
||||
user: secrets.mandrill.user,
|
||||
pass: secrets.mandrill.password
|
||||
}
|
||||
});
|
||||
console.log('1!');
|
||||
var mailOptions = {
|
||||
to: recipient.email,
|
||||
from: 'Team@freecodecamp.com',
|
||||
subject: originalStory.author.username + " replied to you on Camper News!",
|
||||
text: [
|
||||
"<a href='http://freecodecamp.com/stories/" + originalStory.storyLink + "'>Here.</a>",
|
||||
'- the Volunteer Camp Counselor Team'
|
||||
].join('')
|
||||
};
|
||||
console.log('2!');
|
||||
transporter.sendMail(mailOptions, function(err) {
|
||||
if (err) { return err; }
|
||||
done(null, null);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
console.log('definitely a comment');
|
||||
var transporter = nodemailer.createTransport({
|
||||
service: 'Mandrill',
|
||||
auth: {
|
||||
user: secrets.mandrill.user,
|
||||
pass: secrets.mandrill.password
|
||||
}
|
||||
});
|
||||
console.log('1!');
|
||||
var mailOptions = {
|
||||
to: recipient.email,
|
||||
from: 'Team@freecodecamp.com',
|
||||
subject: originalStory.author.username + " replied to you on Camper News!",
|
||||
text: [
|
||||
"<a href='http://freecodecamp.com/stories/" + originalStory.storyLink + "'>Here.</a>",
|
||||
'- the Volunteer Camp Counselor Team'
|
||||
].join('')
|
||||
};
|
||||
console.log('2!');
|
||||
transporter.sendMail(mailOptions, function(err) {
|
||||
if (err) { return err; }
|
||||
done(null, null);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
debug('hey there\'s error');
|
||||
// delete comment
|
||||
return next(err);
|
||||
}
|
||||
|
@ -608,16 +608,23 @@ thead {
|
||||
|
||||
.fcc-footer {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
background-color: #4a2b0f;
|
||||
height: 40px;
|
||||
padding: 12px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
a {
|
||||
font-size: 28px;
|
||||
font-size: 20px;
|
||||
color: #eee;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
&:hover {
|
||||
padding-top: 14px;
|
||||
padding-bottom: 14px;
|
||||
color: #4a2b0f;
|
||||
background-color: #eee;
|
||||
text-decoration: none;
|
||||
|
@ -112,24 +112,6 @@
|
||||
"challengeType": 2,
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "bd7110d8c441eddfaeb5bdef",
|
||||
"name": "Tweak HTML and CSS in CodePen",
|
||||
"difficulty": 0.08,
|
||||
"challengeSeed": "110752744",
|
||||
"description": [
|
||||
"Now we're going to learn how to use a tool called CodePen, which lets you experiment with HTML and CSS, and even create single-page web applications, right in your browser!",
|
||||
"Go to <a href='http://www.newsweek.com/' target='_blank'>http://www.newsweek.com/</a>",
|
||||
"Change the window size. Note that Newsweek.com is using <strong>Responsive Design</strong>.",
|
||||
"Right-click an area of the page that doesn't have any HTML elements on it, then choose 'view page source'.",
|
||||
"Select all the text, then copy it.",
|
||||
"Go to <a href='http://codepen.io/pen/' target='_blank'>http://codepen.io/pen/</a>",
|
||||
"Paste the HTML you copied from Newsweek.com into the HTML field of CodePen.",
|
||||
"You now have your own customizable version of the Newsweek.com website. See if you can change some of the text and images."
|
||||
],
|
||||
"challengeType": 2,
|
||||
"tests": []
|
||||
},
|
||||
{
|
||||
"_id": "bd7111d8c441eddfaeb5bdef",
|
||||
"name": "Build a CSS Robot",
|
||||
|
@ -1,3 +1,4 @@
|
||||
.row
|
||||
.col-xs-12
|
||||
if messages.errors
|
||||
.alert.alert-danger.fade.in
|
||||
|
@ -1,15 +1,15 @@
|
||||
.fcc-footer
|
||||
.col-xs-12.hidden-xs.hidden-sm
|
||||
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank')  Blog  
|
||||
a.ion-social-twitch-outline(href="http://www.twitch.tv/freecodecamp", target='_blank')  Twitch  
|
||||
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank')  Github  
|
||||
a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank')  Twitter  
|
||||
a.ion-information-circled(href="/learn-to-code")  About  
|
||||
a.ion-locked(href="/privacy")  Privacy  
|
||||
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank') Blog
|
||||
a.ion-social-twitch-outline(href="/twitch")  Twitch
|
||||
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank') Github
|
||||
a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank') Twitter
|
||||
a.ion-information-circled(href="/learn-to-code") About
|
||||
a.ion-locked(href="/privacy") Privacy
|
||||
.col-xs-12.visible-xs.visible-sm
|
||||
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank')
|
||||
span.sr-only Free Code Camp's Blog
|
||||
a.ion-social-twitch-outline(href="http://www.twitch.tv/freecodecamp", target='_blank')
|
||||
a.ion-social-twitch-outline(href="/twitch")
|
||||
span.sr-only Free Code Camp Live Pair Programming on Twitch.tv
|
||||
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank')
|
||||
span.sr-only Free Code Camp on GitHub
|
||||
|
@ -76,21 +76,21 @@ block content
|
||||
.col-xs-12.github-and-twitter-button-text
|
||||
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>
|
||||
//#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  
|
||||
// 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";
|
||||
// }
|
||||
// });
|
||||
#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  
|
||||
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";
|
||||
}
|
||||
});
|
||||
|
59
views/resources/twitch.jade
Normal file
59
views/resources/twitch.jade
Normal file
@ -0,0 +1,59 @@
|
||||
extends ../layout
|
||||
block content
|
||||
.col-xs-12
|
||||
.panel.panel-info
|
||||
.panel-heading.text-center Watch us code on our Twitch.tv channel
|
||||
.panel-body.text-center
|
||||
h2 Watch the live stream below or on our  
|
||||
a(href="http://twitch.tv/freecodecamp", target='_blank') Twitch.tv channel
|
||||
| .
|
||||
.spacer
|
||||
.row
|
||||
.col-md-8.col-xs-12
|
||||
.embed-responsive.embed-responsive-16by9
|
||||
iframe(src='http://www.twitch.tv/freecodecamp/embed', frameborder='0', scrolling='no')
|
||||
.col-md-4.col-xs-12
|
||||
.visible-sm.visible-xs
|
||||
.embed-responsive.embed-responsive-16by9
|
||||
iframe(src='http://www.twitch.tv/freecodecamp/chat?popout=', frameborder='0', scrolling='no')
|
||||
.visible-md.visible-lg
|
||||
.embed-responsive.embed-responsive-twitch-chat
|
||||
iframe(src='http://www.twitch.tv/freecodecamp/chat?popout=', frameborder='0', scrolling='no')
|
||||
.row
|
||||
.col-xs-12
|
||||
h2 Check out our scheduled shows. You can add them to your calendar.
|
||||
.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")
|
||||
.row
|
||||
.col-xs-12
|
||||
h2 Here are some of our previous shows (you can full-screen them)
|
||||
.row
|
||||
.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/_BErpDdmBOw')
|
||||
p.wrappable.negative-45 link:  
|
||||
a(href="http://www.youtube.com/watch/_BErpDdmBOw") http://www.youtube.com/watch/_BErpDdmBOw
|
||||
.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/Fn9HMn79KH0')
|
||||
p.wrappable.negative-45 link:  
|
||||
a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/Fn9HMn79KH0
|
||||
.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/S7iRBZJwOAs')
|
||||
p.wrappable.negative-45 link:  
|
||||
a(href="http://www.youtube.com/watch/S7iRBZJwOAs") http://www.youtube.com/watch/S7iRBZJwOAs
|
||||
.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/BHNRg39ZblE')
|
||||
p.wrappable.negative-45 link:  
|
||||
a(href="http://www.youtube.com/watch/BHNRg39ZblE") http://www.youtube.com/watch/BHNRg39ZblE
|
||||
.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:  
|
||||
a(href="http://www.youtube.com/watch/YDfkHlDmehA") http://www.youtube.com/watch/YDfkHlDmehA
|
||||
.row
|
||||
.col-xs-12.text-center
|
||||
if !user
|
||||
a.btn.btn-cta.signup-btn.btn-primary(href="/login") Start learning to code (it's free)
|
Reference in New Issue
Block a user