firechat and firepad installed but not fully working

This commit is contained in:
Michael Q Larson
2014-10-12 01:51:55 -07:00
parent 8e84894ba9
commit 05c31ba15d
9 changed files with 1045 additions and 338 deletions

20
app.js
View File

@ -167,30 +167,10 @@ app.get('/api/yahoo', apiController.getYahoo);
* OAuth sign-in routes. * OAuth sign-in routes.
*/ */
app.get('/auth/instagram', passport.authenticate('instagram'));
app.get('/auth/instagram/callback', passport.authenticate('instagram', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/');
});
app.get('/auth/facebook', passport.authenticate('facebook', { scope: ['email', 'user_location'] }));
app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/');
});
app.get('/auth/github', passport.authenticate('github'));
app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/');
});
app.get('/auth/google', passport.authenticate('google', { scope: 'profile email' }));
app.get('/auth/google/callback', passport.authenticate('google', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/');
});
app.get('/auth/twitter', passport.authenticate('twitter')); app.get('/auth/twitter', passport.authenticate('twitter'));
app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/login' }), function(req, res) { app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/'); res.redirect(req.session.returnTo || '/');
}); });
app.get('/auth/linkedin', passport.authenticate('linkedin', { state: 'SOME STATE' }));
app.get('/auth/linkedin/callback', passport.authenticate('linkedin', { failureRedirect: '/login' }), function(req, res) {
res.redirect(req.session.returnTo || '/');
});
/** /**
* OAuth authorization routes for API examples. * OAuth authorization routes for API examples.

View File

@ -1,12 +1,7 @@
var _ = require('lodash'); var _ = require('lodash');
var passport = require('passport'); var passport = require('passport');
var InstagramStrategy = require('passport-instagram').Strategy;
var LocalStrategy = require('passport-local').Strategy; var LocalStrategy = require('passport-local').Strategy;
var FacebookStrategy = require('passport-facebook').Strategy;
var TwitterStrategy = require('passport-twitter').Strategy; var TwitterStrategy = require('passport-twitter').Strategy;
var GitHubStrategy = require('passport-github').Strategy;
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var LinkedInStrategy = require('passport-linkedin-oauth2').Strategy;
var OAuthStrategy = require('passport-oauth').OAuthStrategy; // Tumblr var OAuthStrategy = require('passport-oauth').OAuthStrategy; // Tumblr
var OAuth2Strategy = require('passport-oauth').OAuth2Strategy; // Venmo, Foursquare var OAuth2Strategy = require('passport-oauth').OAuth2Strategy; // Venmo, Foursquare
var User = require('../models/User'); var User = require('../models/User');
@ -22,49 +17,6 @@ passport.deserializeUser(function(id, done) {
}); });
}); });
// Sign in with Instagram.
passport.use(new InstagramStrategy(secrets.instagram,function(req, accessToken, refreshToken, profile, done) {
if (req.user) {
User.findOne({ instagram: profile.id }, function(err, existingUser) {
if (existingUser) {
req.flash('errors', { msg: 'There is already an Instagram account that belongs to you. Sign in with that account or delete it, then link it with your current account.' });
done(err);
} else {
User.findById(req.user.id, function(err, user) {
user.instagram = profile.id;
user.tokens.push({ kind: 'instagram', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.picture = user.profile.picture || profile._json.data.profile_picture;
user.profile.website = user.profile.website || profile._json.data.website;
user.save(function(err) {
req.flash('info', { msg: 'Instagram account has been linked.' });
done(err, user);
});
});
}
});
} else {
User.findOne({ instagram: profile.id }, function(err, existingUser) {
if (existingUser) return done(null, existingUser);
var user = new User();
user.instagram = profile.id;
user.tokens.push({ kind: 'instagram', accessToken: accessToken });
user.profile.name = profile.displayName;
// Similar to Twitter API, assigns a temporary e-mail address
// to get on with the registration process. It can be changed later
// to a valid e-mail address in Profile Management.
user.email = profile.username + "@instagram.com";
user.profile.website = profile._json.data.website;
user.profile.picture = profile._json.data.profile_picture;
user.save(function(err) {
done(err, user);
});
});
}
}));
// Sign in using Email and Password. // Sign in using Email and Password.
passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, password, done) { passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, password, done) {
@ -95,101 +47,6 @@ passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, passw
* - Else create a new account. * - Else create a new account.
*/ */
// Sign in with Facebook.
passport.use(new FacebookStrategy(secrets.facebook, function(req, accessToken, refreshToken, profile, done) {
if (req.user) {
User.findOne({ facebook: profile.id }, function(err, existingUser) {
if (existingUser) {
req.flash('errors', { msg: 'There is already a Facebook account that belongs to you. Sign in with that account or delete it, then link it with your current account.' });
done(err);
} else {
User.findById(req.user.id, function(err, user) {
user.facebook = profile.id;
user.tokens.push({ kind: 'facebook', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.gender = user.profile.gender || profile._json.gender;
user.profile.picture = user.profile.picture || 'https://graph.facebook.com/' + profile.id + '/picture?type=large';
user.save(function(err) {
req.flash('info', { msg: 'Facebook account has been linked.' });
done(err, user);
});
});
}
});
} else {
User.findOne({ facebook: profile.id }, function(err, existingUser) {
if (existingUser) return done(null, existingUser);
User.findOne({ email: profile._json.email }, function(err, existingEmailUser) {
if (existingEmailUser) {
req.flash('errors', { msg: 'There is already an account using this email address. Sign in to that account and link it with Facebook manually from Account Settings.' });
done(err);
} else {
var user = new User();
user.email = profile._json.email;
user.facebook = profile.id;
user.tokens.push({ kind: 'facebook', accessToken: accessToken });
user.profile.name = profile.displayName;
user.profile.gender = profile._json.gender;
user.profile.picture = 'https://graph.facebook.com/' + profile.id + '/picture?type=large';
user.profile.location = (profile._json.location) ? profile._json.location.name : '';
user.save(function(err) {
done(err, user);
});
}
});
});
}
}));
// Sign in with GitHub.
passport.use(new GitHubStrategy(secrets.github, function(req, accessToken, refreshToken, profile, done) {
if (req.user) {
User.findOne({ github: profile.id }, function(err, existingUser) {
if (existingUser) {
req.flash('errors', { msg: 'There is already a GitHub account that belongs to you. Sign in with that account or delete it, then link it with your current account.' });
done(err);
} else {
User.findById(req.user.id, function(err, user) {
user.github = profile.id;
user.tokens.push({ kind: 'github', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.picture = user.profile.picture || profile._json.avatar_url;
user.profile.location = user.profile.location || profile._json.location;
user.profile.website = user.profile.website || profile._json.blog;
user.save(function(err) {
req.flash('info', { msg: 'GitHub account has been linked.' });
done(err, user);
});
});
}
});
} else {
User.findOne({ github: profile.id }, function(err, existingUser) {
if (existingUser) return done(null, existingUser);
User.findOne({ email: profile._json.email }, function(err, existingEmailUser) {
if (existingEmailUser) {
req.flash('errors', { msg: 'There is already an account using this email address. Sign in to that account and link it with GitHub manually from Account Settings.' });
done(err);
} else {
var user = new User();
user.email = profile._json.email;
user.github = profile.id;
user.tokens.push({ kind: 'github', accessToken: accessToken });
user.profile.name = profile.displayName;
user.profile.picture = profile._json.avatar_url;
user.profile.location = profile._json.location;
user.profile.website = profile._json.blog;
user.save(function(err) {
done(err, user);
});
}
});
});
}
}));
// Sign in with Twitter. // Sign in with Twitter.
passport.use(new TwitterStrategy(secrets.twitter, function(req, accessToken, tokenSecret, profile, done) { passport.use(new TwitterStrategy(secrets.twitter, function(req, accessToken, tokenSecret, profile, done) {
@ -233,99 +90,6 @@ passport.use(new TwitterStrategy(secrets.twitter, function(req, accessToken, tok
} }
})); }));
// Sign in with Google.
passport.use(new GoogleStrategy(secrets.google, function(req, accessToken, refreshToken, profile, done) {
if (req.user) {
User.findOne({ google: profile.id }, function(err, existingUser) {
if (existingUser) {
req.flash('errors', { msg: 'There is already a Google account that belongs to you. Sign in with that account or delete it, then link it with your current account.' });
done(err);
} else {
User.findById(req.user.id, function(err, user) {
user.google = profile.id;
user.tokens.push({ kind: 'google', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.gender = user.profile.gender || profile._json.gender;
user.profile.picture = user.profile.picture || profile._json.picture;
user.save(function(err) {
req.flash('info', { msg: 'Google account has been linked.' });
done(err, user);
});
});
}
});
} else {
User.findOne({ google: profile.id }, function(err, existingUser) {
if (existingUser) return done(null, existingUser);
User.findOne({ email: profile._json.email }, function(err, existingEmailUser) {
if (existingEmailUser) {
req.flash('errors', { msg: 'There is already an account using this email address. Sign in to that account and link it with Google manually from Account Settings.' });
done(err);
} else {
var user = new User();
user.email = profile._json.email;
user.google = profile.id;
user.tokens.push({ kind: 'google', accessToken: accessToken });
user.profile.name = profile.displayName;
user.profile.gender = profile._json.gender;
user.profile.picture = profile._json.picture;
user.save(function(err) {
done(err, user);
});
}
});
});
}
}));
// Sign in with LinkedIn.
passport.use(new LinkedInStrategy(secrets.linkedin, function(req, accessToken, refreshToken, profile, done) {
if (req.user) {
User.findOne({ linkedin: profile.id }, function(err, existingUser) {
if (existingUser) {
req.flash('errors', { msg: 'There is already a LinkedIn account that belongs to you. Sign in with that account or delete it, then link it with your current account.' });
done(err);
} else {
User.findById(req.user.id, function(err, user) {
user.linkedin = profile.id;
user.tokens.push({ kind: 'linkedin', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.location = user.profile.location || profile._json.location.name;
user.profile.picture = user.profile.picture || profile._json.pictureUrl;
user.profile.website = user.profile.website || profile._json.publicProfileUrl;
user.save(function(err) {
req.flash('info', { msg: 'LinkedIn account has been linked.' });
done(err, user);
});
});
}
});
} else {
User.findOne({ linkedin: profile.id }, function(err, existingUser) {
if (existingUser) return done(null, existingUser);
User.findOne({ email: profile._json.emailAddress }, function(err, existingEmailUser) {
if (existingEmailUser) {
req.flash('errors', { msg: 'There is already an account using this email address. Sign in to that account and link it with LinkedIn manually from Account Settings.' });
done(err);
} else {
var user = new User();
user.linkedin = profile.id;
user.tokens.push({ kind: 'linkedin', accessToken: accessToken });
user.email = profile._json.emailAddress;
user.profile.name = profile.displayName;
user.profile.location = profile._json.location.name;
user.profile.picture = profile._json.pictureUrl;
user.profile.website = profile._json.publicProfileUrl;
user.save(function(err) {
done(err, user);
});
}
});
});
}
}));
// Tumblr API setup. // Tumblr API setup.

View File

@ -1,10 +1,10 @@
var secrets = require('../config/secrets'); var secrets = require('../config/secrets');
var nodemailer = require("nodemailer"); var nodemailer = require("nodemailer");
var transporter = nodemailer.createTransport({ var transporter = nodemailer.createTransport({
service: 'SendGrid', service: 'Mandrill',
auth: { auth: {
user: secrets.sendgrid.user, user: secrets.mandrill.user,
pass: secrets.sendgrid.password pass: secrets.mandrill.password
} }
}); });
@ -42,8 +42,8 @@ exports.postContact = function(req, res) {
var from = req.body.email; var from = req.body.email;
var name = req.body.name; var name = req.body.name;
var body = req.body.message; var body = req.body.message;
var to = 'your@email.com'; var to = 'quincy@courseforward.com';
var subject = 'Contact Form | Hackathon Starter'; var subject = 'Free Code Camp';
var mailOptions = { var mailOptions = {
to: to, to: to,

View File

@ -275,10 +275,10 @@ exports.postReset = function(req, res, next) {
}, },
function(user, done) { function(user, done) {
var transporter = nodemailer.createTransport({ var transporter = nodemailer.createTransport({
service: 'SendGrid', service: 'Mandrill',
auth: { auth: {
user: secrets.sendgrid.user, user: secrets.mandrill.user,
pass: secrets.sendgrid.password pass: secrets.mandrill.password
} }
}); });
var mailOptions = { var mailOptions = {
@ -353,10 +353,10 @@ exports.postForgot = function(req, res, next) {
}, },
function(token, user, done) { function(token, user, done) {
var transporter = nodemailer.createTransport({ var transporter = nodemailer.createTransport({
service: 'SendGrid', service: 'Mandrill',
auth: { auth: {
user: secrets.sendgrid.user, user: secrets.mandrill.user,
pass: secrets.sendgrid.password pass: secrets.mandrill.password
} }
}); });
var mailOptions = { var mailOptions = {

View File

@ -6,12 +6,8 @@ var userSchema = new mongoose.Schema({
email: { type: String, unique: true, lowercase: true }, email: { type: String, unique: true, lowercase: true },
password: String, password: String,
facebook: String,
twitter: String, twitter: String,
google: String,
github: String,
instagram: String, instagram: String,
linkedin: String,
tokens: Array, tokens: Array,
profile: { profile: {

View File

@ -62,3 +62,948 @@ footer {
[class^='ion-'] { [class^='ion-'] {
margin-right: 6px; margin-right: 6px;
} }
@charset "UTF-8";
/* Boilerplate: Reset
============================================================ */
#firechat div,
#firechat span,
#firechat applet,
#firechat object,
#firechat iframe,
#firechat h1,
#firechat h2,
#firechat h3,
#firechat h4,
#firechat h5,
#firechat h6,
#firechat p,
#firechat blockquote,
#firechat pre,
#firechat a,
#firechat abbr,
#firechat acronym,
#firechat address,
#firechat big,
#firechat cite,
#firechat code,
#firechat del,
#firechat dfn,
#firechat em,
#firechat img,
#firechat ins,
#firechat kbd,
#firechat q,
#firechat s,
#firechat samp,
#firechat small,
#firechat strike,
#firechat strong,
#firechat sub,
#firechat sup,
#firechat tt,
#firechat var,
#firechat b,
#firechat u,
#firechat i,
#firechat center,
#firechat dl,
#firechat dt,
#firechat dd,
#firechat ol,
#firechat ul,
#firechat li,
#firechat fieldset,
#firechat form,
#firechat label,
#firechat legend,
#firechat table,
#firechat caption,
#firechat tbody,
#firechat tfoot,
#firechat thead,
#firechat tr,
#firechat th,
#firechat td,
#firechat article,
#firechat aside,
#firechat canvas,
#firechat details,
#firechat embed,
#firechat figure,
#firechat figcaption,
#firechat footer,
#firechat header,
#firechat hgroup,
#firechat menu,
#firechat nav,
#firechat output,
#firechat ruby,
#firechat section,
#firechat summary,
#firechat time,
#firechat mark,
#firechat audio,
#firechat video {
border: 0;
font-size: 12px;
font-family: arial, helvetica, sans-serif;
vertical-align: baseline;
margin: 0;
padding: 0;
}
#firechat article,
#firechat aside,
#firechat details,
#firechat figcaption,
#firechat figure,
#firechat footer,
#firechat header,
#firechat hgroup,
#firechat menu,
#firechat nav,
#firechat section {
display: block;
}
#firechat body {
line-height: 1;
}
#firechat ol,
#firechat ul {
list-style: none;
}
#firechat blockquote,
#firechat q {
quotes: none;
}
#firechat blockquote:before,
#firechat blockquote:after,
#firechat q:before,
#firechat q:after {
content: none;
}
#firechat table {
border-collapse: collapse;
border-spacing: 0;
}
/* Boilerplate: Mixins
============================================================ */
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
}
/* Boilerplate: Responsive Layout
============================================================ */
#firechat {
color: #333;
text-align: left;
}
#firechat .center {
float: none !important;
margin-left: auto !important;
margin-right: auto !important;
}
#firechat .left {
float: left !important;
}
#firechat .right {
float: right !important;
}
#firechat .alignleft {
text-align: left !important;
}
#firechat .alignright {
text-align: right !important;
}
#firechat .aligncenter {
text-align: center !important;
}
#firechat .hidden {
display: none !important;
}
#firechat .row {
clear: both;
}
#firechat .fifth,
#firechat .fivesixth,
#firechat .fourfifth,
#firechat .half,
#firechat .ninetenth,
#firechat .quarter,
#firechat .sevententh,
#firechat .sixth,
#firechat .tenth,
#firechat .third,
#firechat .threefifth,
#firechat .threequarter,
#firechat .threetenth,
#firechat .twofifth,
#firechat .twothird,
#firechat .full {
margin-left: 2.127659574468085%;
float: left;
min-height: 1px;
}
#firechat .fifth:first-child,
#firechat .fivesixth:first-child,
#firechat .fourfifth:first-child,
#firechat .half:first-child,
#firechat .ninetenth:first-child,
#firechat .quarter:first-child,
#firechat .sevententh:first-child,
#firechat .sixth:first-child,
#firechat .tenth:first-child,
#firechat .third:first-child,
#firechat .threefifth:first-child,
#firechat .threequarter:first-child,
#firechat .threetenth:first-child,
#firechat .twofifth:first-child,
#firechat .twothird:first-child,
#firechat .full:first-child {
margin-left: 0;
}
#firechat .tenth {
width: 8.08510638297872%;
}
#firechat .sixth {
width: 14.893617021276595%;
}
#firechat .fifth {
width: 18.297872340425535%;
}
#firechat .quarter {
width: 23.404255319148938%;
}
#firechat .threetenth {
width: 26.3829787235%;
}
#firechat .third {
width: 31.914893617021278%;
}
#firechat .twofifth {
width: 38.72340425531915%;
}
#firechat .half {
width: 48.93617021276596%;
}
#firechat .sevententh {
width: 58.7234042555%;
}
#firechat .threefifth {
width: 59.14893617021278%;
}
#firechat .twothird {
width: 65.95744680851064%;
}
#firechat .threequarter {
width: 74.46808510638297%;
}
#firechat .ninetenth {
width: 74.8936170215%;
}
#firechat .fourfifth {
width: 79.57446808510639%;
}
#firechat .fivesixth {
width: 82.9787234042553%;
}
#firechat .full {
width: 100%;
}
#firechat .clipped {
overflow: hidden;
}
#firechat strong {
font-weight: bold;
}
#firechat em {
font-style: italic;
}
#firechat label {
display: block;
}
#firechat a {
color: #005580;
}
#firechat a:visited,
#firechat a:hover,
#firechat a:active {
color: #005580;
}
#firechat p {
margin: 10px 0;
}
#firechat h1,
#firechat h2,
#firechat h3,
#firechat h4,
#firechat h5,
#firechat h6 {
margin: 10px 0;
font-family: inherit;
font-weight: bold;
line-height: 20px;
color: inherit;
}
#firechat h1,
#firechat h2,
#firechat h3 {
line-height: 40px;
}
#firechat h1 {
font-size: 38.5px;
}
#firechat h2 {
font-size: 31.5px;
}
#firechat h3 {
font-size: 24.5px;
}
#firechat h4 {
font-size: 17.5px;
}
#firechat h5 {
font-size: 14px;
}
#firechat h6 {
font-size: 11.9px;
}
#firechat small {
font-size: 90%;
}
/* Component: Tabs
============================================================ */
#firechat .nav {
list-style: none;
}
#firechat .nav > li > a {
display: block;
background-color: #eeeeee;
text-decoration: none;
overflow: hidden;
white-space: nowrap;
}
#firechat .nav > li > a:hover,
#firechat .nav > li > a:focus {
background-color: #ffffff;
}
#firechat .nav-tabs {
border-bottom: 1px solid #ddd;
clear: both;
}
#firechat .nav-tabs > li {
float: left;
margin-bottom: -1px;
max-width: 45%;
}
#firechat .nav-tabs > li > a {
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-topleft: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 4px;
padding: 4px 8px;
margin-right: 2px;
line-height: 20px;
border: 1px solid transparent;
border-color: #cccccc;
}
#firechat .nav-tabs > .active > a,
#firechat .nav-tabs > .active > a:hover,
#firechat .nav-tabs > .active > a:focus {
border-bottom-color: transparent;
background-color: #ffffff;
cursor: default;
}
#firechat .tab-content {
overflow: auto;
}
#firechat .tab-content > .tab-pane {
display: none;
}
#firechat .tab-content > .active {
display: block;
background-color: #ffffff;
}
/* Component: dropdowns
============================================================ */
#firechat .caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
border-top: 4px solid #000000;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
margin-top: 8px;
margin-left: 2px;
}
#firechat .firechat-dropdown {
position: relative;
}
#firechat .firechat-dropdown-toggle {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-decoration: none;
}
#firechat .firechat-dropdown-toggle:focus,
#firechat .firechat-dropdown-toggle:active {
outline: none;
text-decoration: none;
}
#firechat .firechat-dropdown-toggle.btn {
padding: 4px 0 0;
height: 22px;
}
#firechat .firechat-dropdown-menu {
*zoom: 1;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-top-left-radius: 0;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
border-top-left-radius: 0;
z-index: 1000;
display: none;
float: left;
position: absolute;
top: 100%;
left: 0;
width: 100%;
background-color: #ffffff;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
border: 1px solid #ccc;
min-width: 98%;
padding: 0;
margin: -1px 0 0;
}
#firechat .firechat-dropdown-menu:before,
#firechat .firechat-dropdown-menu:after {
display: table;
content: "";
line-height: 0;
}
#firechat .firechat-dropdown-menu:after {
clear: both;
}
#firechat .firechat-dropdown-menu ul {
background-color: #ffffff;
list-style: none;
overflow-y: scroll;
max-height: 300px;
}
#firechat .firechat-dropdown-menu ul > li > a {
display: block;
padding: 1px 1px 1px 3px;
clear: both;
font-weight: normal;
line-height: 20px;
color: #333333;
white-space: nowrap;
}
#firechat .firechat-dropdown-menu ul > li > a.highlight {
background-color: #d9edf7;
}
#firechat .firechat-dropdown-menu ul > li > a:hover,
#firechat .firechat-dropdown-menu ul > li > a:focus,
#firechat .firechat-dropdown-menu ul > .active > a,
#firechat .firechat-dropdown-menu ul > .active > a:hover,
#firechat .firechat-dropdown-menu ul > .active > a:focus {
text-decoration: none;
color: #000000;
background-color: #d9edf7;
outline: 0;
}
#firechat .firechat-dropdown-menu ul > .disabled > a,
#firechat .firechat-dropdown-menu ul > .disabled > a:hover,
#firechat .firechat-dropdown-menu ul > .disabled > a:focus {
color: #999999;
text-decoration: none;
background-color: transparent;
background-image: none;
cursor: default;
}
#firechat .firechat-dropdown-header {
position: relative;
width: 100%;
padding: 10px 0;
background-color: #eeeeee;
border-bottom: 1px solid #cccccc;
}
#firechat .firechat-dropdown-footer {
position: relative;
width: 100%;
padding: 10px 0px;
background-color: #eeeeee;
border-top: 1px solid #cccccc;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#firechat .open {
*z-index: 1000;
}
#firechat .open > .firechat-dropdown-menu {
display: block;
border: 1px solid #cccccc;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-top-left-radius: 0;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
border-top-left-radius: 0;
}
#firechat .open > .firechat-dropdown-toggle {
outline: none;
text-decoration: none;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-topleft: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 4px;
}
/* Component: Prompts
============================================================ */
#firechat .prompt-wrapper {
position: absolute;
z-index: 1000;
}
#firechat .prompt {
position: absolute;
z-index: 1001;
background-color: #ffffff;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
}
#firechat .prompt-header {
padding: 4px 8px;
font-weight: bold;
background-color: #eeeeee;
border: 1px solid #cccccc;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-topleft: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 4px;
}
#firechat .prompt-header a.close {
opacity: 0.6;
font-size: 13px;
margin-top: 2px;
}
#firechat .prompt-header a.close:hover {
opacity: 0.9;
}
#firechat .prompt-body {
background-color: #ffffff;
padding: 4px 8px;
border-left: 1px solid #cccccc;
border-right: 1px solid #cccccc;
}
#firechat .prompt-footer {
padding: 4px 8px;
background-color: #eeeeee;
border: 1px solid #cccccc;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-top-left-radius: 0;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
border-top-left-radius: 0;
}
#firechat .prompt-background {
background-color: #333333;
border: 1px solid #333333;
opacity: 0.8;
z-index: 1000;
height: 100%;
width: 100%;
}
/* Component: Buttons
============================================================ */
#firechat .btn {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
height: 24px;
display: inline-block;
*display: inline;
*zoom: 1;
padding: 2px 5px;
margin-bottom: 0;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #333333;
font-size: 12px;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
border: 1px solid #cccccc;
*border: 0;
border-bottom-color: #b3b3b3;
*margin-left: .3em;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
#firechat .btn:hover,
#firechat .btn:focus,
#firechat .btn:active,
#firechat .btn.active,
#firechat .btn.disabled,
#firechat .btn[disabled] {
color: #333333;
background-color: #e6e6e6;
*background-color: #d9d9d9;
outline: 0;
}
#firechat .btn:active,
#firechat .btn.active {
background-color: #cccccc;
}
#firechat .btn:first-child {
*margin-left: 0;
}
#firechat .btn:hover,
#firechat .btn:focus {
color: #333333;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
#firechat .btn.active,
#firechat .btn:active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}
#firechat .btn.disabled,
#firechat .btn[disabled] {
cursor: default;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
}
#firechat .btn.disabled:active,
#firechat .btn[disabled]:active {
-webkit-box-shadow: inherit;
-moz-box-shadow: inherit;
box-shadow: inherit;
background-color: #e6e6e6;
}
/* Component: Context Menu
============================================================ */
#firechat .contextmenu {
position: fixed;
z-index: 1001;
min-width: 150px;
border: 1px solid #cccccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
#firechat .contextmenu ul {
background-color: #ffffff;
list-style: none;
}
#firechat .contextmenu ul > li > a {
display: block;
padding: 3px 10px;
clear: both;
font-weight: normal;
line-height: 20px;
color: #333333;
white-space: nowrap;
}
#firechat .contextmenu ul > li > a.highlight {
background-color: #d9edf7;
}
#firechat .contextmenu ul > li > a:hover,
#firechat .contextmenu ul > li > a:focus {
text-decoration: none;
color: #ffffff;
background-color: #0081c2;
outline: 0;
}
/* Custom Styles
============================================================ */
#firechat {
padding: 0;
font-family: sans-serif;
font-size: 12px;
line-height: 18px;
}
#firechat input,
#firechat textarea {
width: 100%;
font-family: sans-serif;
font-size: 12px;
line-height: 18px;
padding: 2px 5px;
border: 1px solid #cccccc;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#firechat input:-moz-placeholder,
#firechat textarea:-moz-placeholder {
color: #aaaaaa;
}
#firechat input:-ms-input-placeholder,
#firechat textarea:-ms-input-placeholder {
color: #aaaaaa;
}
#firechat input::-webkit-input-placeholder,
#firechat textarea::-webkit-input-placeholder {
color: #aaaaaa;
}
#firechat input[disabled],
#firechat textarea[disabled] {
background-color: #eeeeee;
}
#firechat input {
height: 24px;
}
#firechat textarea {
resize: none;
height: 40px;
}
#firechat .search-wrapper {
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
border: 1px solid #cccccc;
margin: 0 5px;
padding: 2px 5px;
background: #ffffff;
}
#firechat .search-wrapper > input[type=text] {
padding-left: 0px;
border: none;
}
#firechat .search-wrapper > input[type=text]:focus,
#firechat .search-wrapper > input[type=text]:active {
outline: 0;
}
#firechat .chat {
overflow: auto;
-ms-overflow-x: hidden;
overflow-x: hidden;
height: 290px;
position: relative;
margin-bottom: 5px;
border: 1px solid #cccccc;
border-top: none;
overflow-y: scroll;
}
#firechat .chat textarea {
overflow: auto;
vertical-align: top;
}
#firechat .message {
color: #333;
padding: 3px 5px;
border-bottom: 1px solid #ccc;
}
#firechat .message.highlighted {
background-color: #d9edf7;
}
#firechat .message .name {
font-weight: bold;
overflow-x: hidden;
}
#firechat .message.message-self {
color: #2675ab;
}
#firechat .message:nth-child(odd) {
background-color: #f9f9f9;
}
#firechat .message:nth-child(odd).highlighted {
background-color: #d9edf7;
}
#firechat .message:nth-child(odd).message-local {
background-color: #effafc;
}
#firechat .message-content {
word-wrap: break-word;
padding-right: 45px;
}
#firechat .message-content.red {
color: red;
}
#firechat .message.message-notification .message-content {
font-style: italic;
}
#firechat ul::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
#firechat ul::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
#firechat #firechat-header {
padding: 6px 0 0 0;
height: 40px;
}
#firechat #firechat-tabs {
height: 435px;
}
#firechat #firechat-tab-list {
background-color: #ffffff;
}
#firechat #firechat-tab-content {
width: 100%;
background-color: #ffffff;
}
#firechat .tab-pane-menu {
border: 1px solid #ccc;
border-top: none;
vertical-align: middle;
padding-bottom: 5px;
}
#firechat .tab-pane-menu .firechat-dropdown {
margin: 5px 0 0 5px;
}
#firechat .tab-pane-menu > .icon {
margin: 5px 2px 0;
}
#firechat .icon {
display: inline-block;
*margin-right: .3em;
line-height: 20px;
vertical-align: middle;
background-repeat: no-repeat;
padding: 0;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL8AAAANEAYAAACoeGM7AAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAM80lEQVR42t2cZ4xWRRfHZ3dhwbK7CJZYYiOxV+wlUQzCKmBBsWPvYjQiaiyxYUwULLErltgrNpRF4q5iV0BRLFE0diUi7LIq6Pqw74f//rzO4Zm9d+5z9c37ni//3OfemXtm5sypc58q55xzrrpauHSpcOONheedJ9x9d2Hv3sLvvxfefbfw5puFf/5Zvr+8VFUl7Ozs/rkNNxTef79w222F77wjPOoo4ccfF/O+UDvGzTVEf8wH1zU1wlJJePTRwv33Fx57rPDnn/1+wbzzG+IXvrhmPUPzY/kJEc/HzqslK1fLLy8cMUK4667CFVYQ/vqr8PXXhU884f8eL6eXXKJ2wqSd3tDY2KOHc84NGqSRnnCC7tbVCdvbhRMnasWnTdt5Z+eca2pK6797Yh6ef1641lrCPfYQfv21UNwl62qv115b2Nws/PZb4d57C3/7LftalaOQ/C63nPCII4Tsg6228scHffqp8LHHhPfe6/8eu49feEH44YfCq64S/v67cMGC7tuvu65w6FDhllsKkS/0zoQJaZzMmSO+JaEzZmgkY8b88Ydzzs2b19HhnHNffSWJ6tVLM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Pll9SS3ynKUUwj5RWbI6Q/inWVEgJsUxRFKdKi+T3rLKEtshf9IZytPdgIgNM75PA5dWQ9fBAFE0+cu+dDGQyAHwGMHi0P/sordT12LB4+Ct//0Cbvh1zWINr9gAePIYe4thGCbU//sYRHn/fDLBwyawhDOfe8ESbvCx3/zHuKJp5Cil8cVlVlxcjXhv5yICvh4aPwreDlJY5nUay1Cj2rINn2lD4qPX6KwcPzRQHhKeP5WeQ+ng2nSyhCcv4fKip1EuIXRQlfXIMUn7nPl9SkhKhFFM2v7QcDEIoAQoiHbxV+5V/uEgGQAuJLXRQ7X/KS0sHD///8cpcIl/P69MN3GDh2RBzUvvjLFVI2NuK1einty+CsZDMY/z0qyuOvkGwIY8+zMuE2ZYGHj8JHUWQlm/sm1ENRZ81dWrShLEVAy1/20F9EEZrTQnk9HJCNYL+YLMrD+F/jF7IbnBQQNQDOi/MFJ9fk8O26xisMQmb7OykaagD+p/RLl3JNDj+U0gn13z0xLhQ0BtEqfLtP7TXP057+YvcDCpvDInwvYInUcnIqqjLKK2/IydlnF8NHfvq3FP9/ANgTCJ9z9ZF7AAAAAElFTkSuQmCC) no-repeat top left;
opacity: 0.3;
font-size: 22px;
font-family: Arial;
font-weight: bold;
overflow: hidden;
}
#firechat .icon.plus {
margin-top: 0;
vertical-align: top;
background: transparent;
}
#firechat .icon.search {
background-position: 0 0;
width: 13px;
height: 13px;
}
#firechat .icon.close {
background-position: -120px 0;
width: 13px;
height: 13px;
}
#firechat .icon.user-chat {
background-position: -138px 0;
width: 17px;
height: 13px;
}
#firechat .icon.user-group {
background-position: -18px 0;
width: 17px;
height: 13px;
}
#firechat .icon.user-mute {
background-position: -84px 0;
width: 13px;
height: 13px;
}
#firechat .icon.user-mute.red {
background-position: -102px 0;
width: 13px;
height: 13px;
}
#firechat .icon:hover,
#firechat .btn:hover > .icon {
opacity: 0.6;
}
#firechat a > .icon {
margin: 3px 1px;
}

