half way done with the initial views and controllers

This commit is contained in:
Michael Q Larson
2015-03-24 19:08:26 -07:00
parent 1facf532f3
commit bcec96e427
7 changed files with 92 additions and 25 deletions

5
app.js
View File

@ -27,10 +27,12 @@ var express = require('express'),
* Controllers (route handlers).
*/
homeController = require('./controllers/home'),
challengesController = require('./controllers/challenges'),
resourcesController = require('./controllers/resources'),
userController = require('./controllers/user'),
contactController = require('./controllers/contact'),
ziplineController = require('./controllers/ziplines'),
basejumpController = require('./controllers/basejumps'),
nonprofitController = require('./controllers/nonprofits'),
bonfireController = require('./controllers/bonfire'),
coursewareController = require('./controllers/courseware'),
@ -264,6 +266,7 @@ app.post('/email-signup', userController.postEmailSignup);
app.post('/email-signin', userController.postSignin);
app.get('/nonprofits', contactController.getNonprofitsForm);
app.post('/nonprofits', contactController.postNonprofitsForm);
app.get('/nonprofits/home', nonprofitController.nonprofitsHome);
app.get(
'/done-with-first-100-hours',

21
controllers/basejumps.js Normal file
View File

@ -0,0 +1,21 @@
var async = require('async'),
User = require('../models/User'),
Challenge = require('./../models/Challenge'),
Bonfire = require('./../models/Bonfire'),
Story = require('./../models/Story'),
Comment = require('./../models/Comment'),
resources = require('./resources.json'),
steps = resources.steps,
secrets = require('./../config/secrets'),
moment = require('moment'),
https = require('https'),
debug = require('debug')('freecc:cntr:resources'),
cheerio = require('cheerio'),
request = require('request'),
R = require('ramda');
nonprofitHome: function nonprofitHome(req, res) {
res.render('nonprofits/home', {
title: 'A guide to our Nonprofit Projects'
});
}

21
controllers/nonprofits.js Normal file
View File

@ -0,0 +1,21 @@
var async = require('async'),
User = require('../models/User'),
Challenge = require('./../models/Challenge'),
Bonfire = require('./../models/Bonfire'),
Story = require('./../models/Story'),
Comment = require('./../models/Comment'),
resources = require('./resources.json'),
steps = resources.steps,
secrets = require('./../config/secrets'),
moment = require('moment'),
https = require('https'),
debug = require('debug')('freecc:cntr:resources'),
cheerio = require('cheerio'),
request = require('request'),
R = require('ramda');
exports.nonprofitsHome = function(req, res) {
res.render('nonprofits/home', {
title: 'A guide to our Nonprofit Projects'
});
};

21
controllers/ziplines.js Normal file
View File

@ -0,0 +1,21 @@
var async = require('async'),
User = require('../models/User'),
Challenge = require('./../models/Challenge'),
Bonfire = require('./../models/Bonfire'),
Story = require('./../models/Story'),
Comment = require('./../models/Comment'),
resources = require('./resources.json'),
steps = resources.steps,
secrets = require('./../config/secrets'),
moment = require('moment'),
https = require('https'),
debug = require('debug')('freecc:cntr:resources'),
cheerio = require('cheerio'),
request = require('request'),
R = require('ramda');
nonprofitHome: function nonprofitHome(req, res) {
res.render('nonprofits/home', {
title: 'A guide to our Nonprofit Projects'
});
}

View File

@ -335,6 +335,10 @@ ul {
margin-bottom: -10px;
}
.nonprofit-landing {
font-size: 50px;
}
.big-text {
font-size: 63px;
}

View File

@ -25,7 +25,7 @@ block content
a.btn.btn-cta.signup-btn(href="/login") Start learning to code (it's free)
br
br
a.btn.nonprofit-cta.btn-success(href="/nonprofits") I'm with a nonprofit and want help coding something
a.btn.nonprofit-cta.btn-success(href="/nonprofits") Get pro bono help for my nonprofit
.big-break
h2 Campers you'll hang out with:
.row

View File

@ -1,30 +1,10 @@
extends layout
extends ../layout
block content
.jumbotron
.text-center
h1.hug-top We code for a cause
h2 We'll code software solutions for your nonprofit, for free!
.row
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Get Connected
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', title='Get great references and connections to help you get a job')
p.landing-p Join a community of busy, motivated professionals.
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Learn JavaScript
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_learn.svg.gz', title='Learn to code')
p.landing-p Work together on Full Stack JavaScript coding challenges.
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Build your Portfolio
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_portfolio.svg.gz', title='Build a portfolio of apps for nonprofits')
p.landing-p Build apps that solve real problems for real people.
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Help Nonprofits
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_nonprofits.svg.gz', title='Help nonprofits')
p.landing-p Give nonprofits a boost by empowering them with code.
h2.nonprofit-landing.hug-top We'll code for your nonprofit, pro bono
.big-break
a.btn.btn-cta.signup-btn(href="/with-a-nonprofit") I'm with a nonprofit and want help coding something
.big-break
h2 Nonprofits we've helped
h2 Some of our success stories
.row
.col-xs-12.col-sm-12.col-md-4
img.img-responsive.testimonial-image.img-center(src="https://s3.amazonaws.com/freecodecamp/testimonial-jen.jpg", alt="@jenthebest's testimonial image")
@ -39,6 +19,23 @@ block content
.testimonial-copy I'm currently working through Free Code Camp to improve my JavaScript. The community is very welcoming!
h3 - @cynthialanel
.big-break
a.btn.btn-cta.signup-btn(href="/with-a-nonprofit") Get pro bono help for my nonprofit
.big-break
h2 Our process
.row
.col-xs-12.col-sm-12.col-md-4
h3.nowrap Your idea
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_portfolio.svg.gz', title='Get great references and connections to help you get a job')
p.landing-p You tell us how we can help you.
.col-xs-12.col-sm-12.col-md-4
h3.nowrap Our team
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_nonprofits.svg.gz', title='Build a portfolio of apps for nonprofits')
p.landing-p We'll hand pick developers and a project manager.
.col-xs-12.col-sm-12.col-md-4
h3.nowrap Your solution
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', title='Help nonprofits')
p.landing-p Together we'll set milestones and complete your project.
.big-break
h2 Solutions we can help you build:
.text-center.negative-35
.col-xs-12.col-sm-12.col-md-3