add jobs
This commit is contained in:
10
app.js
10
app.js
@@ -43,6 +43,7 @@ var express = require('express'),
|
||||
fieldGuideController = require('./controllers/fieldGuide'),
|
||||
challengeMapController = require('./controllers/challengeMap'),
|
||||
challengeController = require('./controllers/challenge'),
|
||||
jobsController = require('./controllers/jobs'),
|
||||
|
||||
/**
|
||||
* Stories
|
||||
@@ -159,9 +160,8 @@ var trusted = [
|
||||
'*.ytimg.com',
|
||||
'*.bitly.com',
|
||||
'http://cdn.inspectlet.com/',
|
||||
'http://hn.inspectlet.com/',
|
||||
'*.simplyhired.com',
|
||||
'*.simply-partner.com'
|
||||
'wss://inspectletws.herokuapp.com/',
|
||||
'http://hn.inspectlet.com/'
|
||||
];
|
||||
|
||||
app.use(helmet.csp({
|
||||
@@ -269,8 +269,6 @@ app.get('/pmi-acp-agile-project-managers-form',
|
||||
|
||||
app.get('/nonprofits', resourcesController.nonprofits);
|
||||
|
||||
app.get('/nonprofits/getNonprofitList', nonprofitController.showAllNonprofits);
|
||||
|
||||
app.get('/nonprofits-form', resourcesController.nonprofitsForm);
|
||||
|
||||
app.get('/map',
|
||||
@@ -354,7 +352,7 @@ app.get(
|
||||
|
||||
app.get(
|
||||
'/jobs',
|
||||
resourcesController.jobs
|
||||
jobsController.jobsDirectory
|
||||
);
|
||||
|
||||
app.get(
|
||||
|
14
controllers/jobs.js
Normal file
14
controllers/jobs.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var moment = require('moment'),
|
||||
Job = require('./../models/Job'),
|
||||
resources = require('./resources');
|
||||
|
||||
exports.jobsDirectory = function(req, res, next) {
|
||||
Job.find({}, function(err, jobs) {
|
||||
if (err) { return next(err); }
|
||||
|
||||
res.render('jobs/directory', {
|
||||
title: 'Junior JavaScript Engineer Jobs',
|
||||
jobs: jobs
|
||||
});
|
||||
});
|
||||
};
|
@@ -13,92 +13,6 @@ exports.nonprofitsDirectory = function(req, res, next) {
|
||||
});
|
||||
};
|
||||
|
||||
exports.areYouWithARegisteredNonprofit = function(req, res) {
|
||||
res.render('nonprofits/are-you-with-a-registered-nonprofit', {
|
||||
title: 'Are you with a with a registered nonprofit',
|
||||
step: 1
|
||||
});
|
||||
};
|
||||
|
||||
exports.areTherePeopleThatAreAlreadyBenefitingFromYourServices =
|
||||
function(req, res) {
|
||||
res.render(
|
||||
'nonprofits/' +
|
||||
'are-there-people-that-are-already-benefiting-from-your-services',
|
||||
{
|
||||
title: 'Are there people already benefiting from your services',
|
||||
step: 2
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
exports.okWithJavaScript = function(req, res) {
|
||||
res.render('nonprofits/ok-with-javascript', {
|
||||
title: 'Are you OK with us using JavaScript',
|
||||
step: 3
|
||||
});
|
||||
};
|
||||
|
||||
exports.inExchangeWeAsk = function(req, res) {
|
||||
res.render('nonprofits/in-exchange-we-ask', {
|
||||
title: 'In exchange we ask that you ...',
|
||||
step: 4
|
||||
});
|
||||
};
|
||||
|
||||
exports.howCanFreeCodeCampHelpYou = function(req, res) {
|
||||
res.render('nonprofits/how-can-free-code-camp-help-you', {
|
||||
title: 'Are you with a with a registered nonprofit',
|
||||
step: 5
|
||||
});
|
||||
};
|
||||
|
||||
exports.whatDoesYourNonprofitDo = function(req, res) {
|
||||
res.render('nonprofits/what-does-your-nonprofit-do', {
|
||||
existingParams: req.params,
|
||||
title: 'What does your nonprofit do?',
|
||||
step: 6
|
||||
});
|
||||
};
|
||||
|
||||
exports.linkUsToYourWebsite = function(req, res) {
|
||||
res.render('nonprofits/link-us-to-your-website', {
|
||||
title: 'Link us to your website',
|
||||
step: 7
|
||||
});
|
||||
};
|
||||
|
||||
exports.tellUsYourEmail = function(req, res) {
|
||||
res.render('nonprofits/tell-us-your-email', {
|
||||
title: 'Tell us your email',
|
||||
step: 8
|
||||
});
|
||||
};
|
||||
|
||||
exports.tellUsYourName = function(req, res) {
|
||||
res.render('nonprofits/tell-us-your-name', {
|
||||
title: 'Tell us your name',
|
||||
step: 9
|
||||
});
|
||||
};
|
||||
|
||||
exports.yourNonprofitProjectApplicationHasBeenSubmitted = function(req, res) {
|
||||
res.render(
|
||||
'nonprofits/your-nonprofit-project-application-has-been-submitted',
|
||||
{
|
||||
title: 'Your Nonprofit Project application has been submitted!',
|
||||
step: 10,
|
||||
getBackDay: moment().weekday(5).format('dddd')
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
exports.otherSolutions = function(req, res) {
|
||||
res.render('nonprofits/other-solutions', {
|
||||
title: 'Here are some other possible solutions for you'
|
||||
});
|
||||
};
|
||||
|
||||
exports.returnIndividualNonprofit = function(req, res, next) {
|
||||
var dashedName = req.params.nonprofitName;
|
||||
var nonprofitName = dashedName.replace(/\-/g, ' ');
|
||||
@@ -179,12 +93,6 @@ exports.returnIndividualNonprofit = function(req, res, next) {
|
||||
);
|
||||
};
|
||||
|
||||
exports.showAllNonprofits = function(req, res) {
|
||||
var data = {};
|
||||
data.nonprofitsList = resources.allNonprofitNames();
|
||||
res.send(data);
|
||||
};
|
||||
|
||||
exports.interestedInNonprofit = function(req, res, next) {
|
||||
if (req.user) {
|
||||
Nonprofit.findOne(
|
||||
|
@@ -234,12 +234,6 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
jobs: function jobs(req, res) {
|
||||
res.render('resources/jobs', {
|
||||
title: 'Job Board for Front End Developer and Full Stack JavaScript Developer Jobs'
|
||||
});
|
||||
},
|
||||
|
||||
jobsForm: function jobsForm(req, res) {
|
||||
res.render('resources/jobs-form', {
|
||||
title: 'Employer Partnership Form for Job Postings, Recruitment and Corporate Sponsorships'
|
||||
|
18
models/Job.js
Normal file
18
models/Job.js
Normal file
@@ -0,0 +1,18 @@
|
||||
var mongoose = require('mongoose');
|
||||
var secrets = require('../config/secrets');
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {exports.Schema}
|
||||
*/
|
||||
|
||||
var Long = mongoose.Types.Long;
|
||||
var jobSchema = new mongoose.Schema({
|
||||
position: String,
|
||||
company: String,
|
||||
logoUrl: String,
|
||||
postingUrl: String,
|
||||
copy: Array
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Job', jobSchema);
|
30
seed_data/jobs.json
Normal file
30
seed_data/jobs.json
Normal file
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"id": "bd7167d8c441cbafaeb5bdef",
|
||||
"company": "Livestream",
|
||||
"position": "Junior Backend Developer (Node.js)",
|
||||
"logoUrl": "https://s3.amazonaws.com/prod-heroku/greenhouse_job_boards/logos/000/001/189/resized/livestream_logo-rgb_standard-cc718e67ce1a0f6fa400f609bdefe605.png?1429547161",
|
||||
"postingUrl": "https://boards.greenhouse.io/livestream/jobs/59458?t=ek25h0#.VWeTk1xVhBc?source=freecodecamp.com"
|
||||
},
|
||||
{
|
||||
"id": "bd7167d8c442cbafaeb5bdef",
|
||||
"company": "Adobe",
|
||||
"position": "Junior JavaScript Engineer",
|
||||
"logoUrl": "http://cdn-3.famouslogos.us/images/adobe-logo.jpg",
|
||||
"postingUrl": "https://adobe.taleo.net/careersection/2/jobdetail.ftl?job=32619&lang=en"
|
||||
},
|
||||
{
|
||||
"id": "bd7167d8c443cbafaeb5bdef",
|
||||
"company": "Bookspan",
|
||||
"position": "Full Stack JavaScript Developer (Junior)",
|
||||
"logoUrl": "https://tm-prod.global.ssl.fastly.net/uploaded/companies/227/small_logo.png?v=db9dbe",
|
||||
"postingUrl": "http://bookspan.theresumator.com/apply/10190b666b74087b537f4659756f7c5679000704722064232c1d2e3b2b102501310437/Fullstack-Javascript-Developer-junior?source=freecodecamp.com&sid=zvi9YD9OcHwoDZNgM3XI9uPszGvqxJo6eHf"
|
||||
},
|
||||
{
|
||||
"id": "bd7167d8c444cbafaeb5bdef",
|
||||
"company": "Good Eggs",
|
||||
"position": "Full Stack Developer",
|
||||
"logoUrl": "https://d1qb2nb5cznatu.cloudfront.net/startups/i/72165-64efbd521cdfe3357c811758f5436e7d-medium_jpg.jpg",
|
||||
"postingUrl": "http://www.jobscore.com/jobs2/goodeggs/full-stack-developer/cQ_hd-0USr4Om7eJe4iefn?Board=freecodecamp.com"
|
||||
}
|
||||
]
|
@@ -2,17 +2,19 @@ require('dotenv').load();
|
||||
var Challenge = require('../models/Challenge.js'),
|
||||
FieldGuide = require('../models/FieldGuide.js'),
|
||||
Nonprofit = require('../models/Nonprofit.js'),
|
||||
Job = require('../models/Job.js'),
|
||||
mongoose = require('mongoose'),
|
||||
secrets = require('../config/secrets'),
|
||||
fieldGuides = require('./field-guides.json'),
|
||||
nonprofits = require('./nonprofits.json'),
|
||||
jobs = require('./jobs.json'),
|
||||
fs = require('fs');
|
||||
|
||||
mongoose.connect(secrets.db);
|
||||
var challenges = fs.readdirSync(__dirname + '/challenges');
|
||||
|
||||
var counter = 0;
|
||||
var offerings = 2 + challenges.length;
|
||||
var offerings = 3 + challenges.length;
|
||||
|
||||
var CompletionMonitor = function() {
|
||||
counter++;
|
||||
@@ -42,6 +44,7 @@ Challenge.remove({}, function(err, data) {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
FieldGuide.remove({}, function(err, data) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
@@ -75,3 +78,20 @@ Nonprofit.remove({}, function(err, data) {
|
||||
});
|
||||
console.log('nonprofits');
|
||||
});
|
||||
|
||||
Job.remove({}, function(err, data) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
console.log('Deleted ', data);
|
||||
}
|
||||
Job.create(jobs, function(err, data) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
console.log('Saved ', data);
|
||||
}
|
||||
CompletionMonitor();
|
||||
});
|
||||
console.log('jobs');
|
||||
});
|
||||
|
33
views/jobs/directory.jade
Normal file
33
views/jobs/directory.jade
Normal file
@@ -0,0 +1,33 @@
|
||||
extends ../layout
|
||||
block content
|
||||
script.
|
||||
var challengeName = 'Jobs View';
|
||||
.row
|
||||
|
||||
.panel.panel-info
|
||||
.panel-heading.text-center Junior JavaScript Engineer Jobs
|
||||
.panel-body
|
||||
.col-xs-12.col-sm-12.col-md-10.col-md-offset-1
|
||||
h2.text-center We want all our campers to get awesome software engineer jobs.
|
||||
h2.text-center
|
||||
a(href='https://www.linkedin.com/groups?viewMembers=&gid=6966827&sik=1432338555021' target='_blank') Many already have
|
||||
| .
|
||||
p.text-center.large-p.hidden-xs.hidden-sm This is a small sampling of the 1,000s of junior software engineer jobs. Learn about the  
|
||||
a(href='http://blog.freecodecamp.com/2014/10/the-real-reason-to-learn-mean-stack.html' target='_blank') the job market in aggregate
|
||||
| .
|
||||
.spacer
|
||||
|
||||
.text-center
|
||||
a.btn.btn-primary.btn-big(href='/jobs-form') My organization is hiring software engineers
|
||||
.spacer
|
||||
.spacer
|
||||
for job in jobs
|
||||
.spacer
|
||||
.row
|
||||
.col-xs-12.col-sm-2
|
||||
img.img-responsive.img-center(src=job.logoUrl)
|
||||
.col-xs-12.col-sm-10
|
||||
h2.negative-15= job.position
|
||||
h3.negative-15= job.company
|
||||
a.text-center.btn.btn-primary.btn-lg(href=job.postingUrl target='_blank') More info
|
||||
.spacer
|
@@ -1,65 +0,0 @@
|
||||
extends ../layout
|
||||
block content
|
||||
.jumbotron.text-center
|
||||
h1.hug-top Here are some other solutions we recommend
|
||||
.spacer
|
||||
h2 Please note that Free Code Camp is not partnered with, nor do we receive a referral fee from, any of the following providers. We simply want to help guide you towards a solution for your organization.
|
||||
h3 Skills-based Volunteer Organizations
|
||||
ul
|
||||
li
|
||||
a(href='http://www.volunteermatch.com') Volunteer Match
|
||||
li
|
||||
a(href='http://www.catchafire.com') Catchafire
|
||||
h3 DIY Websites
|
||||
ul
|
||||
li
|
||||
a(href='http://www.wix.com') Wix
|
||||
li
|
||||
a(href='http://www.squarespace.com/') Square Space
|
||||
|
||||
h3 Donor and Volunteer Management Systems
|
||||
ul
|
||||
li
|
||||
a(href='https://www.thedatabank.com/') The Data Bank
|
||||
li
|
||||
a(href='http://www.donorsnap.com/') DonorSnap
|
||||
li
|
||||
a(href='http://www.donorperfect.com/') Donor Perfect
|
||||
li
|
||||
a(href='https://www.blackbaud.com/fundraising-crm/etapestry-donor-management') eTapestry
|
||||
li
|
||||
a(href='http://www.z2systems.com/') NeonCRM
|
||||
li
|
||||
a(href='http://www.regpacks.com/volunteer-management/') Regpack
|
||||
li
|
||||
a(href='http://sumac.com/') Sumac
|
||||
li
|
||||
a(href='http://www.volgistics.com/') Volgistics
|
||||
h3 Inventory Management Systems
|
||||
ul
|
||||
li
|
||||
a(href='https://www.ezofficeinventory.com/industries/non-profits') EZ Office Inventory
|
||||
li
|
||||
a(href='https://www.ordoro.com') Ordoro
|
||||
li
|
||||
a(href='http://www.unleashedsoftware.com') Unleashed
|
||||
h3 E-Learning platforms
|
||||
ul
|
||||
li
|
||||
a(href='http://www.dokeos.com/') Dokeos
|
||||
li
|
||||
a(href='http://www.efrontlearning.net/') eFront
|
||||
li
|
||||
a(href='https://moodle.org/') Moodle
|
||||
li
|
||||
a(href='https://sakaiproject.org/') Sakai
|
||||
h3 Community Management
|
||||
ul
|
||||
li
|
||||
a(href='https://civicrm.org/') CiviCRM
|
||||
li
|
||||
a(href='http://tcmgr.com/') Total Community Manager
|
||||
h3 Electronic Forms
|
||||
ul
|
||||
li
|
||||
a(href='http://www.google.com/forms') Google Forms
|
@@ -1,16 +0,0 @@
|
||||
extends ../layout-wide
|
||||
block content
|
||||
.row
|
||||
.col-xs-12.col-sm-8.col-sm-offset-2.text-center
|
||||
h2 We want all our campers to get awesome software engineer jobs (
|
||||
a(href='https://www.linkedin.com/groups?viewMembers=&gid=6966827&sik=1432338555021' target='_blank') and many already have
|
||||
| ).
|
||||
h3.hidden-xs.hidden-sm This is a small sampling of the 1,000s of junior software engineer jobs. Learn about the  
|
||||
a(href='http://blog.freecodecamp.com/2014/10/the-real-reason-to-learn-mean-stack.html' target='_blank') the job market in aggregate
|
||||
| .
|
||||
.spacer
|
||||
a.btn.btn-primary.btn-big(href='/jobs-form') My organization is hiring software engineers
|
||||
.spacer
|
||||
.embed-responsive.embed-responsive-4by3.hidden-xs.hidden-sm
|
||||
iframe.embed-responsive-item(src="http://freecodecamp.simply-partner.com" scrolling="no")
|
||||
.spacer
|
Reference in New Issue
Block a user