Skip to content

Commit

Permalink
give a user a brownie point when they start
Browse files Browse the repository at this point in the history
  • Loading branch information
Quincy Larson committed Aug 11, 2015
1 parent 44cf78a commit 7bfe617
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 35 deletions.
8 changes: 8 additions & 0 deletions common/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ module.exports = function(User) {
user.email = typeof user.email === 'string' ?
user.email.trim().toLowerCase() :
user.email;

if (!user.progressTimestamps) {
user.progressTimestamps = [];
}

if (user.progressTimestamps.length === 0) {
user.progressTimestamps.push({ timestamp: Date.now() });
}
}
next();
});
Expand Down
64 changes: 30 additions & 34 deletions server/views/account/account.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,38 @@ block content
.panel.panel-info(ng-controller="profileValidationController")
.panel-heading.text-center Manage your account here
.panel-body
if (!user.isGithubCool)
.row
.row
.col-xs-12
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
| Link my GitHub to unlock this profile
else
.row
.col-xs-12
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
| Update my profile from Github
if (!user.isGithubCool)
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
i.fa.fa-github
| Link my GitHub to unlock this profile
else
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
| Update my profile from Github

if (!user.twitter)
.col-xs-12
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
i.fa.fa-twitter
| Add my Twitter to my profile
if (!user.facebook)
.col-xs-12
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
i.fa.fa-facebook
| Add my Facebook to my profile
if (!user.linkedin)
.col-xs-12
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
i.fa.fa-linkedin
| Add my LinkedIn to my profile
if (!user.google)
.col-xs-12
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
i.fa.fa-google-plus
| Add my Google+ to my profile
.spacer
hr
.spacer
if (!user.twitter)
.col-xs-12
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
i.fa.fa-twitter
| Add my Twitter to my profile
if (!user.facebook)
.col-xs-12
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
i.fa.fa-facebook
| Add my Facebook to my profile
if (!user.linkedin)
.col-xs-12
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
i.fa.fa-linkedin
| Add my LinkedIn to my profile
if (!user.google)
.col-xs-12
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
i.fa.fa-google-plus
| Add my Google+ to my profile
.big-spacer
.col-xs-12
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
span.ion-android-exit
Expand Down
2 changes: 1 addition & 1 deletion server/views/resources/get-started.jade
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ block content
| Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.

.big-spacer
img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AlwO6CNq-OJJXJ3qu2nu1E7ePe72hCSW5IcB/image.png' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this: 
| Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
Expand Down

0 comments on commit 7bfe617

Please sign in to comment.