improvements to portfolios and heatmaps

This commit is contained in:
Quincy Larson
2015-05-03 00:34:46 -07:00
parent 6d015212e4
commit 451e3c75f2
4 changed files with 92 additions and 83 deletions

View File

@ -999,8 +999,9 @@ hr {
border-bottom: dashed 1px @brand-success; border-bottom: dashed 1px @brand-success;
} }
#cal-heatmap { .d3-centered {
width: 361px; width: 771px;
margin: 0 auto;
} }
.cal-heatmap-container { .cal-heatmap-container {

View File

@ -10,7 +10,7 @@ block content
.row.text-center .row.text-center
.col-xs-12.col-sm-10.col-sm-offset-1 .col-xs-12.col-sm-10.col-sm-offset-1
a.btn.btn-big.btn-primary.btn-block(href="/account") Update my portfolio page or manage my account a.btn.btn-big.btn-primary.btn-block(href="/account") Update my portfolio page or manage my account
.spacer .button-spacer
.col-xs-12.col-sm-10.col-sm-offset-1 .col-xs-12.col-sm-10.col-sm-offset-1
a.btn.btn-big.btn-success.btn-block(href="/signout") Sign out of Free Code Camp a.btn.btn-big.btn-success.btn-block(href="/signout") Sign out of Free Code Camp
.spacer .spacer
@ -98,10 +98,12 @@ block content
i.fa.icon-beaker i.fa.icon-beaker
| Try it out | Try it out
.hidden-xs.col-sm-12
.spacer
.hidden-xs.hidden-sm.col-md-12
script(src="//d3js.org/d3.v3.min.js") script(src="//d3js.org/d3.v3.min.js")
script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js") script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js")
#cal-heatmap.img-center #cal-heatmap.d3-centered
script. script.
$(document).ready(function() { $(document).ready(function() {
setTimeout(function() { setTimeout(function() {
@ -110,17 +112,21 @@ block content
cal.init({ cal.init({
itemSelector: "#cal-heatmap", itemSelector: "#cal-heatmap",
domain: "month", domain: "month",
subDomain: "day", subDomain: "x_day",
domainGutter: 10,
data: calendar, data: calendar,
cellSize: 15, cellSize: 15,
align: 'center', align: 'center',
cellRadius: 3, cellRadius: 3,
cellPadding: 2, cellPadding: 2,
tooltip: true, tooltip: true,
range: 4, range: 6,
start: new Date().setDate(new Date().getDate() - 90), start: new Date().setDate(new Date().getDate() - 150),
legendColors: ["#cccccc", "#215f1e"], legendColors: ["#cccccc", "#215f1e"],
legend: [1, 2, 3] legend: [1, 2, 3],
label: {
position: "top"
}
}); });
}, 300); }, 300);
}); });
@ -140,7 +146,8 @@ block content
th.col-xs-6 Link th.col-xs-6 Link
for challenge in challenges for challenge in challenges
tr tr
td.col-xs-4= challenge.name td.col-xs-4
a(href='/challenges/' + challenge.name)= challenge.name
td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY")
td.col-xs-6 td.col-xs-6
a(href=challenge.solution) View my solution a(href=challenge.solution) View my solution
@ -156,7 +163,8 @@ block content
th.col-xs-6 Solution th.col-xs-6 Solution
for bonfire in bonfires for bonfire in bonfires
tr tr
td.col-xs-4= bonfire.name td.col-xs-4
a(href='/bonfires/'+ bonfire.name)= bonfire.name
td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY")
td.col-xs-6= bonfire.solution td.col-xs-6= bonfire.solution
br br

View File

@ -7,7 +7,7 @@ block content
.row .row
.col-xs-12.col-sm-12.col-md-3 .col-xs-12.col-sm-12.col-md-3
h3.nowrap Get Connected h3.nowrap Get Connected
img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', alt='Get great references and connections for your resume or CV to help you get a job') img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', alt='Get great references and connections for your reto help you get a job')
p.landing-p Join a community of busy, motivated professionals. p.landing-p Join a community of busy, motivated professionals.
.col-xs-12.col-sm-12.col-md-3 .col-xs-12.col-sm-12.col-md-3
h3.nowrap Learn JavaScript h3.nowrap Learn JavaScript
@ -78,15 +78,15 @@ block content
h2 Why you should join our community right now: h2 Why you should join our community right now:
h3.col-xs-offset-0.col-sm-offset-1 h3.col-xs-offset-0.col-sm-offset-1
ul.text-left ul.text-left
li.ion-code   We're thousands of professionals, all learning to code together li.ion-code   We're thousands of professionals. We all learn to code together.
li.ion-code   We're building projects for dozens of nonprofits li.ion-code   We're building projects for dozens of nonprofits.
li.ion-code   Our community is 100% free and open source li.ion-code   Our community is 100% free and open source.
li.ion-code   You'll learn Full Stack JavaScript and become a Software Engineer li.ion-code   You'll learn Full Stack JavaScript and become a Software Engineer.
li.ion-code   You'll work through our focused, interactive courses and tutorials li.ion-code   You'll work through our focused, interactive courses and tutorials.
li.ion-code   You'll learn to code at your own pace, in your browser or on your phone li.ion-code   You'll learn to code at your own pace, in your browser or on your phone.
li.ion-code   You'll become qualified for thousands of jobs currently going unfilled li.ion-code   You'll become qualified for thousands of jobs currently going unfilled.
li.ion-code   You can get help in real time from our community chat rooms li.ion-code   You can get help in real time from our community chat rooms.
li.ion-code   We all share one common goal: to boost our careers with code li.ion-code   We all share one common goal: to boost our careers with code.
.big-break .big-break
.row .row
.col-xs-12.col-sm-8.col-sm-offset-2 .col-xs-12.col-sm-8.col-sm-offset-2

View File

@ -26,6 +26,10 @@ h3.row
.col-xs-12 .col-xs-12
h4= description h4= description
.negative-5 .negative-5
if !user
a#upvote.btn.signup-btn.btn-xs(href='/signin') Sign in to reply or upvote
|  · 
else
a#reply-to-main-post.btn.btn-no-shadow.btn-primary.btn-xs.btn-primary-ghost Reply a#reply-to-main-post.btn.btn-no-shadow.btn-primary.btn-xs.btn-primary-ghost Reply
|  ·   |  ·  
if !hasUserVoted if !hasUserVoted
@ -56,10 +60,6 @@ script.
$('#image-display').removeClass('hidden-element') $('#image-display').removeClass('hidden-element')
} }
$('#reply-to-main-post').on('click', function() { $('#reply-to-main-post').on('click', function() {
if (!isLoggedIn) {
window.location.href = '/signin';
return;
}
$('#initial-comment-submit').removeClass('hidden-element'); $('#initial-comment-submit').removeClass('hidden-element');
$(this).unbind('click'); $(this).unbind('click');
$('.comment-to-comment-formgroup').empty(); $('.comment-to-comment-formgroup').empty();