improve the profile layout and start building the public profile view

pull/9/head
Michael Q Larson 2015-01-08 18:39:16 -08:00
parent b07ce48ce5
commit bfe75a180d
8 changed files with 248 additions and 215 deletions

View File

@ -186,8 +186,9 @@ exports.returnUser = function(req, res, next) {
coderbyteProfile: user.profile.linkedinProfile, coderbyteProfile: user.profile.linkedinProfile,
githubProfile: user.profile.githubProfile, githubProfile: user.profile.githubProfile,
linkedinProfile: user.profile.linkedinProfile, linkedinProfile: user.profile.linkedinProfile,
codepenProfile: user.codepenProfile, codepenProfile: user.profile.codepenProfile,
twitterHandle: user.twitterHandle, twitterHandle: user.profile.twitterHandle,
bio: user.profile.bio,
website1: user.portfolio.website1Link, website1: user.portfolio.website1Link,
website1Title: user.portfolio.website1Title, website1Title: user.portfolio.website1Title,
website1Image: user.portfolio.website1Image, website1Image: user.portfolio.website1Image,
@ -281,6 +282,7 @@ exports.postUpdateProfile = function(req, res, next) {
user.profile.linkedinProfile = req.body.linkedinProfile || ''; user.profile.linkedinProfile = req.body.linkedinProfile || '';
user.profile.codepenProfile = req.body.codepenProfile || ''; user.profile.codepenProfile = req.body.codepenProfile || '';
user.profile.twitterHandle = req.body.twitterHandle || ''; user.profile.twitterHandle = req.body.twitterHandle || '';
user.profile.bio = req.body.bio || '';
user.portfolio.website1Title = req.body.website1Title || ''; user.portfolio.website1Title = req.body.website1Title || '';
user.portfolio.website1Link = req.body.website1Link || ''; user.portfolio.website1Link = req.body.website1Link || '';
user.portfolio.website1Image = req.body.website1Image || ''; user.portfolio.website1Image = req.body.website1Image || '';

View File

@ -271,6 +271,10 @@ var userSchema = new mongoose.Schema({
lowercase: true, lowercase: true,
trim: true trim: true
}, },
bio: {
type: String,
defaults: ''
},
name: { name: {
type: String, type: String,
default: '' default: ''

View File

@ -386,9 +386,21 @@ thead {
font-size: 40px; font-size: 40px;
} }
.public-profile-img {
height: 200px;
width: 200px;
}
.ng-invalid.ng-dirty { .ng-invalid.ng-dirty {
border-color: #FA787E; border-color: #FA787E;
} }
.ng-valid.ng-dirty { .ng-valid.ng-dirty {
border-color: #78FA89; border-color: #78FA89;
} }
.desktop-narrow {
@media (min-width: 767px) {
marign: 0 auto;
width: 80%;
}
}

View File

@ -2,19 +2,19 @@ extends ../layout
block content block content
.jumbotron.text-center .jumbotron.text-center
h2 Sign in with one of these options: h2 Sign in with one of these options:
a.btn.btn-lg.btn-block.btn-google-plus.btn-social(href='/auth/google') a.btn.btn-lg.btn-block.btn-google-plus.btn-social-login(href='/auth/google')
i.fa.fa-google-plus i.fa.fa-google-plus
| Sign in with Google | Sign in with Google
a.btn.btn-lg.btn-block.btn-facebook.btn-social(href='/auth/facebook') a.btn.btn-lg.btn-block.btn-facebook.btn-social-login(href='/auth/facebook')
i.fa.fa-facebook i.fa.fa-facebook
| Sign in with Facebook | Sign in with Facebook
//a.btn.btn-lg.btn-block.btn-github.btn-social(href='/auth/github') //a.btn.btn-lg.btn-block.btn-github.btn-social-login(href='/auth/github')
// i.fa.fa-github // i.fa.fa-github
// | Sign in with GitHub // | Sign in with GitHub
a.btn.btn-lg.btn-block.btn-linkedin.btn-social(href='/auth/linkedin') a.btn.btn-lg.btn-block.btn-linkedin.btn-social-login(href='/auth/linkedin')
i.fa.fa-linkedin i.fa.fa-linkedin
| Sign in with LinkedIn | Sign in with LinkedIn
a.btn.btn-lg.btn-block.btn-twitter.btn-social(href='/auth/twitter') a.btn.btn-lg.btn-block.btn-twitter.btn-social-login(href='/auth/twitter')
i.fa.fa-twitter i.fa.fa-twitter
| Sign in with Twitter | Sign in with Twitter
br br

View File

@ -1,198 +1,207 @@
extends ../layout extends ../layout
block content block content
link(href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css", rel="stylesheet") .panel.panel-primary(ng-controller="profileValidationController")
.panel(ng-controller="profileValidationController") .panel-heading.text-center Update your profile here:
.container.text-center .panel-body
h1 Update your profile here: .container.text-center
form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm') form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm')
input(type='hidden', name='_csrf', value=_csrf) input(type='hidden', name='_csrf', value=_csrf)
.col-sm-4.col-sm-offset-5 .col-sm-4.col-sm-offset-5
h2 Bio h2 Bio
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='name') Name label.col-sm-3.col-sm-offset-2.control-label(for='name') Name *
.col-sm-4 .col-sm-4
input.form-control(type='text', placeholder='Name', name='name', ng-model='user.profile.name', ng-minlength='3', ng-maxlength='50', required='required', ng-focus='ng-focus', id='name') input.form-control(type='text', placeholder='Name', name='name', ng-model='user.profile.name', ng-minlength='3', ng-maxlength='50', required='required', id='name')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.name.$invalid && !profileForm.name.$pristine && profileForm.name.$error.required") .col-sm-4.col-sm-offset-5(ng-show="profileForm.name.$invalid && !profileForm.name.$pristine && profileForm.name.$error.required")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Your name is required. | Your name is required.
.col-sm-4.col-sm-offset-5(ng-show='profileForm.name.$error.minlength && !profileForm.name.$pristine') .col-sm-4.col-sm-offset-5(ng-show='profileForm.name.$error.minlength && !profileForm.name.$pristine')
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Your name must be at least 3 characters. | Your name must be at least 3 characters.
.col-sm-4.col-sm-offset-5(ng-show='profileForm.name.$error.maxlength && !profileForm.name.$pristine') .col-sm-4.col-sm-offset-5(ng-show='profileForm.name.$error.maxlength && !profileForm.name.$pristine')
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Your name must be fewer than 50 characters. | Your name must be fewer than 50 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='username') Username (path to public profile) * label.col-sm-3.col-sm-offset-2.control-label(for='username') Username (path to public profile) *
.col-sm-4 .col-sm-4
input.form-control(type='text', placeholder='username' name='username', id='username', ng-model='user.profile.username', required='required', ng-minlength='5', ng-maxlength='20') input.form-control(type='text', placeholder='username' name='username', id='username', ng-model='user.profile.username', required='required', ng-minlength='5', ng-maxlength='20')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.required && !profileForm.username.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.required && !profileForm.username.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Please enter a username. | Please enter a username.
.col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.minlength && !profileForm.username.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.minlength && !profileForm.username.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Your username must be at least 5 characters. | Your username must be at least 5 characters.
.col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.maxlength && !profileForm.username.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.username.$error.maxlength && !profileForm.username.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Your username must be fewer than 15 characters. | Your username must be fewer than 15 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') Email * label.col-sm-3.col-sm-offset-2.control-label(for='email') Email *
.col-sm-4 .col-sm-4
input.form-control(type='email', name='email', id='email', ng-model='user.email', required='required') input.form-control(type='email', name='email', id='email', ng-model='user.email', required='required')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.email.$error.required && !profileForm.email.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.email.$error.required && !profileForm.email.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| An email address is required. | An email address is required.
.col-sm-4.col-sm-offset-5(ng-show="profileForm.$error.email && !profileForm.email.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.$error.email && !profileForm.email.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Please enter a valid email format. | Please enter a valid email format.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='location') Location label.col-sm-3.col-sm-offset-2.control-label(for='location') Location
.col-sm-4 .col-sm-4
input.form-control(type='text', name='location', id='location', ng-model='user.profile.location') input.form-control(type='text', name='location', id='location', ng-model='user.profile.location')
.form-group .form-group
.col-sm-offset-5.col-sm-4 label.col-sm-3.col-sm-offset-2.control-label(for='bio') Bio (140 characters)
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid') .col-sm-4
span.ion-edit input.form-control(type='text', name='bio', ng-model='user.profile.bio', ng-maxlength='140', id='bio')
| Update my Bio .col-sm-4.col-sm-offset-5(ng-show='profileForm.bio.$error.maxlength && !profileForm.bio.$pristine')
alert(type='danger')
span.ion-close-circled
| Your bio must be fewer than 140 characters.
.col-sm-4.col-sm-offset-5 .form-group
h2 Social .col-sm-offset-5.col-sm-4
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
span.ion-edit
| Update my Bio
.form-group .col-sm-4.col-sm-offset-5
label.col-sm-3.col-sm-offset-2.control-label(for='email') Twitter Handle h2 Social
.col-sm-4
.input-group.twitter-input
span.input-group-addon @
input.form-control(type='text', name='twitterHandle', id='twitterHandle', ng-model='user.profile.twitterHandle', ng-maxlength='15', ng-pattern="/^[A-z0-9_]+$/")
.col-sm-4.col-sm-offset-5(ng-show="profileForm.twitterHandle.$error.pattern")
alert(type='danger')
span.ion-close-circled
| Your Twitter handle should only contain letters, numbers and underscores (@az10_).
.col-sm-4.col-sm-offset-5(ng-show='profileForm.twitterHandle.$error.maxlength && !profileForm.twitterHandle.$pristine')
alert(type='danger')
span.ion-close-circled
| Your name must be fewer than 15 characters.
.form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') Github Profile Link
.col-sm-4
input.form-control(type='url', name='githubProfile', id='githubProfile', ng-model='user.profile.githubProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.githubProfile.$error.url && !profileForm.githubProfile.$pristine")
alert(type='danger')
span.ion-close-circled
| Please enter a valid URL format (http://www.example.com).
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') CodePen Profile Link label.col-sm-3.col-sm-offset-2.control-label(for='email') Twitter Handle
.col-sm-4 .col-sm-4
input.form-control(type='url', name='codepenProfile', id='codepenProfile', ng-model='user.profile.codepenProfile', placeholder='http://') .input-group.twitter-input
.col-sm-4.col-sm-offset-5(ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine") span.input-group-addon @
alert(type='danger') input.form-control(type='text', name='twitterHandle', id='twitterHandle', ng-model='user.profile.twitterHandle', ng-maxlength='15', ng-pattern="/^[A-z0-9_]+$/")
span.ion-close-circled .col-sm-4.col-sm-offset-5(ng-show="profileForm.twitterHandle.$error.pattern")
| Please enter a valid URL format (http://www.example.com). alert(type='danger')
span.ion-close-circled
| Your Twitter handle should only contain letters, numbers and underscores (@az10_).
.col-sm-4.col-sm-offset-5(ng-show='profileForm.twitterHandle.$error.maxlength && !profileForm.twitterHandle.$pristine')
alert(type='danger')
span.ion-close-circled
| Your name must be fewer than 15 characters.
.form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') Github Profile Link
.col-sm-4
input.form-control(type='url', name='githubProfile', id='githubProfile', ng-model='user.profile.githubProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.githubProfile.$error.url && !profileForm.githubProfile.$pristine")
alert(type='danger')
span.ion-close-circled
| Please enter a valid URL format (http://www.example.com).
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') CoderByte Profile Link label.col-sm-3.col-sm-offset-2.control-label(for='email') CodePen Profile Link
.col-sm-4 .col-sm-4
input.form-control(type='url', name='coderbyteProfile', id='coderbyteProfile', ng-model='user.profile.coderbyteProfile', placeholder='http://') input.form-control(type='url', name='codepenProfile', id='codepenProfile', ng-model='user.profile.codepenProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.coderbyteProfile.$error.url && !profileForm.coderbyteProfile.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Please enter a valid URL format (http://www.example.com). | Please enter a valid URL format (http://www.example.com).
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') LinkedIn Profile Link label.col-sm-3.col-sm-offset-2.control-label(for='email') CoderByte Profile Link
.col-sm-4 .col-sm-4
input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', ng-model='user.profile.linkedinProfile', placeholder='http://') input.form-control(type='url', name='coderbyteProfile', id='coderbyteProfile', ng-model='user.profile.coderbyteProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine") .col-sm-4.col-sm-offset-5(ng-show="profileForm.coderbyteProfile.$error.url && !profileForm.coderbyteProfile.$pristine")
alert(type='danger') alert(type='danger')
span.ion-close-circled span.ion-close-circled
| Please enter a valid URL format (http://www.example.com). | Please enter a valid URL format (http://www.example.com).
.form-group .form-group
.col-sm-offset-5.col-sm-4 label.col-sm-3.col-sm-offset-2.control-label(for='email') LinkedIn Profile Link
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid') .col-sm-4
span.ion-edit input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', ng-model='user.profile.linkedinProfile', placeholder='http://')
| Update my Social Links .col-sm-4.col-sm-offset-5(ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine")
alert(type='danger')
span.ion-close-circled
| Please enter a valid URL format (http://www.example.com).
.col-sm-4.col-sm-offset-5 .form-group
h2 Portfolio .col-sm-offset-5.col-sm-4
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
span.ion-edit
| Update my Social Links
.form-group .col-sm-4.col-sm-offset-5
label.col-sm-3.col-sm-offset-2.control-label(for='website1Title') 1st Portfolio Website Title h2 Portfolio
.col-sm-4
input.form-control(type='text', name='website1Title', id='website1Title', ng-model='user.portfolio.website1Title', ng-maxlength='140')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website1Title.$error.maxlength && !profileForm.website1Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website1Link') 1st Portfolio Website Link label.col-sm-3.col-sm-offset-2.control-label(for='website1Title') 1st Portfolio Website Title
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website1Link', id='website1Link', ng-model='user.portfolio.website1Link', placeholder='http://') input.form-control(type='text', name='website1Title', id='website1Title', ng-model='user.portfolio.website1Title', ng-maxlength='140')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website1Title.$error.maxlength && !profileForm.website1Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website1Image') 1st Portfolio Website Image Link label.col-sm-3.col-sm-offset-2.control-label(for='website1Link') 1st Portfolio Website Link
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website1Image', id='website1Image', ng-model='user.portfolio.website1Image', placeholder='http://') input.form-control(type='text', name='website1Link', id='website1Link', ng-model='user.portfolio.website1Link', placeholder='http://')
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website2Title') 2nd Portfolio Website Title label.col-sm-3.col-sm-offset-2.control-label(for='website1Image') 1st Portfolio Website Image Link
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website2Title', id='website2Title', ng-model='user.portfolio.website2Title', ng-maxlength='140') input.form-control(type='text', name='website1Image', id='website1Image', ng-model='user.portfolio.website1Image', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website2Title.$error.maxlength && !profileForm.website2Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website2Link') 2nd Portfolio Website Link label.col-sm-3.col-sm-offset-2.control-label(for='website2Title') 2nd Portfolio Website Title
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website2Link', id='website2Link', ng-model='user.portfolio.website2Link', placeholder='http://') input.form-control(type='text', name='website2Title', id='website2Title', ng-model='user.portfolio.website2Title', ng-maxlength='140')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website2Title.$error.maxlength && !profileForm.website2Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website2Image') 2nd Portfolio Website Image Link label.col-sm-3.col-sm-offset-2.control-label(for='website2Link') 2nd Portfolio Website Link
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website2Image', id='website2Image', ng-model='user.portfolio.website2Image', placeholder='http://') input.form-control(type='text', name='website2Link', id='website2Link', ng-model='user.portfolio.website2Link', placeholder='http://')
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website3Title') 3rd Portfolio Website Title label.col-sm-3.col-sm-offset-2.control-label(for='website2Image') 2nd Portfolio Website Image Link
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website3Title', id='website3Title', ng-model='user.portfolio.website3Title', ng-maxlength='140') input.form-control(type='text', name='website2Image', id='website2Image', ng-model='user.portfolio.website2Image', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website3Title.$error.maxlength && !profileForm.website3Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website3Link') 3rd Portfolio Website Link label.col-sm-3.col-sm-offset-2.control-label(for='website3Title') 3rd Portfolio Website Title
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website3Link', id='website3Link', ng-model='user.portfolio.website3Link', placeholder='http://') input.form-control(type='text', name='website3Title', id='website3Title', ng-model='user.portfolio.website3Title', ng-maxlength='140')
.col-sm-4.col-sm-offset-5(ng-show="profileForm.website3Title.$error.maxlength && !profileForm.website3Title.$pristine")
alert(type='danger')
span.ion-close-circled
| Portfolio project title must be fewer than 140 characters.
.form-group .form-group
label.col-sm-3.col-sm-offset-2.control-label(for='website3Image') 3rd Portfolio Website Image Link label.col-sm-3.col-sm-offset-2.control-label(for='website3Link') 3rd Portfolio Website Link
.col-sm-4 .col-sm-4
input.form-control(type='text', name='website3Image', id='website3Image', ng-model='user.portfolio.website3Image', placeholder='http://') input.form-control(type='text', name='website3Link', id='website3Link', ng-model='user.portfolio.website3Link', placeholder='http://')
.form-group .form-group
.col-sm-offset-5.col-sm-4 label.col-sm-3.col-sm-offset-2.control-label(for='website3Image') 3rd Portfolio Website Image Link
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid') .col-sm-4
span.ion-edit input.form-control(type='text', name='website3Image', id='website3Image', ng-model='user.portfolio.website3Image', placeholder='http://')
| Update my Portfolio
br .form-group
.col-sm-offset-5.col-sm-4
button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
span.ion-edit
| Update my Portfolio
br
.panel .panel
.big-break .big-break
.container.text-center .container.text-center

View File

@ -1,39 +1,43 @@
extends ../layout extends ../layout
block content block content
.panel.panel-primary .row
.panel-heading.text-center @#{username} .col-sm-12.col-md-8.col-xs-12
.panel-body .panel.panel-primary
.row .panel-heading.text-center @#{username}'s Portfolio:
.col-xs-2.col-sm-1.col-md-1 .panel-body
img(src="#{user.picture}") .col-sm-12.col-md-4.col-xs-12
.col-xs-4.col-sm-2.col-md-2 .panel.panel-primary
h2.nameline .panel-heading.text-center About @#{username}:
= "[ " + user.points + " ]" .panel-body
.col-xs-6.col-sm-9.col-md-9
h2.nameline
= name
h4= location
a(href="http://twitter.com/#{user.profile.twitterHandle}")
|= "@#{twitterHandle} on Twitter"
a(href="#{user.profile.coderbyteProfile")
| Coderbyte Profile
a(href="#{user.profile.linkedin")
| LinkedIn Profile
a(href="#{user.profile.codepen")
| Codepen Portfolio
a(href=linkedin)
- if (ch[0] > 0)
.container
h1 Completed Challenges
.col-xs-12 .col-xs-12
table.table.table-striped img.img-center.img-responsive.public-profile-img(src=picture)
thead .row
tr .col-xs-4
th Challenge h1.text-center
th Date Finished = "[ " + user.points + " ]"
for challenge in challenges .col-xs-8
if ch[challenge.challengeNumber] > 0 h1
tr - if (twitterHandle)
td= challenges[challenge.challengeNumber].name a.ion-social-twitter.text-primary(title="@#{username}'s Twitter Profile", href="http://twitter.com/#{twitterHandle}")
td= moment(ch[challenge.challengeNumber], 'X').format("MMM DD, YYYY") a.ion-social-github.text-primary(title="@#{username}'s GitHub Profile", href=githubProfile)
br a.ion-social-linkedin.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedinProfile)
a.ion-social-codepen.text-primary(title="@#{username}'s CodePen Profile", href=codepenProfile)
a.ion-social-javascript.text-primary(title="@#{username}'s CoderByte Profile", href=coderbyteProfile)
.col-xs-12
h2= name
h3= location
- if (ch[0] > 0)
.container
h1 Completed Challenges
.col-xs-12
table.table.table-striped
thead
tr
th Challenge
th Date Finished
for challenge in challenges
if ch[challenge.challengeNumber] > 0
tr
td= challenges[challenge.challengeNumber].name
td= moment(ch[challenge.challengeNumber], 'X').format("MMM DD, YYYY")
br

View File

@ -27,9 +27,9 @@ block content
- if (cc) - if (cc)
a.animated.fadeIn.delay-2.btn.btn-lg.btn-primary.btn-block.next-button(name='_csrf', value=_csrf, aria-hidden='true') Take me to my next challenge a.animated.fadeIn.delay-2.btn.btn-lg.btn-primary.btn-block.next-button(name='_csrf', value=_csrf, aria-hidden='true') Take me to my next challenge
- if (points && points > 2) - if (points && points > 2)
a.animated.fadeIn.delay-2.btn-twitter.btn.btn-lg.btn-info.btn-block(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20Free%20Code%20Camp%20Challenge%20%23#{number}:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{number}&hashtags=learntocode, javascript" target="_blank") a.animated.fadeIn.delay-2.btn.btn-lg.btn-block.btn-twitter.btn-social.btn-social-tweet(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20Free%20Code%20Camp%20Challenge%20%23#{number}:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{number}&hashtags=learntocode, javascript" target="_blank")
i.fa.fa-twitter   i.fa.fa-twitter  
= phrase = phrase
- else - else
a.animated.fadeIn.delay-2.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress a.animated.fadeIn.delay-2.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
#skip-dialog.modal #skip-dialog.modal

View File

@ -5,6 +5,8 @@ html(ng-app='profileValidation')
script(src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.8/angular.min.js") script(src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.8/angular.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js") script(src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js")
link(rel='shortcut icon', href='https://s3.amazonaws.com/freecodecamp/favicon.ico') link(rel='shortcut icon', href='https://s3.amazonaws.com/freecodecamp/favicon.ico')
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css')
//link(rel='stylesheet', href='http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css')
include partials/meta include partials/meta
title #{title} | Free Code Camp title #{title} | Free Code Camp
meta(charset='utf-8') meta(charset='utf-8')