start refactoring challenge map

This commit is contained in:
Quincy Larson
2015-05-31 11:27:16 -07:00
parent 5380a9ea74
commit d1c4567790
2 changed files with 38 additions and 36 deletions

View File

@ -76,8 +76,13 @@ module.exports = {
if (!challengeMapForDisplay) { if (!challengeMapForDisplay) {
challengeMapForDisplay = {}; challengeMapForDisplay = {};
Object.keys(challengeMap).forEach(function(key) { Object.keys(challengeMap).forEach(function(key) {
//TODO get ratio of completed to uncompleted for each section
//challengeMap[key].challenges.forEach(function(challenge){
//
//}
challengeMapForDisplay[key] = { challengeMapForDisplay[key] = {
name: challengeMap[key].name, name: challengeMap[key].name,
dashedName: challengeMap[key].name.replace(/\s/g, '-'),
challenges: challengeMap[key].challenges, challenges: challengeMap[key].challenges,
completedCount: challengeMap[key].challenges //ToDo count number of uncompleted challenges completedCount: challengeMap[key].challenges //ToDo count number of uncompleted challenges
} }

View File

@ -19,8 +19,6 @@ block content
span.text-primary #{daysRunning}   span.text-primary #{daysRunning}  
| days ago. | days ago.
.spacer .spacer
.well
h2.text-center Curriculum Overview
.row .row
.col-xs-12.col-sm-8.col-sm-offset-2 .col-xs-12.col-sm-8.col-sm-offset-2
h3 800 Hours of Practice: h3 800 Hours of Practice:
@ -31,8 +29,7 @@ block content
span.negative-10 span.negative-10
.col-xs-12.col-sm-9.col-md-10 .col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10 li.large-p.negative-10
a(href='#' + challengeBlock.name)= challengeBlock.name a(href='#' + challengeBlock.dashedName)= challengeBlock.name
= challengeBlock.challenges.length
.row .row
.col-xs-12.col-sm-8.col-sm-offset-2.negative-28 .col-xs-12.col-sm-8.col-sm-offset-2.negative-28
@ -59,7 +56,7 @@ block content
for challengeBlock in challengeList for challengeBlock in challengeList
.row .row
a(href='#' name=challengeBlock.name) a(href='#' name=challengeBlock.dashedName)
.spacer.negative-55 .spacer.negative-55
.row .row