2015-01-06 00:38:56 +00:00
|
|
|
|
extends ../layout
|
|
|
|
|
block content
|
2015-05-03 23:31:45 +00:00
|
|
|
|
script(src="/bower_components/cal-heatmap/cal-heatmap.min.js")
|
2015-02-22 05:45:25 +00:00
|
|
|
|
script.
|
|
|
|
|
var challengeName = 'Profile View';
|
2015-09-09 05:52:32 +00:00
|
|
|
|
if (user && user.username === username)
|
|
|
|
|
.panel.panel-info
|
2015-09-28 00:08:56 +00:00
|
|
|
|
.panel-heading.text-center Update Your Portfolio
|
2015-09-09 05:52:32 +00:00
|
|
|
|
.panel-body
|
|
|
|
|
.row
|
|
|
|
|
.col-xs-12
|
|
|
|
|
if (!user.isGithubCool)
|
|
|
|
|
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
|
|
|
|
|
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)
|
2015-09-28 04:52:13 +00:00
|
|
|
|
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
|
|
|
|
|
i.fa.fa-twitter
|
|
|
|
|
| Add my Twitter to my profile
|
2015-09-09 05:52:32 +00:00
|
|
|
|
if (!user.facebook)
|
2015-09-28 04:52:13 +00:00
|
|
|
|
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
|
|
|
|
|
i.fa.fa-facebook
|
|
|
|
|
| Add my Facebook to my profile
|
2015-09-09 05:52:32 +00:00
|
|
|
|
if (!user.linkedin)
|
2015-09-28 04:52:13 +00:00
|
|
|
|
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
|
|
|
|
|
i.fa.fa-linkedin
|
|
|
|
|
| Add my LinkedIn to my profile
|
2015-09-09 05:52:32 +00:00
|
|
|
|
if (!user.google)
|
2015-09-28 04:52:13 +00:00
|
|
|
|
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
|
2015-09-28 00:08:56 +00:00
|
|
|
|
|
2015-04-29 05:29:59 +00:00
|
|
|
|
.panel.panel-info
|
|
|
|
|
.panel-heading.text-center
|
|
|
|
|
h1 #{username}'s portfolio
|
|
|
|
|
.panel-body
|
|
|
|
|
.row
|
2015-09-28 04:52:13 +00:00
|
|
|
|
.col-xs-12.col-sm-10.col-sm-offset-1.col-md-8.col-md-offset-2.text-center
|
|
|
|
|
if picture
|
|
|
|
|
img.img-center.img-responsive.public-profile-img(src=picture)
|
|
|
|
|
else
|
|
|
|
|
img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png')
|
|
|
|
|
h1.text-center.negative-5.profile-social-icons
|
|
|
|
|
if (twitter)
|
|
|
|
|
a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href='https://twitter.com/' + twitter, target='_blank')
|
|
|
|
|
if (github)
|
|
|
|
|
a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=github, target='_blank')
|
|
|
|
|
if (linkedin)
|
|
|
|
|
a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedin, target='_blank')
|
|
|
|
|
if (facebook)
|
|
|
|
|
a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href='https://facebook.com/' + facebook, target='_blank')
|
|
|
|
|
if (google)
|
|
|
|
|
a.fa.fa-google-plus-square.text-primary(title="@#{username}'s Google Profile", href='https://plus.google.com/' + google, target='_blank')
|
|
|
|
|
h1.flat-top.wrappable= name
|
|
|
|
|
h1.flat-top.wrappable= location
|
|
|
|
|
h1.flat-top.text-primary= "[ " + (progressTimestamps.length) + " ]"
|
|
|
|
|
if (user && user.username !== username)
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
|
|
|
|
|
i.fa.fa-plus-square
|
|
|
|
|
| Add them to my personal leaderboard
|
|
|
|
|
|
2015-05-03 07:34:46 +00:00
|
|
|
|
.spacer
|
2015-05-05 23:41:28 +00:00
|
|
|
|
.hidden-xs.hidden-sm.col-md-12
|
|
|
|
|
#cal-heatmap.d3-centered
|
2015-04-29 05:29:59 +00:00
|
|
|
|
script.
|
2015-05-05 23:41:28 +00:00
|
|
|
|
$(document).ready(function () {
|
2015-06-21 02:52:37 +00:00
|
|
|
|
var cal = new CalHeatMap();
|
|
|
|
|
var calendar = !{JSON.stringify(calender)};
|
|
|
|
|
cal.init({
|
|
|
|
|
itemSelector: "#cal-heatmap",
|
|
|
|
|
domain: "month",
|
|
|
|
|
subDomain: "x_day",
|
|
|
|
|
domainGutter: 10,
|
|
|
|
|
data: calendar,
|
|
|
|
|
cellSize: 15,
|
|
|
|
|
align: 'center',
|
|
|
|
|
cellRadius: 3,
|
|
|
|
|
cellPadding: 2,
|
|
|
|
|
tooltip: true,
|
|
|
|
|
range: 6,
|
|
|
|
|
start: new Date().setDate(new Date().getDate() - 150),
|
|
|
|
|
legendColors: ["#cccccc", "#215f1e"],
|
|
|
|
|
legend: [1, 2, 3],
|
|
|
|
|
label: {
|
|
|
|
|
position: "top"
|
|
|
|
|
}
|
|
|
|
|
});
|
2015-04-29 05:29:59 +00:00
|
|
|
|
});
|
|
|
|
|
.row
|
|
|
|
|
.hidden-xs.col-sm-12.text-center
|
|
|
|
|
.row.text-primary
|
2015-08-11 04:01:37 +00:00
|
|
|
|
h4.col-sm-6.text-right Longest Streak: #{longestStreak} #{longestStreak + longestStreak === 1 ? ' day' : ' days'}
|
|
|
|
|
h4.col-sm-6.text-left Current Streak: #{currentStreak} #{currentStreak + currentStreak === 1 ? ' day' : ' days'}
|
2015-04-05 07:01:51 +00:00
|
|
|
|
|
2015-05-05 23:41:28 +00:00
|
|
|
|
|
2015-10-01 04:04:16 +00:00
|
|
|
|
if (user.username == username || !user.lockdownMode)
|
2015-09-28 04:52:13 +00:00
|
|
|
|
if (challenges.length > 0)
|
|
|
|
|
.col-sm-12
|
|
|
|
|
table.table.table-striped
|
|
|
|
|
thead
|
|
|
|
|
tr
|
|
|
|
|
th.col-xs-4 Project
|
|
|
|
|
th.col-xs-2 Completed
|
|
|
|
|
th.col-xs-6 Link
|
|
|
|
|
for challenge in challenges
|
|
|
|
|
tr
|
|
|
|
|
td.col-xs-4
|
|
|
|
|
a(href='/challenges/' + challenge.name, target='_blank')= challenge.name
|
|
|
|
|
td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY")
|
|
|
|
|
td.col-xs-6
|
|
|
|
|
a(href=challenge.solution, target='_blank') View my project
|
|
|
|
|
if (bonfires.length > 0)
|
|
|
|
|
.col-sm-12
|
|
|
|
|
table.table.table-striped
|
|
|
|
|
thead
|
|
|
|
|
tr
|
|
|
|
|
th.col-xs-4 Bonfire
|
|
|
|
|
th.col-xs-2 Completed
|
|
|
|
|
th.col-xs-6 Solution
|
|
|
|
|
for bonfire in bonfires
|
|
|
|
|
tr
|
2015-10-01 04:04:16 +00:00
|
|
|
|
td.col-xs-4= bonfire.name
|
2015-09-28 04:52:13 +00:00
|
|
|
|
td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY")
|
|
|
|
|
td.col-xs-6
|
2015-10-01 04:04:16 +00:00
|
|
|
|
a(href='/challenges/' + bonfire.name + '?solution=' + encodeURIComponent(bonfire.solution), target='_blank') View my solution
|
2015-09-28 00:08:56 +00:00
|
|
|
|
|
|
|
|
|
if (user && user.username === username)
|
|
|
|
|
.panel.panel-info
|
|
|
|
|
.panel-heading.text-center Manage Your Account
|
|
|
|
|
.panel-body
|
|
|
|
|
.col-xs-12
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com')
|
|
|
|
|
span.ion-email
|
|
|
|
|
| Email us at team@freecodecamp.com
|
|
|
|
|
if (!user.lockdownMode)
|
|
|
|
|
.col-xs-12
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-info.btn-link-social(href='/toggle-lockdown-mode')
|
|
|
|
|
span.ion-locked
|
|
|
|
|
| Hide all my solutions from other people
|
|
|
|
|
else
|
|
|
|
|
.col-xs-12
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-info.btn-link-social(href='/toggle-lockdown-mode')
|
|
|
|
|
span.ion-unlocked
|
|
|
|
|
| Let other people see all my solutions
|
|
|
|
|
.col-xs-12
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
|
|
|
|
|
span.ion-android-exit
|
|
|
|
|
| Sign me out of Free Code Camp
|
|
|
|
|
.col-xs-12
|
|
|
|
|
a.btn.btn-lg.btn-block.btn-danger.btn-link-social.confirm-deletion
|
|
|
|
|
span.ion-trash-b
|
|
|
|
|
| Delete my Free Code Camp account
|
|
|
|
|
script.
|
|
|
|
|
$('.confirm-deletion').on("click", function () {
|
|
|
|
|
$('#modal-dialog').modal('show');
|
|
|
|
|
});
|
|
|
|
|
#modal-dialog.modal.animated.wobble
|
|
|
|
|
.modal-dialog
|
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header
|
|
|
|
|
a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
|
|
|
|
|
h3 You don't really want to delete your account, do you?
|
|
|
|
|
.modal-body
|
|
|
|
|
p This will really delete all your data, including all your progress, news stories and brownie points.
|
|
|
|
|
p We won't be able to recover any of it for you later, even if you change your mind.
|
|
|
|
|
p If there's something we could do better, send us an email instead and we'll do our best:  
|
|
|
|
|
a(href="mailto:team@freecodecamp.com") team@freecodecamp.com
|
|
|
|
|
| .
|
|
|
|
|
.modal-footer
|
|
|
|
|
a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
|
|
|
|
|
span.ion-happy
|
|
|
|
|
| Nevermind, I don't want to delete all my progress
|
|
|
|
|
.btn-spacer
|
|
|
|
|
form(action='/account/delete', method='POST')
|
|
|
|
|
input(type='hidden', name='_csrf', value=_csrf)
|
|
|
|
|
button.btn.btn-danger.btn-block(type='submit')
|
|
|
|
|
span.ion-trash-b
|
|
|
|
|
| I am 100% sure I want to delete all my progress
|