diff --git a/common/models/nonprofit.json b/common/models/nonprofit.json index 2cfad23d66d..35713aa13d1 100644 --- a/common/models/nonprofit.json +++ b/common/models/nonprofit.json @@ -8,21 +8,12 @@ "type": "string", "unique": true }, - "requestedDeliverables": { - "type": "array" - }, "whatDoesNonprofitDo": { "type": "string" }, "websiteLink": { "type": "string" }, - "stakeholderName": { - "type": "string" - }, - "stakeholderEmail": { - "type": "string" - }, "endUser": { "type": "string" }, @@ -41,11 +32,8 @@ "estimatedHours": { "type": "number" }, - "interestedCampers": { - "type": [] - }, - "confirmedCampers": { - "type": [] + "moneySaved": { + "type": "number" }, "currentStatus": { "type": "string" diff --git a/seed/challenges/get-set-for-free-code-camp.json b/seed/challenges/get-set-for-free-code-camp.json index ecb1762bbc6..9a242fbd9f0 100644 --- a/seed/challenges/get-set-for-free-code-camp.json +++ b/seed/challenges/get-set-for-free-code-camp.json @@ -271,7 +271,7 @@ "_id": "bd7126d8c431eddfaeb5bd3e", "name": "Waypoint: Add Free Code Camp to your LinkedIn Profile", "difficulty": 0.008, - "challengeSeed": "131574134", + "challengeSeed": ["131574134"], "description": [ "LinkedIn is a critical tool for your job search later on.", "Add Free Code Camp to your LinkedIn profile by going to https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp.", diff --git a/seed/field-guides.json b/seed/field-guides.json index 9d3e906d162..e626d3acae3 100644 --- a/seed/field-guides.json +++ b/seed/field-guides.json @@ -225,7 +225,7 @@ "

", "

This is the most time-efficient way to handle being stuck, and it's the most respectful of other people's time, too.

", "

Most of the time, you'll solve your problem after just one or two steps of this algorithm.

", - "

We have a special chat room just for getting help: https://freecodecamp.slack.com/messages/help/

", + "

We have a special chat room just for getting help: https://gitter.im/freecodecamp/help/

", "

Also, if you need to post on Stack Overflow, be sure to read their guide to asking good questions: http://stackoverflow.com/help/how-to-ask.

", "

Learning to code is hard. But it's a lot easier if you ask for help when you need it!

", "" diff --git a/seed/nonprofits.json b/seed/nonprofits.json index 23ba9af6529..2b862070c04 100644 --- a/seed/nonprofits.json +++ b/seed/nonprofits.json @@ -1,13 +1,6 @@ [ { "id": "bd7157d8c441cbafaeb5bdef", - "requestedDeliverables": [ - "website", - "donor", - "inventory", - "volunteer", - "form" - ], "whatDoesNonprofitDo": "We help the many less-fortunate Jewish families in our community, by providing them with nutritious food and energy to grow, learn, work, and give them hope for a better and brighter future.", "websiteLink": "http://chasdeikaduri.org/", "name": "Chasdei Kaduri", @@ -21,17 +14,13 @@ ], "projectDescription": "Campers will create a system will integrate the food inventory, donor and delivery driver management systems as well as replace the current application system with a custom form solution. System will include a more streamlined operations management, with user printable lists of inventory, drivers, and deliveries.", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54c7e02f2c173c37015b2f36/604x309/00580a0567a4b3afda29d52b09e7e829/rQQ6zwq31Uya8ie9QHC-MlvfXxqftm9UPPe524JUhmwSEaZjQ7oL7U1tVoHLUj-gVUwM-7uzBGFsAXD_A_cx_JyAZP4Td-GMBJ-AebJNRAQP0m0v253eKMkURp63aG4%3Ds0-d-e1-ft.png", - "imageUrl": "http://chasdeikaduri.org/images/523455_516325865106850_1885515210_n.jpg", - "estimatedHours": 200, - "interestedCampers": [], - "confirmedCampers": [], - "currentStatus": "completed" + "imageUrl": "https://pbs.twimg.com/media/B3d6B8PIYAAa6QL.jpg", + "estimatedHours": 300, + "currentStatus": "completed", + "moneySaved": 60000 }, { "id": "bd7158d8c464cbafaeb4bdef", - "requestedDeliverables": [ - "other" - ], "whatDoesNonprofitDo": "We connect simple technology with last mile communities to reduce poverty.", "websiteLink": "http://kopernik.info/", "name": "Kopernik", @@ -43,13 +32,11 @@ "logoUrl": "https://trello-attachments.s3.amazonaws.com/54d29f1e4c726fd765fa87ef/54d29f6388812dd367a243ab/x/018d9d3be5439870c56cccba5b3aa8bf/kopernik-logo-global.png", "imageUrl": "http://kopernik.info/sites/default/files/updates/Presenting_the_low_carbon_t.jpg", "estimatedHours": 100, - "currentStatus": "completed" + "currentStatus": "completed", + "moneySaved": 20000 }, { "id": "bd1326d9c245cbafaeb4bdef", - "requestedDeliverables": [ - "website" - ], "whatDoesNonprofitDo": "We distribute biodegradable toothbrushes globally to children in need.", "websiteLink": "http://www.operationbrush.org/", "name": "Operation Brush", @@ -61,15 +48,11 @@ "logoUrl": "https://trello-attachments.s3.amazonaws.com/54d9810307b159a4d9027aa2/54d981bfe5eb145560fbb769/x/cf7f318bfe4aee631b0d0eeef272225c/logo.png", "imageUrl": "http://www.operationbrush.org/images/temp/hands1.png", "estimatedHours": 100, - "interestedCampers": [], - "confirmedCampers": [], - "currentStatus": "completed" + "currentStatus": "completed", + "moneySaved": 20000 }, { "id": "bd1325d8c464cbafaeb5bdef", - "requestedDeliverables": [ - "community" - ], "whatDoesNonprofitDo": "We are the largest roller derby league in the world with around 250 adults and 150 junior skater members plus 500+ volunteers.", "websiteLink": "http://www.rosecityrollers.com/about/our-charities/", "name": "Rose City Rollers", @@ -81,13 +64,11 @@ "logoUrl": "https://trello-attachments.s3.amazonaws.com/54c1daf2d72d8eb868910b60/54c1dd4ecffcb09fc52b68a1/x/a8148f08769b449217e433bab8f39ddd/RCR-color.jpg", "imageUrl": "http://www.rosecityrollers.com/wp-content/uploads/2015/01/BZ7_5923-X3-675x375.jpg", "estimatedHours": 200, - "currentStatus": "started" + "currentStatus": "started", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb6bde1", - "requestedDeliverables": [ - "website" - ], "whatDoesNonprofitDo": "We provide urgently needed pediatric heart surgery and follow-up care for indigent children from developing countries", "websiteLink": "http://www.saveachildsheart.com/global/young-leadership-program/", "name": "Save a Child's Heart", @@ -98,14 +79,12 @@ "projectDescription": "Campers will create a single page fundraising website. In exchange for a donation, a user can customize a graphical 'heart' in someone's name or anonymously. The page will display all of the hearts on a 'wall of hearts.'", "logoUrl": "https://trello-attachments.s3.amazonaws.com/548b36629137780091a973cc/666x666/6c7a366ffb659649f6377d4a431687cd/country-logos-1-300dpi.jpg", "imageUrl": "http://www.saveachildsheart.com/wp-content/uploads/2013/10/7.2.5_Internation_Photograohy_Exhibition.jpg", - "estimatedHours": 100, - "currentStatus": "completed" + "estimatedHours": 200, + "currentStatus": "completed", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb4bdef", - "requestedDeliverables": [ - "website" - ], "whatDoesNonprofitDo": "We empower youth with technology by providing age appropriate resources and education.", "websiteLink": "http://savvycyberkids.org/", "name": "Savvy Cyber Kids", @@ -117,13 +96,11 @@ "logoUrl": "https://trello-attachments.s3.amazonaws.com/54ee3c7bf205562680177b59/218x190/1dc460de4edc9fdd4b481b24e93cfb23/logo.png", "imageUrl": "http://www.privatewifi.com/wp-content/uploads/2014/10/Halpert.jpg", "estimatedHours": 200, - "currentStatus": "started" + "currentStatus": "started", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb7bcef", - "requestedDeliverables": [ - "other" - ], "whatDoesNonprofitDo": "We bring a new edge to arts and medicine in the Bay Area through powerful live performances of new music to those who feel marginalized by their affliction.", "websiteLink": "http://transcendentpathways.org/", "name": "Transcendent Pathways", @@ -135,13 +112,11 @@ "logoUrl": "http://static1.squarespace.com/static/521b8957e4b024f66a58b214/t/521b8e9de4b093a8696eb9b8/1398718364447/?format=750w", "imageUrl": "https://trello-attachments.s3.amazonaws.com/54fdb0328917ca64e9e8a79f/54fdc3b710f67caf6da14719/x/49fbe0012179bf254928f3f2a44810b4/Screen_2BShot_2B2013-08-26_2Bat_2B1.32.35_2BPM.png", "estimatedHours": 200, - "currentStatus": "started" + "currentStatus": "started", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb8bdef", - "requestedDeliverables": [ - "other" - ], "whatDoesNonprofitDo": "We have provide volunteer matching fairs and silent art auctions at events across Canada. Rather than bid money on artwork, participants bid volunteer hours.", "websiteLink": "http://www.timeraiser.ca/", "name": "Timeraiser", @@ -152,19 +127,12 @@ "projectDescription": "Campers will build a mobile responsive web form to allow Timeraiser eventgoers to select which nonprofit organizations they're interested in volunteering with. System will have Salesforce integration and reporting capabilities.", "logoUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/1277176.png?480", "imageUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/______________4571248_orig.png", - "currentStatus": "started", - "interestedCampers": [], - "confirmedCampers": [], - "estimatedHours": 100, - "currentStatus": "completed" + "estimatedHours": 200, + "currentStatus": "completed", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb7bdef", - "requestedDeliverables": [ - "website", - "inventory", - "form" - ], "whatDoesNonprofitDo": "We focus on raising funds to assist injured homeless animals.", "websiteLink": "http://www.peoplesavinganimals.org/", "name": "People Saving Animals", @@ -178,15 +146,11 @@ "logoUrl": "https://scontent-sjc2-1.xx.fbcdn.net/hphotos-xfa1/v/t1.0-9/59709_501505959886494_1605714757_n.jpg?oh=e12c08c046d824765a02242b7c8c3bb5&oe=560CFA6A", "imageUrl": "https://scontent-sjc2-1.xx.fbcdn.net/hphotos-xta1/t31.0-8/11270516_844556088914811_757350153964826829_o.jpg", "estimatedHours": 300, - "currentStatus": "started" + "currentStatus": "started", + "moneySaved": 60000 }, { "id": "bd1325d8c464cbafaeb6bde2", - "requestedDeliverables": [ - "inventory", - "form", - "other" - ], "whatDoesNonprofitDo": "We preserve Florida's health by regulating septic contractors and reviewing logs of sewage collection and disposal.", "websiteLink": "http://www.floridahealth.gov/", "name": "Florida Department of Health", @@ -200,13 +164,11 @@ "logoUrl": "http://www.floridahealth.gov/_new/_files/images/DOH_logo.png", "imageUrl": "http://www.dep.state.fl.us/central/Home/Watershed/Home.jpg", "estimatedHours": 200, - "currentStatus": "started" + "currentStatus": "started", + "moneySaved": 40000 }, { "id": "bd1325d8c464cbafaeb6bde3", - "requestedDeliverables": [ - "website" - ], "whatDoesNonprofitDo": "We strengthen the value of songwriting and independent music in Columbus, Ohio.", "websiteLink": "http://columbussongwritersassociation.com", "name": "Columbus Songwriters Association", @@ -218,6 +180,87 @@ "logoUrl": "https://columbussongwritersassociation.files.wordpress.com/2014/06/csa-logo.jpeg?w=705&h=435&crop=1", "imageUrl": "https://columbussongwritersassociation.files.wordpress.com/2015/03/10502364_918551148225410_5082247612691070613_n.jpg?w=705&h=344&crop=1", "estimatedHours": 100, - "currentStatus": "completed" + "currentStatus": "completed", + "moneySaved": 20000 + }, + { + "id": "bd1325d8c464cbafaeb4bbb", + "whatDoesNonprofitDo": "We leverage all the benefits of cycling to support and improve the lives of youth and teens in the Triangle region.", + "websiteLink": "http://www.trianglebikeworks.org", + "name": "Triangle Bike Works", + "endUser": "Youth and teens in the Triangle region.", + "approvedDeliverables": [ + "website" + ], + "projectDescription": "Campers will build a website with donation integration.", + "logoUrl": "http://i.imgur.com/T5OkXuT.png", + "imageUrl": "http://i.imgur.com/7bOaMPq.jpg", + "estimatedHours": 100, + "currentStatus": "open", + "moneySaved": 0 + }, + { + "id": "bd1325d8c464cbafaeb4bccc", + "whatDoesNonprofitDo": "We work to eradicate female genital mutilation in the US and Gambia. We work with survivors and communities.", + "websiteLink": "http://safehandsforgirls.org/", + "name": "Safe Hands for Girls", + "endUser": "Supporters", + "approvedDeliverables": [ + "website" + ], + "projectDescription": "Campers will build a website with donation management.", + "logoUrl": "http://i.imgur.com/QnAY6Ji.png", + "imageUrl": "http://i.imgur.com/s9E4oa9.jpg", + "estimatedHours": 100, + "currentStatus": "open", + "moneySaved": 0 + }, + { + "id": "bd1325d8c464cbafaeb4beff", + "whatDoesNonprofitDo": "We're a part of the Department of Psychiatry at Mass General Hospital. We teach an innovative way for helping people that have challenging behaviors.", + "websiteLink": "http://www.thinkkids.org/", + "name": "Think Kids at Massachusetts General Hospital", + "endUser": "Volunteers, Administrators", + "approvedDeliverables": [ + "volunteer" + ], + "projectDescription": "We would like help developing a simple online based portal for both our trainees and trainers where we can store and share documents, track their progress, and incorporate a blackboard/chat forum.", + "logoUrl": "http://www.thinkkids.org/wp-content/themes/think-kids/images/logo.png", + "imageUrl": "http://i.imgur.com/hiGJms5.png", + "estimatedHours": 300, + "currentStatus": "open", + "moneySaved": 0 + }, + { + "id": "bd1325d8c464cbaeaeb4bdef", + "whatDoesNonprofitDo": "We enable, educate, and empower students from rural backgrounds in Uttar Pradesh, India.", + "websiteLink": "http://www.milaan.in/", + "name": "Milaan", + "endUser": "Supporters", + "approvedDeliverables": [ + "website" + ], + "projectDescription": "Campers will build a basic website for the US operations of Milaan. ", + "logoUrl": "http://i.imgur.com/GLq1qqD.png", + "imageUrl": "http://www.milaan.in/wp-content/uploads/2014/07/IMG_2624-e1432218749722.jpg", + "estimatedHours": 100, + "currentStatus": "open", + "moneySaved": 0 + }, + { + "id": "bd1325d8c464cbafaeb4beee", + "whatDoesNonprofitDo": "We're committed to closing the opportunity gap for children in Baltimore City by providing high quality after school and in-school programs.", + "websiteLink": "http://childfirstauthority.org/", + "name": "Child First Authority", + "endUser": "School Coordinators", + "approvedDeliverables": [ + "volunteer" + ], + "projectDescription": "Campers will build a dynamic database that will allow 7 community school coordinators to (1) input student-level absenteeism data, (2) code and track outreach efforts, (3) code root causes for absenteeism, and (4) track trends in each area. Currently, Child First uses an unwieldy excel spreadsheet to do this.", + "logoUrl": "http://i.imgur.com/YlPsQmN.jpg", + "imageUrl": "http://childfirstauthority.org/wp-content/uploads/2012/09/CFAHEADER7.gif", + "estimatedHours": 200, + "currentStatus": "open", + "moneySaved": 0 } ] diff --git a/server/boot/nonprofits.js b/server/boot/nonprofits.js index 8411d7f31c0..23bf2d979ea 100644 --- a/server/boot/nonprofits.js +++ b/server/boot/nonprofits.js @@ -15,11 +15,22 @@ module.exports = function(app) { app.use(router); function nonprofitsDirectory(req, res, next) { - findNonprofits({ where: { estimatedHours: { gt: 0 } } }).subscribe( + var sum = 0; + findNonprofits({}).subscribe( function(nonprofits) { + nonprofits = nonprofits.sort(function(a, b) { + return b.moneySaved - a.moneySaved; + }); + totalSavings = function() { + for(i = 0; i < nonprofits.length; i++) { + sum += nonprofits[i].moneySaved; + } + return sum; + }(); res.render('nonprofits/directory', { title: 'Nonprofits we help', - nonprofits: nonprofits + nonprofits: nonprofits, + totalSavings: totalSavings.toString().replace(/000$/, ',000') }); }, next @@ -67,6 +78,8 @@ module.exports = function(app) { } } + + res.render('nonprofits/show', { dashedName: dashedNameFull, title: nonprofit.name, @@ -100,6 +113,7 @@ module.exports = function(app) { interestedCampers: nonprofit.interestedCampers, assignedCampers: nonprofit.assignedCampers, buttonActive: buttonActive, + moneySaved: nonprofit.moneySaved, currentStatus: nonprofit.currentStatus }); }, diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js index c071bd8afa5..e891c929bdf 100644 --- a/server/boot/randomAPIs.js +++ b/server/boot/randomAPIs.js @@ -30,7 +30,6 @@ module.exports = function(app) { router.get('/nonprofits', nonprofits); router.get('/nonprofits-form', nonprofitsForm); router.get('/our-sponsors', sponsors); - router.get('/become-a-sponsor', becomeASponsor); router.get('/jobs-form', jobsForm); router.get('/submit-cat-photo', catPhotoSubmit); router.get('/unsubscribe/:email', unsubscribe); @@ -245,12 +244,6 @@ module.exports = function(app) { }); } - function becomeASponsor(req, res) { - res.render('sponsors/become-a-sponsor', { - title: 'The Sponsors who make Free Code Camp Possible' - }); - } - function nonprofits(req, res) { res.render('resources/nonprofits', { title: 'A guide to our Nonprofit Projects' diff --git a/server/views/nonprofits/directory.jade b/server/views/nonprofits/directory.jade index 2cb2794cbc0..e30a6671fd9 100644 --- a/server/views/nonprofits/directory.jade +++ b/server/views/nonprofits/directory.jade @@ -7,6 +7,8 @@ block content .panel-heading.text-center Nonprofits We Help .panel-body .col-xs-12.col-sm-12.col-md-10.col-md-offset-1 + h1.text-primary.text-center Our campers have saved nonprofits $#{totalSavings}. + .spacer for nonprofit in nonprofits .spacer .row @@ -15,8 +17,10 @@ block content .col-xs-12.col-sm-9 h2.negative-15= nonprofit.name h3.negative-15= nonprofit.whatDoesNonprofitDo + if (nonprofit.moneySaved > 0) + h4.negative-15.text-primary Estimated Cost Savings for Nonprofit: $#{nonprofit.moneySaved.toString().replace(/000$/, ',000')} a.text-center.btn.btn-primary.btn-lg(href='/nonprofits/' + nonprofit.name.toLowerCase().replace(/\s/g, '-')) Read more - + .spacer .col-xs-12.col-sm-8.col-sm-offset-2 if (!user) a.btn.btn-cta.signup-btn.btn-block(href="/nonprofits-form") My nonprofit needs coding help diff --git a/server/views/nonprofits/show.jade b/server/views/nonprofits/show.jade index e8c5f8debc0..f408a70aab8 100644 --- a/server/views/nonprofits/show.jade +++ b/server/views/nonprofits/show.jade @@ -43,6 +43,9 @@ block content if (approvedOther) .ion-settings   Other tools h3 Project Status: #{currentStatus} + if (moneySaved > 0) + h3.text-primary Estimated Cost Savings for Nonprofit: $#{moneySaved.toString().replace(/000$/, ',000')} + if (interestedCampers && interestedCampers.length > 0) h3 Interested campers: .col-xs-12.text-left diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade index e35b9c5e8ea..3f7475be42e 100644 --- a/server/views/partials/navbar.jade +++ b/server/views/partials/navbar.jade @@ -19,8 +19,6 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height a(href='/stories') News li a(href='/field-guide') Guide - li - a(href='/jobs') Jobs if !user li       li diff --git a/server/views/sponsors/become-a-sponsor.jade b/server/views/sponsors/become-a-sponsor.jade deleted file mode 100644 index a96d0aaf676..00000000000 --- a/server/views/sponsors/become-a-sponsor.jade +++ /dev/null @@ -1,10 +0,0 @@ -extends ../layout -block content - script. - .panel.panel-info - .panel-heading.text-center - h1 Sponsor the next wave of developers - .panel-body - img.img-responsive.img-center.border-radius-5(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png') - .col-xs-12.col-md-10.col-md-offset-1 - h2.text-center Call our executive team at +1 888-888-8888 diff --git a/server/views/sponsors/sponsors.jade b/server/views/sponsors/sponsors.jade index fc4ac679685..f74b462add0 100644 --- a/server/views/sponsors/sponsors.jade +++ b/server/views/sponsors/sponsors.jade @@ -9,7 +9,7 @@ block content .spacer .row .col-xs-12.col-md-10.col-md-offset-1 - a.btn.btn-cta.signup-btn.btn-block(href="/become-a-sponsor") Become a Sponsor + h1 Interested in becoming a sponsor? Call us any time at +1 888-888-8888 .spacer h1.text-center Platinum Sponsors .row