diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json index a4488b869621a5..e6dc2474c328d5 100644 --- a/seed/challenges/advanced-bonfires.json +++ b/seed/challenges/advanced-bonfires.json @@ -1,6 +1,7 @@ { "name": "Advanced Algorithm Scripting", "order": 15, + "time": "50h", "challenges": [ { "id": "aff0395860f5d3034dc0bfc9", diff --git a/seed/challenges/angularjs.json b/seed/challenges/angularjs.json index 92c85e751b319a..905c120f330453 100644 --- a/seed/challenges/angularjs.json +++ b/seed/challenges/angularjs.json @@ -1,6 +1,7 @@ { "name": "AngularJS", "order": 16, + "time": "5h", "challenges": [ { "id": "bd7154d8c441eddfaeb5bdef", diff --git a/seed/challenges/automated-testing-and-debugging.json b/seed/challenges/automated-testing-and-debugging.json index b5ab25c2f99e1d..0c7304045b7a96 100644 --- a/seed/challenges/automated-testing-and-debugging.json +++ b/seed/challenges/automated-testing-and-debugging.json @@ -1,6 +1,7 @@ { "name": "Automated Testing and Debugging", "order": 14, + "time": "15m", "challenges": [ { "id":"cf1111c1c16feddfaeb6bdef", diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json index b665d28622a232..627e95482f968a 100644 --- a/seed/challenges/basejumps.json +++ b/seed/challenges/basejumps.json @@ -1,6 +1,7 @@ { "name": "Full Stack JavaScript Projects", "order": 20, + "time": "300h", "challenges": [ { "id": "bd7158d8c443eddfaeb5bcef", diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 7567aaed31e9f0..9f442aa61522cb 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -1,6 +1,7 @@ { "name": "Basic Algorithm Scripting", "order": 8, + "time": "50h", "challenges": [ { "id": "ad7123c8c441eddfaeb5bdef", diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index f9caca1efe3a6d..7d88e724ce4715 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -1,6 +1,7 @@ { "name": "Basic JavaScript", "order": 6, + "time": "3h", "challenges": [ { "id":"bd7123c9c441eddfaeb4bdef", diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json index e2487d14efad89..4565f364a82287 100644 --- a/seed/challenges/basic-ziplines.json +++ b/seed/challenges/basic-ziplines.json @@ -1,6 +1,7 @@ { "name": "Basic Front End Development Projects", "order": 9, + "time": "100h", "challenges": [ { "id": "bd7158d8c442eddfbeb5bd1f", diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index 3982fe18d5a023..91e0e5e7766ca7 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/challenges/bootstrap.json @@ -1,6 +1,7 @@ { "name": "Responsive Design with Bootstrap", "order": 3, + "time": "2h", "challenges": [ { "id": "bad87fee1348bd9acde08712", diff --git a/seed/challenges/front-end-development-certificate.json b/seed/challenges/front-end-development-certificate.json index 65b98018c6cd17..4d6a83c40629dc 100644 --- a/seed/challenges/front-end-development-certificate.json +++ b/seed/challenges/front-end-development-certificate.json @@ -1,6 +1,7 @@ { "name": "Claim Your Front End Development Certificate", "order": 12, + "time": "5m", "challenges": [ { "id": "561add10cb82ac38a17513be", diff --git a/seed/challenges/full-stack-development-certificate.json b/seed/challenges/full-stack-development-certificate.json index d383fc5a0fb6ab..1d0cd929630546 100644 --- a/seed/challenges/full-stack-development-certificate.json +++ b/seed/challenges/full-stack-development-certificate.json @@ -1,6 +1,7 @@ { "name": "Claim Your Full Stack Development Certificate", "order": 21, + "time": "5m", "challenges": [ { "id": "660add10cb82ac38a17513be", diff --git a/seed/challenges/gear-up-for-success.json b/seed/challenges/gear-up-for-success.json index 00b6521bf62ff7..7a6fd0a670ef2e 100644 --- a/seed/challenges/gear-up-for-success.json +++ b/seed/challenges/gear-up-for-success.json @@ -1,6 +1,7 @@ { "name": "Gear up for Success", "order": 4, + "time": "10m", "challenges": [ { "id": "560add65cb82ac38a17513c2", diff --git a/seed/challenges/getting-started.json b/seed/challenges/getting-started.json index 5b32a65023a7dc..3513468561addf 100644 --- a/seed/challenges/getting-started.json +++ b/seed/challenges/getting-started.json @@ -1,6 +1,7 @@ { "name": "Get Started with Free Code Camp", "order": 1, + "time": "10m", "challenges": [ { "id": "560add10cb82ac38a17513be", diff --git a/seed/challenges/git.json b/seed/challenges/git.json index d3abf068ba1fed..8a642ab6158f57 100644 --- a/seed/challenges/git.json +++ b/seed/challenges/git.json @@ -1,6 +1,7 @@ { "name": "Git", "order" : 17, + "time": "3h", "challenges": [ { "id": "bd7353d8c341eddeaeb5bd0f", diff --git a/seed/challenges/hikes.json b/seed/challenges/hikes.json index 1f5d7f311371b2..0e9dbb56a4b608 100644 --- a/seed/challenges/hikes.json +++ b/seed/challenges/hikes.json @@ -1,6 +1,7 @@ { "name": "Hikes", "order": 0.050, + "time": "3h", "challenges": [ { "id": "bd7128d8c441eddfbeb5bddf", diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index 99a0753ad0e58c..d0ee9ee379befd 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -1,6 +1,7 @@ { "name": "HTML5 and CSS", "order": 2, + "time": "3h", "challenges": [ { "id": "bd7123c8c441eddfaeb5bdef", diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json index 810bf00cbff95e..d8b008208dba17 100644 --- a/seed/challenges/intermediate-bonfires.json +++ b/seed/challenges/intermediate-bonfires.json @@ -1,6 +1,7 @@ { "name": "Intermediate Algorithm Scripting", "order": 10, + "time": "50h", "challenges": [ { "id": "a3566b1109230028080c9345", diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json index 27680d73500691..fd3ea5b5e9eb6a 100644 --- a/seed/challenges/intermediate-ziplines.json +++ b/seed/challenges/intermediate-ziplines.json @@ -1,6 +1,7 @@ { "name": "Intermediate Front End Development Projects", "order": 11, + "time": "200h", "challenges": [ { "id": "bd7158d8c442eddfaeb5bd10", diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index 6aa103d38cf0ba..e220c99d29a3c0 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -1,6 +1,7 @@ { "name": "jQuery", "order": 5, + "time": "2h", "challenges": [ { "id": "bad87fee1348bd9acdd08826", diff --git a/seed/challenges/mongodb.json b/seed/challenges/mongodb.json index 437a4da2e6395e..0fe93ba6f930ee 100644 --- a/seed/challenges/mongodb.json +++ b/seed/challenges/mongodb.json @@ -1,6 +1,7 @@ { "name": "MongoDB", "order" : 19, + "time": "3h", "challenges": [ { "id": "bd7243d8c341eddeaeb5bd0f", diff --git a/seed/challenges/nodejs-and-expressjs.json b/seed/challenges/nodejs-and-expressjs.json index 6eb04629c00862..36b2231409a22c 100644 --- a/seed/challenges/nodejs-and-expressjs.json +++ b/seed/challenges/nodejs-and-expressjs.json @@ -1,6 +1,7 @@ { "name": "Node.js and Express.js", "order" : 18, + "time": "20h", "challenges": [ { "id": "bd7153d8c441eddfaeb5bd0f", diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index 7e890b52feb40b..8f1c7a8a1a2757 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -1,6 +1,7 @@ { "name": "Object Oriented and Functional Programming", "order": 7, + "time": "1h", "note": [ "Methods", "Closures", diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json index 42f3c6729325eb..79ee7df6c97f4d 100644 --- a/seed/challenges/upper-intermediate-bonfires.json +++ b/seed/challenges/upper-intermediate-bonfires.json @@ -1,6 +1,7 @@ { "name": "Upper Intermediate Algorithm Scripting", "order": 13, + "time": "50h", "challenges": [ { "id": "a2f1d72d9b908d0bd72bb9f6", diff --git a/seed/index.js b/seed/index.js index bd05f2de96cf02..464242c26e8336 100644 --- a/seed/index.js +++ b/seed/index.js @@ -68,6 +68,7 @@ Challenge.destroyAll(function(err, info) { challenge.suborder = index + 1; challenge.block = block; challenge.isBeta = challenge.isBeta || isBeta; + challenge.time = challengeSpec.time; return challenge; }); diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 400c32db33c5d3..13e05635896d2c 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -555,7 +555,8 @@ module.exports = function(app) { name: blockArray[0].block, dashedName: dasherize(blockArray[0].block), challenges: blockArray, - completed: completedCount / blockArray.length * 100 + completed: completedCount / blockArray.length * 100, + time: blockArray[0] && blockArray[0].time || "???" }; }) .filter(({ name }) => name !== 'Hikes') diff --git a/server/views/challengeMap/show.jade b/server/views/challengeMap/show.jade index db351b7af8bf62..14243dee9b0985 100644 --- a/server/views/challengeMap/show.jade +++ b/server/views/challengeMap/show.jade @@ -85,40 +85,44 @@ block content .spacer.negative-55 .row - .col-xs-12.col-sm-8.col-sm-offset-2 - h3 #{challengeBlock.name} - .row - .col-xs-12 - ol - for challenge in challengeBlock.challenges - if challenge.completed - .row - .hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.map-p.negative-10 - .col-xs-12.col-sm-9.col-md-10 - li.faded.map-p.negative-10 - a(href="/challenges/#{challenge.dashedName}") - span.capitalize= challenge.type + ': ' - span= challenge.title - span.sr-only= " Complete" + .hidden-xs.col-sm-3.col-md-2 + h3.text-primary.text-right.nowrap + i.fa.fa-clock-o  #{challengeBlock.time} + .col-xs-12.col-sm-9.col-md-10 + h3 #{challengeBlock.name}   - else - .row - .hidden-xs.col-sm-3.col-md-2 - span.negative-10 - .col-xs-12.col-sm-9.col-md-10 - li.map-p.negative-10 - a(href="/challenges/#{challenge.dashedName}") - span.capitalize= challenge.type + ': ' - span= challenge.title - span.sr-only= " Incomplete" + .row + ol + for challenge in challengeBlock.challenges + if challenge.completed + .row + .hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.map-p.negative-10 + .col-xs-12.col-sm-9.col-md-10 + li.faded.map-p.negative-10 + a(href="/challenges/#{challenge.dashedName}") + span.capitalize= challenge.type + ': ' + span= challenge.title + span.sr-only= " Complete" + - if (challengeBlock.completed === 100) - .button-spacer + else .row - .col-xs-12.col-sm-8.col-md-6.col-sm-offset-3.col-md-offset-2.hidden - a.btn.btn-lg.btn-block.signup-btn.map-challenge-block-share Section complete. Share your Portfolio with your friends. - .hidden(id="#{challengeBlock.name}") + .hidden-xs.col-sm-3.col-md-2 + span.negative-10 + .col-xs-12.col-sm-9.col-md-10 + li.map-p.negative-10 + a(href="/challenges/#{challenge.dashedName}") + span.capitalize= challenge.type + ': ' + span= challenge.title + span.sr-only= " Incomplete" + + if (challengeBlock.completed === 100) + .button-spacer + .row + .col-xs-12.col-sm-8.col-md-6.col-sm-offset-3.col-md-offset-2.hidden + a.btn.btn-lg.btn-block.signup-btn.map-challenge-block-share Section complete. Share your Portfolio with your friends. + .hidden(id="#{challengeBlock.name}") script. var username = !{JSON.stringify(user && user.username || '')}; var lastCompleted = !{JSON.stringify(lastCompleted || false)}