Merge branch 'master' into staging

This commit is contained in:
Quincy Larson
2015-06-01 13:55:53 -07:00
10 changed files with 30 additions and 138 deletions

View File

@ -114,7 +114,7 @@ passport.use(new FacebookStrategy(secrets.facebook, function(req, accessToken, r
'Feel free to email us at this address if you have any questions about Free Code Camp.\n', 'Feel free to email us at this address if you have any questions about Free Code Camp.\n',
"And if you have a moment, check out our blog: blog.freecodecamp.com.\n", "And if you have a moment, check out our blog: blog.freecodecamp.com.\n",
'Good luck with the challenges!\n\n', 'Good luck with the challenges!\n\n',
'- Our All-Volunteer Team' '- the Free Code Camp Volunteer Team'
].join('') ].join('')
}; };
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {
@ -189,7 +189,7 @@ passport.use(new GitHubStrategy(secrets.github, function(req, accessToken, refre
'Feel free to email us at this address if you have any questions about Free Code Camp.\n', 'Feel free to email us at this address if you have any questions about Free Code Camp.\n',
"And if you have a moment, check out our blog: blog.freecodecamp.com.\n", "And if you have a moment, check out our blog: blog.freecodecamp.com.\n",
'Good luck with the challenges!\n\n', 'Good luck with the challenges!\n\n',
'- the Volunteer Camp Counselor Team' '- the Free Code Camp Volunteer Team'
].join('') ].join('')
}; };
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {
@ -311,7 +311,7 @@ passport.use(new GoogleStrategy(secrets.google, function(req, accessToken, refre
'Feel free to email us at this address if you have any questions about Free Code Camp.\n', 'Feel free to email us at this address if you have any questions about Free Code Camp.\n',
"And if you have a moment, check out our blog: blog.freecodecamp.com.\n", "And if you have a moment, check out our blog: blog.freecodecamp.com.\n",
'Good luck with the challenges!\n\n', 'Good luck with the challenges!\n\n',
'- the Volunteer Camp Counselor Team' '- the Free Code Camp Volunteer Team'
].join('') ].join('')
}; };
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {
@ -387,7 +387,7 @@ passport.use(new LinkedInStrategy(secrets.linkedin, function(req, accessToken, r
'Feel free to email us at this address if you have any questions about Free Code Camp.\n', 'Feel free to email us at this address if you have any questions about Free Code Camp.\n',
"And if you have a moment, check out our blog: blog.freecodecamp.com.\n", "And if you have a moment, check out our blog: blog.freecodecamp.com.\n",
'Good luck with the challenges!\n\n', 'Good luck with the challenges!\n\n',
'- the Volunteer Camp Counselor Team' '- the Free Code Camp Volunteer Team'
].join('') ].join('')
}; };
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {

View File

@ -229,7 +229,7 @@ exports.postEmailSignup = function(req, res, next) {
'And if you have a moment, check out our blog: ', 'And if you have a moment, check out our blog: ',
'blog.freecodecamp.com.\n', 'blog.freecodecamp.com.\n',
'Good luck with the challenges!\n\n', 'Good luck with the challenges!\n\n',
'- the Volunteer Camp Counselor Team' '- the Free Code Camp Volunteer Team'
].join('') ].join('')
}; };
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {

View File

@ -309,6 +309,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.austin/' target='_blank'>Austin</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.austin/' target='_blank'>Austin</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.baltimore.md/' target='_blank'>Baltimore</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.baltimore.md/' target='_blank'>Baltimore</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bandung/' target='_blank'>Bandung</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bandung/' target='_blank'>Bandung</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.belem/' target='_blank'>Belem</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.belgrade/' target='_blank'>Belgrade</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.belgrade/' target='_blank'>Belgrade</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bellingham/' target='_blank'>Bellingham</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bellingham/' target='_blank'>Bellingham</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bengaluru/' target='_blank'>Bengaluru</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bengaluru/' target='_blank'>Bengaluru</a></li>",
@ -316,6 +317,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.berlin/' target='_blank'>Berlin</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.berlin/' target='_blank'>Berlin</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bhaktapur/' target='_blank'>Bhaktapur</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bhaktapur/' target='_blank'>Bhaktapur</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bijeljina/' target='_blank'>Bijeljina</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bijeljina/' target='_blank'>Bijeljina</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.oxford.al/' target='_blank'>Birmingham, Alabama</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bismarck.north.dakota/' target='_blank'>Bismarck, ND</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bismarck.north.dakota/' target='_blank'>Bismarck, ND</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bogota/' target='_blank'>Bogota</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bogota/' target='_blank'>Bogota</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.boston/' target='_blank'>Boston</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.boston/' target='_blank'>Boston</a></li>",
@ -351,6 +353,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.florianopolis/' target='_blank'>Florianopolis</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.florianopolis/' target='_blank'>Florianopolis</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.dallas/' target='_blank'>Fort Worth</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.dallas/' target='_blank'>Fort Worth</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.frankfurt.main/' target='_blank'>Frankfurt</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.frankfurt.main/' target='_blank'>Frankfurt</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.freehold/' target='_blank'>Freehold</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.geneva/' target='_blank'>Geneva</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.geneva/' target='_blank'>Geneva</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.Glendora.California/' target='_blank'>Glendora</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.Glendora.California/' target='_blank'>Glendora</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.jakarta/' target='_blank'>Jakarta</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.jakarta/' target='_blank'>Jakarta</a></li>",
@ -382,6 +385,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.limassol/' target='_blank'>Limassol</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.limassol/' target='_blank'>Limassol</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.london/' target='_blank'>London</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.london/' target='_blank'>London</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.los.angeles/' target='_blank'>Los Angeles</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.los.angeles/' target='_blank'>Los Angeles</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.lubbock/' target='_blank'>Lubbock</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.manila/' target='_blank'>Manila</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.manila/' target='_blank'>Manila</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.miami/' target='_blank'>Miami</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.miami/' target='_blank'>Miami</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.minneapolis/' target='_blank'>Minneapolis</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.minneapolis/' target='_blank'>Minneapolis</a></li>",
@ -392,6 +396,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.mysore/' target='_blank'>Mysore</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.mysore/' target='_blank'>Mysore</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.nairobi/' target='_blank'>Nairobi</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.nairobi/' target='_blank'>Nairobi</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.nashville/' target='_blank'>Nashville</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.nashville/' target='_blank'>Nashville</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.new.haven/' target='_blank'>New Haven</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.neworleans/' target='_blank'>New Orleans</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.neworleans/' target='_blank'>New Orleans</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.new.york.city/' target='_blank'>New York City</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.new.york.city/' target='_blank'>New York City</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.berkeley/' target='_blank'>Oakland</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.berkeley/' target='_blank'>Oakland</a></li>",
@ -399,7 +404,6 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.omaha/' target='_blank'>Omaha</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.omaha/' target='_blank'>Omaha</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.orange.county/' target='_blank'>Orange County</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.orange.county/' target='_blank'>Orange County</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.orlando.fl/' target='_blank'>Orlando</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.orlando.fl/' target='_blank'>Orlando</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.oxford.al/' target='_blank'>Oxford, Alabama</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.your.apucarana.parana/' target='_blank'>Parana</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.your.apucarana.parana/' target='_blank'>Parana</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.paris/' target='_blank'>Paris</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.paris/' target='_blank'>Paris</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.philadelphia/' target='_blank'>Philadelphia</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.philadelphia/' target='_blank'>Philadelphia</a></li>",
@ -439,6 +443,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.vlc/' target='_blank'>Valencia</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.vlc/' target='_blank'>Valencia</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.vancouver.bc.canada/' target='_blank'>Vancouver</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.vancouver.bc.canada/' target='_blank'>Vancouver</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.washington.dc/' target='_blank'>Washington, DC</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.washington.dc/' target='_blank'>Washington, DC</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.winnipeg/' target='_blank'>Winnipeg</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.zurich/' target='_blank'>Zurich</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.zurich/' target='_blank'>Zurich</a></li>",
" </ol>", " </ol>",
" </h4>", " </h4>",
@ -592,7 +597,7 @@
" <h3>Choosing your first Nonprofit Project</h3>", " <h3>Choosing your first Nonprofit Project</h3>",
" <p class='large-p'>We've categorized all the nonprofit projects by estimated time investment per camper: 100 hours, 200 hours, and 300 hours. These are only rough estimates.</p>", " <p class='large-p'>We've categorized all the nonprofit projects by estimated time investment per camper: 100 hours, 200 hours, and 300 hours. These are only rough estimates.</p>",
" <p class='large-p'>Example: if you and the camper you're paired up with (your pair) each stated you could work 20 hours per week. If the project is a 100 hour per camper project, you should be able to complete it in about 5 weeks.</p>", " <p class='large-p'>Example: if you and the camper you're paired up with (your pair) each stated you could work 20 hours per week. If the project is a 100 hour per camper project, you should be able to complete it in about 5 weeks.</p>",
" <p class='large-p'>Our team of nonprofit project camp counselors will match you and your pair based on:</p>", " <p class='large-p'>Our Nonprofit Project team will match you and your pair based on:</p>",
" <p class='large-p'>", " <p class='large-p'>",
" <ol>", " <ol>",
" <li>Your estimated time commitment (10, 20 or 40 hours per week)</li>", " <li>Your estimated time commitment (10, 20 or 40 hours per week)</li>",
@ -625,7 +630,7 @@
" <li>and establish deadlines based on your weekly time commitment, and how long you think each task will take.</li>", " <li>and establish deadlines based on your weekly time commitment, and how long you think each task will take.</li>",
" </ul>", " </ul>",
" </p>", " </p>",
" <p class='large-p'>It's notoriously difficult to estimate how long building software projects will take, so feel free to ask camp counselors for help.</p>", " <p class='large-p'>It's notoriously difficult to estimate how long building software projects will take, so feel free to ask our volunteer team for help.</p>",
" <p class='large-p'>You'll continue to meet with your stakeholder at least twice a month in your project's Slack channel.</p>", " <p class='large-p'>You'll continue to meet with your stakeholder at least twice a month in your project's Slack channel.</p>",
" <p class='large-p'>You should also ask questions in your project's Slack channel as they come up throughout the week, and your stakeholder can answer them asynchronously.</p>", " <p class='large-p'>You should also ask questions in your project's Slack channel as they come up throughout the week, and your stakeholder can answer them asynchronously.</p>",
" <p class='large-p'>Getting \"blocked\" on a task can take away your sense of forward momentum, so be sure to proactively seek answers to any ambiguities you encounter.</p>", " <p class='large-p'>Getting \"blocked\" on a task can take away your sense of forward momentum, so be sure to proactively seek answers to any ambiguities you encounter.</p>",
@ -648,7 +653,7 @@
" <p class='large-p'>Once you complete a nonprofit project, your obligation to its stakeholder is finished. You goal is to leave behind a well documented solution that can be easily maintained by a contract JavaScript developer (or even a less-technical \"super user\").</p>", " <p class='large-p'>Once you complete a nonprofit project, your obligation to its stakeholder is finished. You goal is to leave behind a well documented solution that can be easily maintained by a contract JavaScript developer (or even a less-technical \"super user\").</p>",
" <p class='large-p'>While you will no longer need to help with feature development, we encourage you to consider helping your stakeholder with occasional patches down the road. After all, this project will be an important piece of your portfolio, and you'll want it to remain in good shape for curious future employers.</p>", " <p class='large-p'>While you will no longer need to help with feature development, we encourage you to consider helping your stakeholder with occasional patches down the road. After all, this project will be an important piece of your portfolio, and you'll want it to remain in good shape for curious future employers.</p>",
" <h3>Pledging to finish the project</h3>", " <h3>Pledging to finish the project</h3>",
" <p class='large-p'>Your nonprofit stakeholder, your pair, and the volunteer camp counselor team are all counting on you to finish your nonprofit project. If you walk away from an unfinished nonprofit project, you'll become ineligible to ever be assigned another one.</p>", " <p class='large-p'>Your nonprofit stakeholder, your pair, and our volunteer team are all counting on you to finish your nonprofit project. If you walk away from an unfinished nonprofit project, you'll become ineligible to ever be assigned another one.</p>",
" <p class='large-p'>To confirm that you understand the seriousness of this commitment, we require that all campers &thinsp;<a href=\"http://goo.gl/forms/ZMn96z2QqY\">sign this pledge &thinsp;</a>before starting on their nonprofit projects.</p>", " <p class='large-p'>To confirm that you understand the seriousness of this commitment, we require that all campers &thinsp;<a href=\"http://goo.gl/forms/ZMn96z2QqY\">sign this pledge &thinsp;</a>before starting on their nonprofit projects.</p>",
" <p class='large-p'>There will likely be times of confusion or frustration. This is normal in software development. The most important thing is that you do not give up and instead persevere through these setbacks. As Steve Jobs famously said, \"Real artists ship.\" And you are going to ship one successful nonprofit project after another until you feel ready to take the next step in your promising career.</p>", " <p class='large-p'>There will likely be times of confusion or frustration. This is normal in software development. The most important thing is that you do not give up and instead persevere through these setbacks. As Steve Jobs famously said, \"Real artists ship.\" And you are going to ship one successful nonprofit project after another until you feel ready to take the next step in your promising career.</p>",
"</div>" "</div>"

View File

@ -16,5 +16,8 @@ block content
h2.negative-15= nonprofit.name h2.negative-15= nonprofit.name
h3.negative-15= nonprofit.whatDoesNonprofitDo h3.negative-15= nonprofit.whatDoesNonprofitDo
a.text-center.btn.btn-primary.btn-lg(href='/nonprofits/' + nonprofit.name.toLowerCase().replace(/\s/g, '-')) Read more a.text-center.btn.btn-primary.btn-lg(href='/nonprofits/' + nonprofit.name.toLowerCase().replace(/\s/g, '-')) Read more
.spacer
.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
.spacer

View File

@ -55,20 +55,21 @@ block content
for assignedCamper in assignedCampers for assignedCamper in assignedCampers
a(href='/' + assignedCamper.username class="interested-camper-image") a(href='/' + assignedCamper.username class="interested-camper-image")
img.profile-picture.float-right(src=assignedCamper.picture) img.profile-picture.float-right(src=assignedCamper.picture)
.spacer
if (!buttonActive) if (!buttonActive)
.col-xs-12.col-sm-8.col-sm-offset-2 .col-xs-12.col-sm-8.col-sm-offset-2
.text-center .text-center
a.btn.btn-primary.btn-big.btn-block.disabled(href='/nonprofits/interested-in-nonprofit/#{dashedName}') I'm interested in building this project * if !user
p * Complete all our Bonfires, Ziplines, and Basejumps to unlock this. a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free)
.button-spacer
else
a.btn.btn-primary.btn-big.btn-block.disabled(href='/nonprofits/interested-in-nonprofit/#{dashedName}') I'm interested in building this project *
p * Complete all our Bonfires, Ziplines, and Basejumps to unlock this.
a.btn.btn-info.btn-big.btn-block(href='/nonprofits/directory') Show all Nonprofit Projects a.btn.btn-info.btn-big.btn-block(href='/nonprofits/directory') Show all Nonprofit Projects
.spacer
if (buttonActive) if (buttonActive)
.col-xs-12.col-sm-8.col-sm-offset-2 .col-xs-12.col-sm-8.col-sm-offset-2
.text-center .text-center
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/interested-in-nonprofit/#{dashedName}') I'm interested in building this project a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/interested-in-nonprofit/#{dashedName}') I'm interested in building this project
.button-spacer
a.btn.btn-info.btn-big.btn-block(href='/nonprofits/directory') Show all Nonprofit Projects a.btn.btn-info.btn-big.btn-block(href='/nonprofits/directory') Show all Nonprofit Projects
.row .spacer
.col-xs-12.text-center
if !user
a.btn.btn-cta.signup-btn.btn-primary(href="/login") Start learning to code (it's free)
.spacer

View File

@ -1,43 +0,0 @@
h3
ol#fieldGuideList
script(src='/js/lib/ramda/ramda.min.js')
script.
var getLinkedName = function getLinkedName(name) {
// ensure name is a string
name = name + '';
return name.toLowerCase().replace(/\s/g, '-').replace(/\?/g, '');
}
$.ajax({
url: '/field-guide/getFieldGuideList',
type: 'GET'
})
.success(
function(data) {
var docfrag = document.createDocumentFragment();
for (var i = 0; i < data.fieldGuideList.length; i++) {
var div = document.createElement("div");
// strike through field guides previously read
var linkedName = getLinkedName(data.fieldGuideList[i].name);
if (data.completedFieldGuides.indexOf(data.fieldGuideIds[i]) > -1) {
$(div).html("<div class='row'>" +
"<div class='hidden-xs col-sm-3 col-md-2 text-primary ion-checkmark-circled padded-ionic-icon text-center'></div>" +
"<div class='col-xs-12 col-sm-6 col-md-8'>" +
"<li class='faded'><a href='/field-guide/" + linkedName + "'>" + data.fieldGuideList[i].name + "</a></li>" +
"</div>" +
"<div class='col-sm-3 col-md-2'></div>" +
"</div>" +
"</div>");
} else {
$(div).html("<div class='row'>" +
"<div class='hidden-xs col-sm-3 col-md-2'></div>" +
"<div class='col-xs-12 col-sm-6 col-md-8'>" +
"<li><a href='/field-guide/" + linkedName + "'>" + data.fieldGuideList[i].name + "</a></li>" +
"</div>" +
"<div class='col-sm-3 col-md-2'></div>" +
"</div>" +
"</div>");
}
docfrag.appendChild(div);
};
$('#fieldGuideList').append(docfrag);
});

View File

@ -1,13 +0,0 @@
#github
script.
(function() {
$.ajax({
url: '/api/github',
type: 'GET'
}).done(
function(data) {
var github = document.createElement('div');
$(github).html('<h3>' + data.issues + ' GitHub issues are open. <a href="https://github.com/freecodecamp/freecodecamp/issues">(create one)</a></h3><h3>' + data.pulls + ' pull requests are open. <a href="https://github.com/freecodecamp/freecodecamp/pulls">(create one)</a></div></div>').prependTo($('#github'))
}
);
})();

View File

@ -1,39 +0,0 @@
.spacer
.progress
.progress-bar(role='progressbar', aria-valuenow= (step * 10), aria-valuemin='0', aria-valuemax='100', style="width: #{step * 10}%;")
span.sr-only= step * 10
| % Complete
h3.gray-text.text-center Step #{step} of 10
script.
$('#story-url').on('keypress', function (e) {
if (e.which === 13 || e === 13) {
$('#preliminary-story-submit').click();
}
});
var preliminaryStorySubmit = function preliminaryStorySubmit() {
var storyURL = $('#story-url').val();
$('#preliminary-story-submit').attr('disabled', 'disabled');
$.post('/stories/preliminary',
{
data: {
url: storyURL
}
})
.fail(function (xhr, textStatus, errorThrown) {
$('#preliminary-story-submit').attr('disabled', false);
})
.done(function (data, textStatus, xhr) {
if (data.alreadyPosted) {
window.location = data.storyURL;
} else {
window.location = '/stories/submit/new-story?url=' +
encodeURIComponent(data.storyURL) +
'&title=' + encodeURIComponent(data.storyTitle) +
'&image=' + encodeURIComponent(data.storyImage) +
'&description=' + encodeURIComponent(data.storyMetaDescription);
}
});
}
$('#preliminary-story-submit').on('click', preliminaryStorySubmit);

View File

@ -1,24 +0,0 @@
h3
ol#nonprofitsList
script(src='/js/lib/ramda/ramda.min.js')
script.
var getLinkedName = function getLinkedName(name) {
// ensure name is a string
name = name + '';
return name.toLowerCase().replace(/\s/g, '-');
}
$.ajax({
url: '/nonprofits/getNonprofitList',
type: 'GET'
})
.success(
function(data) {
var docfrag = document.createDocumentFragment();
for (var i = 0; i < data.nonprofitsList.length; i++) {
var li = document.createElement("li");
var linkedName = getLinkedName(data.nonprofitsList[i].name);
$(li).html("<a href='/nonprofits/" + linkedName + "'>" + data.nonprofitsList[i].name + "</a></li>");
docfrag.appendChild(li);
};
$('#nonprofitsList').append(docfrag);
});

View File

@ -53,3 +53,5 @@ block content
h2.black-text ...and other tools h2.black-text ...and other tools
.big-break .big-break
a.btn.btn-cta.signup-btn.btn-block(href="/nonprofits-form") My nonprofit needs coding help a.btn.btn-cta.signup-btn.btn-block(href="/nonprofits-form") My nonprofit needs coding help
.button-spacer
a.btn.btn-cta.btn-success.btn-block(href="/nonprofits/directory") Browse our directory of nonprofit we've helped