View File

@ -18,21 +18,6 @@ block content
| Login | Login
a.btn.btn-link(href='/forgot') Forgot your password? a.btn.btn-link(href='/forgot') Forgot your password?
hr hr
a.btn.btn-block.btn-facebook.btn-social(href='/auth/facebook')
i.fa.fa-facebook
| Sign in with Facebook
a.btn.btn-block.btn-twitter.btn-social(href='/auth/twitter') a.btn.btn-block.btn-twitter.btn-social(href='/auth/twitter')
i.fa.fa-twitter i.fa.fa-twitter
| Sign in with Twitter | Sign in with Twitter
a.btn.btn-block.btn-google-plus.btn-social(href='/auth/google')
i.fa.fa-google-plus
| Sign in with Google
a.btn.btn-block.btn-github.btn-social(href='/auth/github')
i.fa.fa-github
| Sign in with GitHub
a.btn.btn-block.btn-linkedin.btn-social(href='/auth/linkedin')
i.fa.fa-linkedin
| Sign in with LinkedIn
a.btn.btn-block.btn-instagram.btn-social(href='/auth/instagram')
i.fa.fa-instagram
| Sign in with Instagram

View File

@ -73,32 +73,7 @@ block content
.page-header .page-header
h3 Linked Accounts h3 Linked Accounts
if user.instagram
p: a.text-danger(href='/account/unlink/instagram') Unlink your Instagram account
else
p: a(href='/auth/instagram') Link your Instagram account
if user.google
p: a.text-danger(href='/account/unlink/google') Unlink your Google account
else
p: a(href='/auth/google') Link your Google account
if user.facebook
p: a.text-danger(href='/account/unlink/facebook') Unlink your Facebook account
else
p: a(href='/auth/facebook') Link your Facebook account
if user.twitter if user.twitter
p: a.text-danger(href='/account/unlink/twitter') Unlink your Twitter account p: a.text-danger(href='/account/unlink/twitter') Unlink your Twitter account
else else
p: a(href='/auth/twitter') Link your Twitter account p: a(href='/auth/twitter') Link your Twitter account
if user.github
p: a.text-danger(href='/account/unlink/github') Unlink your GitHub account
else
p: a(href='/auth/github') Link your GitHub account
if user.linkedin
p: a.text-danger(href='/account/unlink/linkedin') Unlink your LinkedIn account
else
p: a(href='/auth/linkedin') Link your LinkedIn account

