add the routes, controller actions and views for the nonprofit wizard
This commit is contained in:
12
app.js
12
app.js
@ -98,7 +98,7 @@ app.use(session({
|
|||||||
secret: secrets.sessionSecret,
|
secret: secrets.sessionSecret,
|
||||||
store: new MongoStore({
|
store: new MongoStore({
|
||||||
url: secrets.db,
|
url: secrets.db,
|
||||||
'auto_reconnect': true
|
'autoReconnect': true
|
||||||
})
|
})
|
||||||
}));
|
}));
|
||||||
app.use(passport.initialize());
|
app.use(passport.initialize());
|
||||||
@ -267,6 +267,16 @@ app.post('/email-signin', userController.postSignin);
|
|||||||
app.get('/nonprofits', contactController.getNonprofitsForm);
|
app.get('/nonprofits', contactController.getNonprofitsForm);
|
||||||
app.post('/nonprofits', contactController.postNonprofitsForm);
|
app.post('/nonprofits', contactController.postNonprofitsForm);
|
||||||
app.get('/nonprofits/home', nonprofitController.nonprofitsHome);
|
app.get('/nonprofits/home', nonprofitController.nonprofitsHome);
|
||||||
|
app.get('/nonprofits/are-you-with-a-registered-nonprofit', nonprofitController.areYouWithARegisteredNonprofit);
|
||||||
|
app.get('/nonprofits/how-can-free-code-camp-help-you', nonprofitController.howCanFreeCodeCampHelpYou);
|
||||||
|
app.get('/nonprofits/are-there-people-already-benefiting-from-your-services', nonprofitController.areTherePeopleAlreadyBenefitingFromYourServices);
|
||||||
|
app.get('/nonprofits/in-exchange-we-ask', nonprofitController.inExchangeWeAsk);
|
||||||
|
app.get('/nonprofits/ok-with-javascript', nonprofitController.okWithJavaScript);
|
||||||
|
app.get('/nonprofits/other-solutions', nonprofitController.otherSolutions);
|
||||||
|
app.get('/nonprofits/what-does-your-nonprofit-do', nonprofitController.whatDoesYourNonprofitDo);
|
||||||
|
app.get('/nonprofits/link-us-to-your-website', nonprofitController.linkUsToYourWebsite);
|
||||||
|
app.get('/nonprofits/tell-us-your-name-and-email', nonprofitController.tellUsYourNameAndEmail);
|
||||||
|
app.get('/nonprofits/your-nonprofit-project-application-has-been-submitted', nonprofitController.yourNonprofitProjectApplicationHasBeenSubmitted);
|
||||||
|
|
||||||
app.get(
|
app.get(
|
||||||
'/done-with-first-100-hours',
|
'/done-with-first-100-hours',
|
||||||
|
@ -18,4 +18,64 @@ exports.nonprofitsHome = function(req, res) {
|
|||||||
res.render('nonprofits/home', {
|
res.render('nonprofits/home', {
|
||||||
title: 'A guide to our Nonprofit Projects'
|
title: 'A guide to our Nonprofit Projects'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.areYouWithARegisteredNonprofit = function(req, res) {
|
||||||
|
res.render('nonprofits/are-you-with-a-registered-nonprofit', {
|
||||||
|
title: 'Are you with a with a registered nonprofit'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.howCanFreeCodeCampHelpYou = function(req, res) {
|
||||||
|
res.render('nonprofits/how-can-free-code-camp-help-you', {
|
||||||
|
title: 'Are you with a with a registered nonprofit'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.otherSolutions = function(req, res) {
|
||||||
|
res.render('nonprofits/other-solutions', {
|
||||||
|
title: 'Here are some other possible solutions for you'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.areTherePeopleAlreadyBenefitingFromYourServices = function(req, res) {
|
||||||
|
res.render('nonprofits/are-there-people-already-benefiting-from-your-services', {
|
||||||
|
title: 'Are there people already benefiting from your services'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.inExchangeWeAsk = function(req, res) {
|
||||||
|
res.render('nonprofits/in-exchange-we-ask', {
|
||||||
|
title: 'In exchange we ask that you ...'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.okWithJavaScript = function(req, res) {
|
||||||
|
res.render('nonprofits/ok-with-javascript', {
|
||||||
|
title: 'Are you OK with us using JavaScript'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.whatDoesYourNonprofitDo = function(req, res) {
|
||||||
|
res.render('nonprofits/what-does-your-nonprofit-do', {
|
||||||
|
title: 'What does your nonprofit do?'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.linkUsToYourWebsite = function(req, res) {
|
||||||
|
res.render('nonprofits/link-us-to-your-website', {
|
||||||
|
title: 'Link us to your website'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.tellUsYourNameAndEmail = function(req, res) {
|
||||||
|
res.render('nonprofits/tell-us-your-name-and-email', {
|
||||||
|
title: 'Tell us your name and email address'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.yourNonprofitProjectApplicationHasBeenSubmitted = function(req, res) {
|
||||||
|
res.render('nonprofits/your-nonprofit-project-application-has-been-submitted', {
|
||||||
|
title: 'Your Nonprofit Project application has been submitted!'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -735,6 +735,11 @@ iframe.iphone {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nonprofit-help-select-text-height {
|
||||||
|
font-size: 40px;
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
// To adjust right margin, negative values bring the image closer to the edge of the screen
|
// To adjust right margin, negative values bring the image closer to the edge of the screen
|
||||||
.iphone-position {
|
.iphone-position {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
//= require lib/jquery-2.1.1.min
|
//= require lib/jquery-2.1.1.min
|
||||||
//= require lib/bootstrap.min
|
//= require lib/bootstrap.min
|
||||||
//= require lib/moment/moment
|
//= require lib/moment/moment
|
||||||
//= require main
|
//= require main
|
@ -0,0 +1,12 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 We build solutions for nonprofits who are already serving a need. Are there people who already benefit from your services?
|
||||||
|
.spacer
|
||||||
|
.row
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/') Yes
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/') No
|
12
views/nonprofits/are-you-with-a-registered-nonprofit.jade
Normal file
12
views/nonprofits/are-you-with-a-registered-nonprofit.jade
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 Do you represent a nonprofit organization that is registered with your government?
|
||||||
|
.spacer
|
||||||
|
.row
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Yes
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') No
|
@ -19,7 +19,7 @@ block content
|
|||||||
.testimonial-copy I'm currently working through Free Code Camp to improve my JavaScript. The community is very welcoming!
|
.testimonial-copy I'm currently working through Free Code Camp to improve my JavaScript. The community is very welcoming!
|
||||||
h3 - @cynthialanel
|
h3 - @cynthialanel
|
||||||
.big-break
|
.big-break
|
||||||
a.btn.btn-cta.signup-btn(href="/with-a-nonprofit") Get pro bono help for my nonprofit
|
a.btn.btn-cta.signup-btn(href="/nonprofits/are-you-with-a-registered-nonprofit") Get pro bono help for my nonprofit
|
||||||
.big-break
|
.big-break
|
||||||
h2 Our process
|
h2 Our process
|
||||||
.row
|
.row
|
||||||
@ -78,6 +78,6 @@ block content
|
|||||||
li.ion-code   You can get help in real time from our community chat rooms and forum
|
li.ion-code   You can get help in real time from our community chat rooms and forum
|
||||||
li.ion-code   We all share one common goal: to boost our careers with code
|
li.ion-code   We all share one common goal: to boost our careers with code
|
||||||
.big-break
|
.big-break
|
||||||
a.btn.btn-cta.signup-btn(href="/with-a-nonprofit") I'm with a nonprofit and want help coding something
|
a.btn.btn-cta.signup-btn(href="/nonprofits/are-you-with-a-registered-nonprofit") Get pro bono help for my nonprofit
|
||||||
script.
|
script.
|
||||||
challengeName = 'Home'
|
challengeName = 'Home'
|
42
views/nonprofits/how-can-free-code-camp-help-you.jade
Normal file
42
views/nonprofits/how-can-free-code-camp-help-you.jade
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 How can Free Code Camp help you?
|
||||||
|
.spacer
|
||||||
|
.row.text-center.negative-35
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-android-globe
|
||||||
|
label.black-text.nonprofit-help-select-text-height Websites
|
||||||
|
input#websites-help.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-card
|
||||||
|
h2.black-text.nonprofit-help-select-text-height Donation Systems
|
||||||
|
input#websites-help.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-android-calendar
|
||||||
|
h2.black-text.nonprofit-help-select-text-height Volunteer Systems
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-ios-box
|
||||||
|
h2.black-text.nonprofit-help-select-text-height Inventory Systems
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-university
|
||||||
|
h2.black-text.nonprofit-help-select-text-height E-learning Platforms
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-ios-list
|
||||||
|
h2.black-text.nonprofit-help-select-text-height Web Forms
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-ios-people
|
||||||
|
h2.black-text.nonprofit-help-select-text-height Community Tools
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.col-xs-12.col-sm-12.col-md-3
|
||||||
|
.landing-skill-icon.ion-settings
|
||||||
|
h2.black-text.nonprofit-help-select-text-height ...and other tools
|
||||||
|
input#websites-help.inline.checkbox(type='checkbox')
|
||||||
|
.spacer
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/') I've selected all that apply and am ready to move on
|
16
views/nonprofits/in-exchange-we-ask.jade
Normal file
16
views/nonprofits/in-exchange-we-ask.jade
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-left
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 Great! In exchange for our help, we ask only that you:
|
||||||
|
ol
|
||||||
|
li Appoint one principal stakeholder to serve on behalf of your organization.
|
||||||
|
li Communicate with our campers on a regular basis, to answer questions and provide them with direction.
|
||||||
|
li Commit to using the solution that our campers build for your nonprofit.
|
||||||
|
.spacer
|
||||||
|
.row
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Sounds good!
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') This might not be for us.
|
12
views/nonprofits/ok-with-javascript.jade
Normal file
12
views/nonprofits/ok-with-javascript.jade
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 Our campers are learning to code using modern full stack JavaScript technologies (MongoDB, Express, Angular, Node.js). We do not build or maintain Wordpress, Drupal, or other non-JavaScript based frameworks.
|
||||||
|
.spacer
|
||||||
|
.row
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Sounds good!
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') This might not be for us.
|
12
views/nonprofits/other-solutions.jade
Normal file
12
views/nonprofits/other-solutions.jade
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 Do you represent a nonprofit organization that is registered with your government?
|
||||||
|
.spacer
|
||||||
|
.row
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Yes
|
||||||
|
.col-xs-6
|
||||||
|
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') No
|
0
views/nonprofits/tell-us-your-name-and-email.jade
Normal file
0
views/nonprofits/tell-us-your-name-and-email.jade
Normal file
23
views/nonprofits/what-does-your-nonprofit-do.jade
Normal file
23
views/nonprofits/what-does-your-nonprofit-do.jade
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.jumbotron.text-center
|
||||||
|
h1.hug-top Nonprofit Sign Up
|
||||||
|
.spacer
|
||||||
|
h2 In 140 characters or less, what does your nonprofit do? For whom?
|
||||||
|
.spacer
|
||||||
|
.input-group
|
||||||
|
input.form-control.big-text-field.field-responsive(type='text', maxlength='140', autofocus='')
|
||||||
|
span.input-group-btn
|
||||||
|
button.btn.btn-big.btn-primary.btn-responsive Submit
|
||||||
|
#textarea-comment-feedback
|
||||||
|
script.
|
||||||
|
var text_max = 140;
|
||||||
|
$('#textarea-comment-feedback').html(text_max + ' characters remaining');
|
||||||
|
$('#comment-to-comment-textinput').keyup(function (e) {
|
||||||
|
if (e.which === 13 || e === 13) {
|
||||||
|
$('#submit-comment-to-comment').click();
|
||||||
|
}
|
||||||
|
var text_length = $('#comment-to-comment-textinput').val().length;
|
||||||
|
var text_remaining = text_max - text_length;
|
||||||
|
$('#textarea-comment-feedback').html(text_remaining + ' characters remaining');
|
||||||
|
});
|
Reference in New Issue
Block a user