diff --git a/controllers/challengeMap.js b/controllers/challengeMap.js
index 9c9eb36bac..210586f190 100644
--- a/controllers/challengeMap.js
+++ b/controllers/challengeMap.js
@@ -22,12 +22,11 @@ module.exports = {
var noDuplicatedChallenges = R.uniq(completedList);
-
- var challengeList = resources.getChallengeMapForDisplay();
var completedChallengeList = noDuplicatedChallenges
.map(function(challenge) {
return challenge._id;
});
+ var challengeList = resources.getChallengeMapForDisplay(completedChallengeList);
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
diff --git a/controllers/resources.js b/controllers/resources.js
index 28030eacf1..30bf362f5d 100644
--- a/controllers/resources.js
+++ b/controllers/resources.js
@@ -72,13 +72,14 @@ Array.zip = function(left, right, combinerFunction) {
module.exports = {
- getChallengeMapForDisplay: function() {
+ getChallengeMapForDisplay: function(completedChallengeList) {
if (!challengeMapForDisplay) {
challengeMapForDisplay = {};
Object.keys(challengeMap).forEach(function(key) {
challengeMapForDisplay[key] = {
name: challengeMap[key].name,
- challenges: challengeMap[key].challenges
+ challenges: challengeMap[key].challenges,
+ completedCount: challengeMap[key].challenges //ToDo count number of uncompleted challenges
}
});
}
diff --git a/public/css/main.less b/public/css/main.less
index 2a5cf1f433..dc43261bfa 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -218,6 +218,11 @@ ul {
margin-bottom: -45px;
}
+.negative-55 {
+ margin-top: -55px;
+ margin-bottom: -55px;
+}
+
.negative-10 {
margin-top: -10px;
}
@@ -906,10 +911,6 @@ iframe.iphone {
text-align: center;
}
-.control-label .control-label-story-submission {
- telt-align: left;
-}
-
.img-story-post {
max-width: 110px;
max-height: 110px;
diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json
index 12f5fce01f..7b85715f5b 100644
--- a/seed_data/challenges/basic-html5-and-css.json
+++ b/seed_data/challenges/basic-html5-and-css.json
@@ -398,13 +398,8 @@
"Classes are reusable styles that can be added to HTML elements.",
"Here's the anatomy of a CSS class:",
"",
-<<<<<<< HEAD
- "Here you can see that we've created a CSS class called \"blue-text\" within the
<style>
tag.",
- "You can apply a class to an HTML element like this: <h2 class=\"blue-text\">CatPhotoApp<h2>
",
-=======
"You can see that we've created a CSS class called \"blue-text\" within the <style>
tag.",
"You can apply a class to an HTML element like this: <h2 class=\"blue-text\">CatPhotoApp</h2>
",
->>>>>>> d403204a3133042b8b7828f29ba1932674e71a66
"Note that in your CSS style
element, classes should start with a period. In your HTML elements' class declarations, classes shouldn't start with a period.",
"Instead of creating a new style
element, try removing the h2
style declaration from your existing style element, then replace it with the class declaration for \".red-text\"."
],
@@ -1643,7 +1638,7 @@
"name": "Waypoint: Add a Submit Button to a Form",
"difficulty": 0.041,
"description": [
- "Add a submit button to your form field with type submit
and a test value of \"Submit\".",
+ "Add a submit button to your form
element with type \"submit\" and \"Submit\" as its text.",
"Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's action
attribute.",
"Here's an example submit button: <button type='submit'>this button submits the form</button>
"
],
@@ -1949,7 +1944,7 @@
"descriptionPt": []
},
{
- "_id": "bad87fee1348bd9aede08835",
+ "_id": "bad87fee1348bd9aede18835",
"name": "Waypoint: Clean up your form using Linebreaks",
"difficulty": 0.045,
"description": [
@@ -2110,6 +2105,177 @@
"namePt": "",
"descriptionPt": []
},
+ {
+ "_id": "bad87fee1348bd9aede08835",
+ "name": "Waypoint: Wrap Many Elements within a Div Element",
+ "difficulty": 0.047,
+ "description": [
+ "Wrap your \"Things cats love\" and \"Things cats hate\" lists all within a single div
element.",
+ "The div
element, or \"Division\" element, is a general purpose container for other elements.",
+ "The div
element is probably the most commonly used HTML element of all. It's useful for assigning classes down to all the elements that it contains.",
+ "Just like any other non-self-closing element, you can open a div
element with <div>
and close it on another line with </div>
.",
+ "Try putting your opening div
tag above your \"Things cats love\" p
element and your closing div
tag after your closing ol
tag so that both of your lists are within one div."
+ ],
+ "tests": [
+ "assert($('div').children('ol').length > 0, 'Wrap your ol
element inside your div
element.')",
+ "assert($('div').children('p').length > 1, 'Wrap your p
element inside your div
element.')",
+ "assert($('div').children('ul').length > 0, 'Wrap your ul
element inside your div
element.')"
+ ],
+ "challengeSeed": [
+ "",
+ "",
+ "",
+ "
Click here for cat photos.
", + "", + "Things cats love:
", + "Top 3 things cats hate:
", + "div
element.",
+ ""
+ ],
+ "tests": [
+ "assert($('div').children('ol').length > 0, 'Wrap your ol
element inside your div
element.')",
+ "assert($('div').children('p').length > 1, 'Wrap your p
element inside your div
element.')",
+ "assert($('div').children('ul').length > 0, 'Wrap your ul
element inside your div
element.')"
+ ],
+ "challengeSeed": [
+ "",
+ "",
+ "",
+ "Click here for cat photos.
", + "", + "Things cats love:
", + "Top 3 things cats hate:
", + "<div class=\"row\">
element, then each of them within a <div class=\"col-xs-4\">
element.",
+ "Put the \"Like\", \"Info\" and \"Delete\" buttons side-by-side by wrapping all three of them within one <div class=\"row\">
element, then each of them within a <div class=\"col-xs-4\">
element.",
"Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div
element.",
"Here's a diagram of how Bootstrap's 12-column grid layout works:",
"