View File

@ -1,27 +1,89 @@
extends layout html.
<!-- Firebase -->
<script src='https://cdn.firebase.com/js/client/1.0.21/firebase.js'></script>
<script src='https://cdn.firebase.com/js/simple-login/1.6.3/firebase-simple-login.js'></script>
block content <!-- CodeMirror and its JavaScript mode file -->
h1 Hackathon Starter <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.5.0/codemirror.js"></script>
p.lead A boilerplate for Node.js web applications. <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.5.0/mode/javascript/javascript.js"></script>
hr <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.5.0/codemirror.css" />
.row <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js'></script>
.col-sm-6
h2 Heading <!-- Firepad -->
p Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. <link rel="stylesheet" href="https://cdn.firebase.com/libs/firepad/1.0.0/firepad.css" />
p <script src="https://cdn.firebase.com/libs/firepad/1.0.0/firepad.min.js"></script>
a.btn.btn-default(href='#', role='button') View details »
.col-sm-6 <style>
h2 Heading html { height: 50%; }
p Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. body { margin: 0; height: 100%; position: relative; }
p /* Height / width / positioning can be customized for your use case.
a.btn.btn-default(href='#', role='button') View details » For demo purposes, we make firepad fill the entire browser. */
.col-sm-6 #firepad-container {
h2 Heading width: 100%;
p Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. height: 100%;
p }
a.btn.btn-default(href='#', role='button') View details » </style>
.col-sm-6 </head>
h2 Heading
p Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. <body>
p <div id="firepad-container"></div>
a.btn.btn-default(href='#', role='button') View details »
<script>
function init() {
//// Initialize Firebase.
var firepadRef = getExampleRef();
// TODO: Replace above line with:
// var ref = new Firebase('scorching-heat-2873.firebaseIO.com');
//// Create CodeMirror (with line numbers and the JavaScript mode).
var codeMirror = CodeMirror(document.getElementById('firepad-container'), {
lineNumbers: true,
mode: 'javascript'
});
//// Create Firepad.
var firepad = Firepad.fromCodeMirror(firepadRef, codeMirror, {
defaultText: '// JavaScript Editing with Firepad!\nfunction go() {\n var message = "Hello, world.";\n console.log(message);\n}'
});
}
// Helper to get hash from end of URL or generate a random one.
function getExampleRef() {
var ref = new Firebase('https://firepad.firebaseio-demo.com');
var hash = window.location.hash.replace(/#/g, '');
if (hash) {
ref = ref.child(hash);
} else {
ref = ref.push(); // generate unique location.
window.location = window.location + '#' + ref.name(); // add it as a hash to the URL.
}
if (typeof console !== 'undefined')
console.log('Firebase data: ', ref.toString());
return ref;
}
init();
</script>
html.
<head>
<!-- Download from https://github.com/firebase/firechat -->
<link rel='stylesheet' href='firechat-default.css' />
<script src='firechat-default.js'></script>
</head>
<body>
<script type='text/javascript'>
// Create a new Firebase reference, and a new instance of the Login client
var chatRef = new Firebase('https://scorching-heat-2873.firebaseio.com/chat');
var auth = new FirebaseSimpleLogin(chatRef, function(err, user) {
// Once authenticated, instantiate Firechat with our user id and user name
if (user) {
var chat = new FirechatUI(chatRef, document.getElementById('firechat-wrapper'));
chat.setUser(user.uid, user.displayName);
}
});
</script>
<div id='firechat-wrapper'>
<a href='#' onclick='auth.login("twitter");'>Login</a>
</div>
</body>