Clean up views, remove API controller views, add the gmail-shortcuts, control-shortcuts and deploy-a-website static views. Move all resource controller views to a resources view folder and update routes

This commit is contained in:
Michael Q Larson 2014-12-26 00:05:00 -08:00
parent fffc4ec949
commit a5fa27466c
36 changed files with 238 additions and 984 deletions

5
app.js
View File

@ -192,6 +192,11 @@ app.get('/jquery-exercises', resourcesController.jqueryExercises);
app.get('/live-pair-programming', resourcesController.livePairProgramming);
app.get('/javascript-in-your-inbox', resourcesController.javaScriptInYourInbox);
app.get('/chromebook', resourcesController.chromebook);
app.get('/deploy-a-website', resourcesController.deployAWebsite);
app.get('/gmail-shortcuts', resourcesController.gmailShortcuts);
app.get('/control-shortcuts', resourcesController.controlShortcuts);
app.get('/control-shortcuts', resourcesController.deployAWebsite);
app.get('/stats', resourcesController.stats);
app.get(
'/pair-program-with-team-viewer',

View File

@ -4,6 +4,11 @@ module.exports = {
sessionSecret: process.env.SESSION_SECRET,
trello: {
key: process.env.TRELLO_KEY,
secret: process.env.TRELLO_SECRET
},
mandrill: {
user: process.env.MANDRILL_USER,
password: process.env.MANDRILL_PASSWORD

View File

@ -1,72 +1,121 @@
var User = require('../models/User'),
resources = require('./resources.json'),
questions = resources.questions,
steps = resources.steps;
steps = resources.steps,
secrets = require('./../config/secrets')
//NOTE(BERKS): Async, total users may not available before it is used.
var totalUsers = 0;
User.count({}, function(err, count) {
totalUsers = count;
});
var Client = require('node-rest-client').Client;
client = new Client();
/**
* GET /
* Resources.
*/
//TODO: Stats view
module.exports = {
learnToCode: function(req, res) {
res.render('learn-to-code', {
res.render('resources/learn-to-code', {
title: 'Learn to Code'
});
},
privacy: function privacy(req, res) {
res.render('privacy', {
res.render('resources/privacy', {
title: 'Privacy'
});
},
statistics: function statistics(req, res) {
res.render('statistics', {
title: 'Code Camper Statistics'
//totalUsers: totalUsers,
//usersOverTenChallenges: usersOverTenChallenges
stats: function stats(req, res) {
var date1 = new Date("10/15/2014");
var date2 = new Date();
var timeDiff = Math.abs(date2.getTime() - date1.getTime());
var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24));
var nonprofitProjects = client.get('https://trello.com/1/boards/BA3xVpz9/cards?key=' + secrets.trello.key, function(data, response){return data.length;});
User.count({}, function(err, users) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 2}}, function(err, c2) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 4}}, function(err, c4) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 9}}, function(err, c9) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 19}}, function(err, c19) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 29}}, function(err, c29) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 39}}, function(err, c39) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 49}}, function(err, c49) { if (err) { debug('User err: ', err); next(err); }
User.count({'points': {'$gt': 59}}, function(err, c59) { if (err) { debug('User err: ', err); next(err); }
res.render('resources/stats', {
title: 'Free Code Camp Stats:',
daysRunning: daysRunning,
users: users,
nonprofitProjects: nonprofitProjects, /* can't yet get this to work. Async issue?
Hardcoded value for now and created a Trello card */
c2: c2,
c4: c4,
c9: c9,
c19: c19,
c29: c29,
c39: c39,
c49: c49,
c59: c59
});
});
});
});
});
});
});
});
});
});
},
deployAWebsite: function deployAWebsite(req, res) {
res.render('resources/deploy-a-website', {
title: 'Deploy a Dynamic Website in 7 Minutes'
});
},
gmailShortcuts: function gmailShortcuts(req, res) {
res.render('resources/gmail-shortcuts', {
title: 'These Gmail Shortcuts will save you Hours'
});
},
controlShortcuts: function controlShortcuts(req, res) {
res.render('resources/control-shortcuts', {
title: 'These Control Shortcuts will save you Hours'
});
},
chromebook: function chromebook(req, res) {
res.render('chromebook', {
res.render('resources/chromebook', {
title: 'Win a Chromebook'
});
},
jqueryExercises: function jqueryExercises(req, res) {
res.render('jquery-exercises', {
res.render('resources/jquery-exercises', {
title: 'jQuery Exercises'
});
},
livePairProgramming: function(req, res) {
res.render('live-pair-programming', {
res.render('resources/live-pair-programming', {
title: 'Live Pair Programming'
});
},
javaScriptInYourInbox: function(req, res) {
res.render('javascript-in-your-inbox', {
res.render('resources/javascript-in-your-inbox', {
title: 'JavaScript in your Inbox'
});
},
programmerInterviewQuestionsApp: function(req, res) {
res.render('programmer-interview-questions-app', {
res.render('resources/programmer-interview-questions-app', {
title: 'Programmer Interview Questions App'
});
},
pairProgramWithTeamViewer: function(req, res) {
res.render('pair-program-with-team-viewer', {
res.render('resources/pair-program-with-team-viewer', {
title: 'Challenge: Pair Program with Team Viewer',
name: 'Pair Program with Team Viewer',
video: '',
@ -77,13 +126,13 @@ module.exports = {
},
about: function(req, res) {
res.render('about', {
res.render('resources/about', {
title: 'About Free Code Camp and Our Team of Volunteers'
});
},
doneWithFirst100Hours: function(req, res) {
res.render('done-with-first-100-hours', {
res.render('resources/done-with-first-100-hours', {
title:
'Congratulations on finishing the first 100 hours of Free Code Camp!'
});

View File

@ -1,5 +0,0 @@
extends layout
block content
include partials/about-us
br
include partials/faq

View File

@ -1,47 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-picture-o
| Aviary API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://developers.aviary.com/docs/web/setup-guide#constructor', target='_blank')
i.fa.fa-check-square-o
| API Overview
a.btn.btn-primary(href='http://developers.aviary.com/docs/web/setup-guide#saving', target='_blank')
i.fa.fa-save
| Saving Images
a.btn.btn-primary(href='http://developers.aviary.com/docs/web/setup-guide#styling', target='_blank')
i.fa.fa-flask
| CSS Styling
br
p: button.btn.btn-success(onclick='return launchEditor("myimage", "https://31.media.tumblr.com/d4411b4c0b41d9c7a73fbcdb1054cb5c/tumblr_n3fyfbZVud1tsaz7eo1_500.jpg");')
i.fa.fa-magic
| Edit Photo
img#myimage(src='https://31.media.tumblr.com/d4411b4c0b41d9c7a73fbcdb1054cb5c/tumblr_n3fyfbZVud1tsaz7eo1_500.jpg', width=250)
script(src='http://feather.aviary.com/js/feather.js')
script.
var featherEditor = new Aviary.Feather({
apiKey: 'c83c98c0da041785',
apiVersion: 3,
theme: 'dark',
tools: 'all',
appendTo: '',
onSave: function(imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
},
onError: function(errorObj) {
alert(errorObj.message);
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}

View File

@ -1,26 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-phone
| Clockwork SMS API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://github.com/mediaburst/node-clockwork', target='_blank')
i.fa.fa-check-square-o
| Clockwork Node
a.btn.btn-primary(href='http://www.clockworksms.com/doc/clever-stuff/xml-interface/send-sms/', target='_blank')
i.fa.fa-code-fork
| XML API
h4 Send a text message
.row
.col-sm-6
form(role='form', method='POST')
input(type='hidden', name='_csrf', value=_csrf)
.form-group
.input-group
input.form-control(type='text', name='telephone', placeholder='Phone Number (international format)')
span.input-group-btn
button.btn.btn-success(type='submit') Send

View File

@ -1,40 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-facebook-square(style='color: #335397')
| Facebook API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://developers.facebook.com/docs/graph-api/quickstart/', target='_blank')
i.fa.fa-check-square-o
| Quickstart
a.btn.btn-primary(href='https://developers.facebook.com/tools/explorer', target='_blank')
i.fa.fa-facebook
| Graph API Explorer
a.btn.btn-primary(href='https://developers.facebook.com/docs/graph-api/reference/', target='_blank')
i.fa.fa-code-fork
| API Reference
h3
i.fa.fa-user
| My Profile
img.thumbnail(src='https://graph.facebook.com/#{me.id}/picture?type=large', width='90', height='90')
h4= me.name
h6 First Name: #{me.first_name}
h6 Last Name: #{me.last_name}
h6 Gender: #{me.gender}
h6 Username: #{me.username}
h6 Link: #{me.link}
h6 Email: #{me.email}
h6 Locale: #{me.locale}
h6 Timezone: #{me.timezone}
h3
i.fa.fa-group
| My Friends
.row
for friend in friends
.col-xs-3.col-md-2
a.thumbnail(href='http://facebook.com/#{friend.id}')
img(src='https://graph.facebook.com/#{friend.id}/picture?width=150&height=150')

View File

@ -1,57 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-foursquare
| Foursquare API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://developer.foursquare.com/start', target='_blank')
i.fa.fa-check-square-o
| Getting Started
a.btn.btn-primary(href='https://developer.foursquare.com/docs/explore', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='https://developer.foursquare.com/docs/', target='_blank')
i.fa.fa-code-fork
| API Endpoints
h3.text-primary Trending Venues
table.table.table-striped.table-bordered
thead
tr
th Name
th.hidden-xs.hidden-sm Category
th.hidden-xs Checkins
th Here Now
tbody
for venue in trendingVenues.venues
tr
td= venue.name
td.hidden-xs.hidden-sm #{venue.categories[0].name}
td.hidden-xs #{venue.stats.checkinsCount}
td= venue.hereNow.count
br
h3.text-primary Venue Detail
p
img(src='#{venueDetail.venue.photos.groups[0].items[0].prefix}150x150#{venueDetail.venue.photos.groups[0].items[0].suffix}')
.label.label-primary #{venueDetail.venue.name} (#{venueDetail.venue.categories[0].shortName})
.label.label-success #{venueDetail.venue.location.address}, #{venueDetail.venue.location.city}, #{venueDetail.venue.location.state}
.label.label-warning #{venueDetail.venue.likes.count} likes, #{venueDetail.venue.rating} rating
h3.text-primary User Checkins
table.table.table-bordered.table-hover
thead
tr
th Name
th Location
th Category
th Checkins
tbody
for checkin in userCheckins.checkins.items
tr
td= checkin.venue.name
td #{checkin.venue.location.address}, #{checkin.venue.location.city}, #{checkin.venue.location.state}
td= checkin.venue.categories[0].shortName
td= checkin.venue.stats.checkinsCount

View File

@ -1,43 +0,0 @@
extends ../layout
block content
h2
i.fa.fa-github
| GitHub API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://developer.github.com/guides/getting-started/', target='_blank')
i.fa.fa-check-square-o
| Getting Started
a.btn.btn-primary(href='https://apigee.com/console/github', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='http://developer.github.com/v3/', target='_blank')
i.fa.fa-file-text-o
| Documentation
br
.panel.panel-primary
.panel-heading
h3.panel-title Repository Information
.panel-body
.row
.col-xs-4
img.img-rounded.img-responsive(src='https://github.global.ssl.fastly.net/images/modules/logos_page/Octocat.png')
.col-xs-8
h4
a(href='#{repo.html_url}') #{repo.name}
ul.list-inline
li
i.fa.fa-eye-slash
| Subscribers: #{repo.subscribers_count}
li
i.fa.fa-star
| Starred: #{repo.stargazers_count}
li
i.fa.fa-code-fork
| Forks: #{repo.forks_count}
li
i.fa.fa-code
| #{repo.language}
strong DESCRIPTION
p= repo.description

View File

@ -1,92 +0,0 @@
extends ../layout
block content
h2 API Examples
hr
.row
.col-sm-4
.panel.panel-default(style='background-color: #000')
.panel-body
img(src='http://i.imgur.com/2AaBlpf.png', height=40)
a(href='/api/github', style='color: #fff') GitHub
.col-sm-4
.panel.panel-default(style='background-color: #00abf0')
.panel-body
img(src='http://i.imgur.com/EYA2FO1.png', height=40)
a(href='/api/twitter', style='color: #fff') Twitter
.col-sm-4
.panel.panel-default(style='background-color: #3b5998')
.panel-body
img(src='http://i.imgur.com/jiztYCH.png', height=40)
a(href='/api/facebook', style='color: #fff') Facebook
.col-sm-4
.panel.panel-default(style='background-color: #1cafec')
.panel-body
img(src='http://i.imgur.com/PixH9li.png', height=40)
a(href='/api/foursquare', style='color: #fff') Foursquare
.col-sm-4
.panel.panel-default(style='background-color: #947563')
.panel-body
img(src='http://i.imgur.com/aRc6LUJ.png', height=40)
a(href='/api/instagram', style='color: #fff') Instagram
.col-sm-4
.panel.panel-default(style='background-color: #d21309')
.panel-body
img(src='http://i.imgur.com/KfZY876.png', height=40)
a(href='/api/lastfm', style='color: #fff') Last.fm
.col-sm-4
.panel.panel-default(style='background-color: #007bb6')
.panel-body
img(src='http://i.imgur.com/sYmVWAw.png', height=40)
a(href='/api/linkedin', style='color: #fff') LinkedIn
.col-sm-4
.panel.panel-default(style='background-color: #454442')
.panel-body
img(src='http://i.imgur.com/e3sjmYj.png', height=40)
a(href='/api/nyt', style='color: #fff') New York Times
.col-sm-4
.panel.panel-default(style='background-color: #000')
.panel-body
img(src='http://i.imgur.com/1xGmKBX.jpg', height=40)
a(href='/api/steam', style='color: #fff') Steam
.col-sm-4
.panel.panel-default(style='background-color: #3da8e5')
.panel-body
img(src='http://i.imgur.com/w3s2RvW.png', height=40)
a(href='/api/stripe', style='color: #fff') Stripe
.col-sm-4
.panel.panel-default(style='background-color: #fd0404')
.panel-body
img(src='http://i.imgur.com/mEUd6zM.png', height=40)
a(href='/api/twilio', style='color: #fff') Twilio
.col-sm-4
.panel.panel-default(style='background-color: #304e6c')
.panel-body
img(src='http://i.imgur.com/rZGQShS.png', height=40)
a(href='/api/tumblr', style='color: #fff') Tumblr
.col-sm-4
.panel.panel-default(style='background-color: #ff6500')
.panel-body
img(src='http://i.imgur.com/RGCVvyR.png', height=40)
a(href='/api/scraping', style='color: #fff') Web Scraping
.col-sm-4
.panel.panel-default(style='background-color: #1f93cf')
.panel-body
img(src='http://i.imgur.com/90tl9C8.gif', height=40)
a(href='/api/venmo', style='color: #fff') Venmo
.col-sm-4
.panel.panel-default(style='background-color: #3d048b')
.panel-body
img(src='http://i.imgur.com/Cl6WJAu.png', height=40)
a(href='/api/yahoo', style='color: #fff') Yahoo
.col-sm-4
.panel.panel-default(style='background-color: #000')
.panel-body
img(src='http://i.imgur.com/YcdxZ5F.png', height=40)
a(href='/api/clockwork', style='color: #fff') Clockwork SMS
.col-sm-4
.panel.panel-default(style='background: linear-gradient(to bottom, #1f3d95 0%,#04aade 100%)')
.panel-body
img(src='http://i.imgur.com/npBRwMI.png', height=40)
a(href='/api/aviary', style='color: #fff') Aviary

View File

@ -1,70 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-instagram(style='color: #517fa4')
| Instagram API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://instagram.com/developer/', target='_blank')
i.fa.fa-check-square-o
| Overview
a.btn.btn-primary(href='https://github.com/teleportd/instagram-node', target='_blank')
i.fa.fa-laptop
| Node-Instagram Docs
a.btn.btn-primary(href='http://instagram.com/developer/endpoints/', target='_blank')
i.fa.fa-code-fork
| API Endpoints
br
p.lead Username Search for
strong richellemead
table.table.table-hover.table-bordered
thead
tr
th Picture
th Username
th Full Name
th Bio
tbody
for user in usernames
tr
td
img(src='#{user.profile_picture}', width='75', height='75')
td= user.username
td= user.full_name
td= user.bio
hr
p.lead User Search for ID
strong 175948269
.media
a.pull-left(href='http://instagram.com/#{userById.username}')
img.thumbnail(src='#{userById.profile_picture}', width='110', height='110')
.media-body
h4= userById.full_name
p= userById.bio
hr
p.lead
strong Popular Images
| on Instagram
.row
for image in popularImages
.col-xs-3
a.thumbnail(href='#{image.link}')
img(src='#{image.images.standard_resolution.url}', height='320px')
hr
p.lead
| My Recent
strong Media
.row
for image in myRecentMedia
.col-xs-3
a.thumbnail(href='#{image.link}')
img(src='#{image.images.standard_resolution.url}', height='320px')

View File

@ -1,47 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-play-circle-o(style='color: #db1302')
| Last.fm API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://github.com/jammus/lastfm-node#lastfm-node', target='_blank')
i.fa.fa-check-square-o
| Last.fm Node Docs
a.btn.btn-primary(href='http://www.last.fm/api/account/create', target='_blank')
i.fa.fa-laptop
| Create API Account
a.btn.btn-primary(href='http://www.last.fm/api', target='_blank')
i.fa.fa-code-fork
| API Endpoints
h3= artist.name
img.thumbnail(src='#{artist.image}')
h3 Tags
for tag in artist.tags
span.label.label-primary
i.fa.fa-tag
| #{tag.name}
| 
h3 Biography
p!= artist.bio
h3 Top Albums
for album in artist.topAlbums
img(src='#{album}', width=150, height=150)
| 
h3 Top Tracks
ol
for track in artist.topTracks
li
a(href='#{track.url}') #{track.name}
h3 Similar Artists
ul.list-unstyled.list-inline
for similarArtist in artist.similar
li
a(href='#{similarArtist.url}') #{similarArtist.name}

View File

@ -1,72 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-linkedin-square
| LinkedIn API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://github.com/Kuew/node-linkedin', target='_blank')
i.fa.fa-book
| Node LinkedIn Docs
a.btn.btn-primary(href='http://developer.linkedin.com/documents/authentication', target='_blank')
i.fa.fa-check-square-o
| Getting Started
a.btn.btn-primary(href='http://developer.linkedin.com/apis', target='_blank')
i.fa.fa-code-fork
| API Endpoints
h3.text-primary My LinkedIn Profile
.well.well-sm
.row
.col-sm-12
.col-sm-2
br
img.thumbnail(src='#{profile.pictureUrl}')
.col-sm-10
h3= profile.formattedName
h4= profile.headline
span.text-muted #{profile.location.name} | #{profile.industry}
br
.row
.col-sm-12
dl.dl-horizontal
dt.text-muted Current
for company in profile.positions.values
if company.isCurrent
dd
strong= company.title
| at
strong #{company.company.name}
dt.text-muted Previous
for company in profile.positions.values
if !company.isCurrent
dd
| #{company.title}
| at
| #{company.company.name}
if profile.educations
dt.text-muted Education
for education in profile.educations.values
dd= education.schoolName
dt.text-muted Recommendations
dd
strong #{profile.numRecommenders}
| recommendation(s) received
dt.text-muted Connections
dd
strong #{profile.numConnections}
| connections
.text-center
small.text-muted= profile.publicProfileUrl
h3.text-primary LinkedIn Connections
table.table.table-hover.table-striped.table-bordered
tbody
for connection in profile.connections.values
if connection.id != 'private'
tr
td
strong #{connection.firstName} #{connection.lastName}
.text-muted #{connection.headline}

View File

@ -1,36 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-building-o
| New York Times API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://developer.nytimes.com/page', target='_blank')
i.fa.fa-check-square-o
| Overview
a.btn.btn-primary(href='http://prototype.nytimes.com/gst/apitool/index.html', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='http://developer.nytimes.com/docs', target='_blank')
i.fa.fa-code-fork
| API Endspoints
h4 Young Adult Best Sellers
table.table.table-striped.table-bordered
thead
tr
th Rank
th Title
th.hidden-xs Description
th Author
th.hidden-xs ISBN-13
tbody
for book in books
tr
td= book.rank
td= book.book_details[0].title
td.hidden-xs= book.book_details[0].description
td= book.book_details[0].author
td.hidden-xs= book.book_details[0].primary_isbn13

View File

@ -1,27 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-hacker-news(style='color: #ff6600')
| Web Scraping
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://matthewmueller.github.io/cheerio/', target='_blank')
i.fa.fa-info
| Cheerio Docs
a.btn.btn-primary(href='http://vimeo.com/31950192', target='_blank')
i.fa.fa-film
| Cheerio Screencast
h3 Hacker News Frontpage
table.table.table-condensed
thead
tr
th №
th Title
tbody
each link, index in links
tr
td= index + 1
td!= link

View File

@ -1,43 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-steam-square
| Steam Web API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://developer.valvesoftware.com/wiki/Steam_Web_API', target='_blank')
i.fa.fa-check-square-o
| API Overview
br
.alert.alert-info
h4 Steam ID
p Displaying public information for Steam ID: #{playerSummary.steamid}.
h3 Profile Information
.row
.col-sm-2
img(src='#{playerSummary.avatarfull}', width='92', height='92')
.col-sm-8
span.lead #{playerSummary.personaname}
div Account since: #{new Date(playerSummary.timecreated * 1000)}
div Last Online: #{new Date(playerSummary.lastlogoff * 1000)}
div Online Status:
if playerSummary.personastate == 1
strong.text-success Online
else
strong.text-danger Offline
h3 #{playerAchievemments.gameName} Achievements
ul.lead.list-unstyled
for achievement in playerAchievemments.achievements
if achievement.achieved
li.text-success= achievement.name
h3 Owned Games
for game in ownedGames
a(href='http://store.steampowered.com/app/#{game.appid}/')
img.thumbnail(src='http://media.steampowered.com/steamcommunity/public/images/apps/#{game.appid}/#{game.img_logo_url}.jpg' width=92)

View File

@ -1,124 +0,0 @@
extends ../layout
block content
.page-header
h2 Stripe API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://stripe.com/docs/tutorials/checkout')
i.fa.fa-home
| Stripe Checkout
a.btn.btn-primary(href='https://stripe.com/docs/api', target='_blank')
i.fa.fa-code
| API Reference
a.btn.btn-primary(href='https://manage.stripe.com/account/apikeys', target='_blank')
i.fa.fa-gear
| Get API Keys
br
form(method='POST')
input(type='hidden', name='_csrf', value=_csrf)
script(
src='https://checkout.stripe.com/checkout.js',
class='stripe-button',
data-key=publishableKey,
data-image='http://static.tumblr.com/nljhkjv/z0Jlpk23i/logo',
data-name='Hackathon Starter',
data-description='Caramel Macchiato ($3.95)',
data-amount='395')
h3
i.fa.fa-credit-card
| Test Cards
p In test mode, you can use these test cards to simulate a successful transaction:
table.table.table-striped.table-bordered.table-condensed
thead
tr
th Number
th Card type
tbody
tr
td 4242 4242 4242 4242
td Visa
tr
td 4012 8888 8888 1881
td Visa
tr
td 5555 5555 5555 4444
td MasterCard
tr
td 5105 1051 0510 5100
td MasterCard
tr
td 3782 822463 10005
td American Express
tr
td 3714 496353 98431
td American Express
tr
td 6011 1111 1111 1117
td Discover
tr
td 6011 0009 9013 9424
td Discover
tr
td 3056 9309 0259 04
td Diners Club
tr
td 3852 0000 0232 37
td Diners Club
tr
td 3530 1113 3330 0000
td JCB
tr
td 3566 0020 2036 0505
td JCB
.panel.panel-primary
.panel-heading Stripe Successful Charge Example
.panel-body
p This is the response you will get when customer's card has been charged successfully.
| You could use some of the data below for logging purposes.
pre.
{ id: 'ch_103qzW2eZvKYlo2CiYcKs6Sw',
object: 'charge',
created: 1397510564,
livemode: false,
paid: true,
amount: 395,
currency: 'usd',
refunded: false,
card:
{ id: 'card_103qzW2eZvKYlo2CJ2Ss4kwS',
object: 'card',
last4: '4242',
type: 'Visa',
exp_month: 11,
exp_year: 2015,
fingerprint: 'Xt5EWLLDS7FJjR1c',
customer: null,
country: 'US',
name: 'sahat@me.com',
address_line1: null,
address_line2: null,
address_city: null,
address_state: null,
address_zip: null,
address_country: null,
cvc_check: 'pass',
address_line1_check: null,
address_zip_check: null },
captured: true,
refunds: [],
balance_transaction: 'txn_103qzW2eZvKYlo2CNEcJV8SN',
failure_message: null,
failure_code: null,
amount_refunded: 0,
customer: null,
invoice: null,
description: 'sahat@me.com',
dispute: null,
metadata: {},
statement_description: null }

View File

@ -1,26 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-tumblr-square
| Tumblr API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://www.tumblr.com/docs/en/api/v2#overview', target='_blank')
i.fa.fa-check-square-o
| Overview
a.btn.btn-primary(href='https://api.tumblr.com/console', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='http://www.tumblr.com/docs/en/api/v2#blog_methods', target='_blank')
i.fa.fa-code-fork
| API Endpoints
h3.text-primary #{blog.name}'s blog
.btn.btn-xs.btn-primary-outline
i.fa.fa-file-text-o
| #{blog.posts} posts
h4 Latest Photo Post
for photo in photoset
img.item(src='#{photo.original_size.url}')

View File

@ -1,34 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-phone(style='color: #f00')
| Twilio API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://twilio.github.io/twilio-node/', target='_blank')
i.fa.fa-check-square-o
| Twilio Node
a.btn.btn-primary(href='https://apigee.com/console/twilio', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='https://www.twilio.com/docs/api/rest', target='_blank')
i.fa.fa-code-fork
| REST API
br
.row
.col-sm-6
form(role='form', method='POST')
input(type='hidden', name='_csrf', value=_csrf)
.form-group
label.control-label Number to text
input.form-control(type='text', name='number', autofocus)
.form-group
label.control-label Message
input.form-control(type='text', name='message')
button.btn.btn-default(type='submit')
i.fa.fa-location-arrow
| Send

View File

@ -1,52 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-twitter(style='color: #4099ff')
| Twitter API
.btn-group.btn-group-justified
a.btn.btn-success(href='https://github.com/ttezel/twit', target='_blank')
i.fa.fa-file-text-o
| Twit Library Docs
a.btn.btn-success(href='https://dev.twitter.com/docs', target='_blank')
i.fa.fa-check-square-o
| Overview
a.btn.btn-success(href='https://dev.twitter.com/docs/api/1.1', target='_blank')
i.fa.fa-code-fork
| API Endpoints
br
.well
h4 Compose new Tweet
form(role='form', method='POST')
input(type='hidden', name='_csrf', value=_csrf)
.form-group
input.form-control(type='text', name='tweet', autofocus)
p.help-block This new Tweet will be posted on your Twitter profile.
button.btn.btn-primary(type='submit')
i.fa.fa-twitter
| Tweet
br
.lead Latest
strong #{tweets.length}
| Tweets containing the term
strong nodejs
| in NYC within
strong 5
| miles radius
ul.media-list
for tweet in tweets
li.media
a.pull-left(href='#')
- var image = tweet.user.profile_image_url.replace('_normal', '');
img.media-object(src='#{image}', style='width: 64px; height: 64px;')
.media-body
strong.media-heading #{tweet.user.name}
span.text-muted @#{tweet.user.screen_name}
p= tweet.text

View File

@ -1,80 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-money
| Venmo API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://developer.venmo.com/docs/quickstart', target='_blank')
i.fa.fa-book
| Quickstart
a.btn.btn-primary(href='https://developer.venmo.com/docs/api-console', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='https://developer.venmo.com/docs/endpoints/payments', target='_blank')
i.fa.fa-code-fork
| API Endspoints
h3 Venmo Profile
.row
.col-sm-2
img(src='#{profile.user.profile_picture_url}')
.col-sm-8
.row
.col-sm-6
strong #{profile.user.display_name}
div Balance:
strong $#{profile.balance}
div Friends:
strong #{profile.user.friends_count}
.col-sm-6
div Email:
strong #{profile.user.email}
div Phone:
strong #{profile.user.phone}
div ID:
strong #{profile.user.id}
p #{profile.user.about}
.row
.col-sm-5
h3 Make Payment
form(role='form', method='POST')
input(type='hidden', name='_csrf', value=_csrf)
.form-group
label.control-label(for='user') Phone, Email or Venmo User ID
input.form-control(type='text', name='user', id='user', placeholder='15555555555', autofocus=true)
.form-group
label.control-label(for='note') Note
input.form-control(type='text', name='note', id='note', placeholder='A message to accompany the payment.')
.form-group
label.control-label(for='amount') Amount
input.form-control(type='text', name='amount', id='amount', placeholder='0.10')
.form-group
button.btn.btn-primary(type='submit')
i.fa.fa-usd
| Send
h3 Recent Payments
table.table.table-striped.table-condensed.table-bordered
thead
tr
th To
th Amount
th Status
th Date
th Note
tbody
if recentPayments.length
for payment in recentPayments
tr
td= payment.target.phone || payment.target.email || payment.target.user
td $#{payment.amount}
td= payment.status
td= payment.date_created
td= payment.note
else
tr
td(colspan=5) No recent payments.

View File

@ -1,30 +0,0 @@
extends ../layout
block content
.page-header
h2
i.fa.fa-yahoo(style='color: #7b0099')
| Yahoo API
.btn-group.btn-group-justified
a.btn.btn-primary(href='https://developer.yahoo.com/yql/', target='_blank')
i.fa.fa-check-square-o
| YQL Getting Started
a.btn.btn-primary(href='http://yuilibrary.com/yui/docs/node/', target='_blank')
i.fa.fa-laptop
| YUI on Node.js
a.btn.btn-primary(href='https://developer.yahoo.com/everything.html', target='_blank')
i.fa.fa-code
| Yahoo APIs
br
p.lead Weather for ZIP Code:
strong 10007
.alert.alert-info
p It is currently
strong #{condition.temp}
| degrees in
strong #{location.city}, #{location.region}
| .
h3 YQL Query
pre SELECT * FROM weather.forecast WHERE (location = 10007)

View File

@ -0,0 +1,5 @@
extends ../layout
block content
include ../partials/about-us
br
include ../partials/faq

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Win a Chromebook

View File

@ -0,0 +1,22 @@
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Global Control Shortcuts for Mac
h2 These Global Control Shortcuts for Mac will save you hours by speeding up your typing
br
.embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src='//player.vimeo.com/video/107073108')
.text-left
h3 These global shortcuts work everywhere on a Mac:
ul
li Control + F = Forward
li Control + B = Backward
li Control + N = Next Line
li Control + P = Previous Line
li Control + H = Backspace
li Control + D = Delete
li Control + A = Beginning of Line
li Control + E = End of Line
li Control + K = Kill line
a.btn.btn-cta.signup-btn.btn-primary(href="/login") Start learning to code (it's free)
br

View File

@ -0,0 +1,25 @@
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Deploy a Dynamic Website in 7 Minutes
h2 Here's a fast and easy way to deploy a dynamic website to the internet
br
.embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src='//player.vimeo.com/video/107073108')
.text-left
h3 Use these links:
ul
li
a(href='http://www.atom.io' target='_blank') http://www.atom.io
|   - free text editor
li
a(href='http://www.startbootstrap.com' target='_blank') http://www.startbootstrap.com
|   - free responsive (Bootstrap) templates
li
a(href='http://www.powr.io' target='_blank') http://www.powr.io
|   - great plugins
li
a(href='http://www.bitballoon.com' target='_blank') http://www.bitballoon.com
|   - drag-and-drop deployment
a.btn.btn-cta.signup-btn.btn-primary(href="/login") Start learning to code (it's free)
br

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Congratulations on finishing the first 100 hours of Free Code Camp!

View File

@ -0,0 +1,24 @@
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Gmail Shortcuts
h2 These Gmail Shortcuts will save you hours and help you get to Zero Inbox
br
.embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src='//player.vimeo.com/video/115194016')
.text-left
h3 The shortcuts:
ul
li j - move down
li k - move up
li o - open
li r - reply
li a - reply all
li f - forward
li c - compose
li x - select
li e - archive
li ! - mark spam
li z - undo
a.btn.btn-cta.signup-btn.btn-primary(href="/login") Start learning to code (it's free)
br

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Win a Chromebook

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
script.
$(document).ready(function() {

View File

@ -1,5 +1,5 @@
extends layout
extends ../layout
block content
.text-center
h2.big-text Learn to Code
include partials/faq
include ../partials/faq

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Live Pair Programming

View File

@ -1,4 +1,4 @@
extends ./layout
extends ../layout
block content
.row
.col-sm-12.col-md-8.col-xs-12
@ -24,4 +24,4 @@ block content
a(href="https://reddit.com/r/freecodecamp", target="_blank") Subreddit
| .
.col-sm-12.col-md-4.col-xs-12
include ./partials/challenges
include ../partials/challenges

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
.jumbotron
h2.big-text Privacy

View File

@ -1,4 +1,4 @@
extends layout
extends ../layout
block content
script.
$(document).ready(function () {

View File

@ -0,0 +1,70 @@
extends ../layout
block content
.jumbotron.negative-15.text-center
h1.hug-top Free Code Camp Stats
.row
.col-xs-6.text-right
h2 Days since we Launched:
.col-xs-6.text-left
h2
= daysRunning
.row
.col-xs-6.text-right
h2 Nonprofit Projects:
.col-xs-6.text-left
h2
a(href="https://trello.com/1/boards/BA3xVpz9") 14
.row
.col-xs-6.text-right
h2 Total users:
.col-xs-6.text-left
h2
= users
.row
.col-xs-6.text-right
h2 Users with > 2 Points:
.col-xs-6.text-left
h2
= c2
.row
.col-xs-6.text-right
h2 Users with > 4 Points:
.col-xs-6.text-left
h2
= c4
.row
.col-xs-6.text-right
h2 Users with > 9 Points:
.col-xs-6.text-left
h2
= c9
.row
.col-xs-6.text-right
h2 Users with > 19 Points:
.col-xs-6.text-left
h2
= c19
.row
.col-xs-6.text-right
h2 Users with > 29 Points:
.col-xs-6.text-left
h2
= c29
.row
.col-xs-6.text-right
h2 Users with > 39 Points:
.col-xs-6.text-left
h2
= c39
.row
.col-xs-6.text-right
h2 Users with > 49 Points:
.col-xs-6.text-left
h2
= c49
.row
.col-xs-6.text-right
h2 Users with > 59 Points:
.col-xs-6.text-left
h2
= c59