start creating partials and views

This commit is contained in:
Michael Q Larson
2014-10-20 12:37:48 -07:00
parent a4343ca284
commit 8f3c7b44c5
15 changed files with 113 additions and 47 deletions

View File

@ -1,7 +1,7 @@
/**
* GET /
* Home page.
*/
* GET /
* Home page.
*/
var Challenge = require('./../models/Challenge')
exports.index = function(req, res) {
@ -20,16 +20,30 @@ exports.view = function(req, res) {
});
});
};
exports.firstPairProgrammingSession = function(req, res) {
Challenge.findOne({ name: "Start Your First Pair Programming Session" }).exec (function(err, challenge) {
res.render('challenge/first_pair_programming_session', {
title: 'Challenge',
challenge: challenge
});
exports.createAndDeployAWebsite = function(req, res) {
res.render('challenge/create-and-deploy-a-website', {
name: 'Create and Deploy a Website',
image: 'http://startbootstrap.com/assets/img/templates/landing-page.jpg',
video: '',
directions: "In the next 5 minutes, you'll create a website and deploy it to the internet!",
links: ["http://startbootstrap.com/template-overviews/freelancer/", "www.bitballoon.com", "https://atom.io/"]
});
};
//firstPairProgrammingSession
//firstCodePen
//firstDynamicWebsite
//firstWebsite
exports.addDynamicContentToYourWebsite = function(req, res) {
res.render('challenge/add-dynamic-content-to-your-website', {
name: 'Add dynamic content to your website'
});
};
exports.experimentWithHtmlAndCssInCodepen = function(req, res) {
res.render('challenge/experiment-with-html-and-css-in-codepen', {
name: 'Experiment with HTML and CSS in Codepen'
});
};
exports.startAPairProgrammingSession = function(req, res) {
res.render('challenge/start-a-pair-programming-session', {
name: 'Start a pair programming session'
});
};