From db6fcf7de62f43707a896b0577683f6f9f1b734a Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 31 May 2015 12:32:09 -0700 Subject: [PATCH] add div and background color challenges --- seed_data/challenges/basic-html5-and-css.json | 37 ++++++++++--------- views/challengeMap/show.jade | 1 + 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index faa282b06eb..a7d7c835c05 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -2119,7 +2119,8 @@ "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.')" + "assert($('div').children('ul').length > 0, 'Wrap your ul element inside your div element.')", + "assert(editor.match(/<\\/div>/g), 'Be sure that your div element has a closing tag.')" ], "challengeSeed": [ "", @@ -2198,12 +2199,12 @@ "difficulty": 0.048, "description": [ "Create a class called \"gray-background\" with the background color of gray. Assign this class to your div element.", - "" + "You can set an element's background color with the \"background-color\" attribute.", + "For example, if you wanted an element's background color to be \"green\", you'd use .green-background { background-color: green; }." ], "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.')" + "assert($('div').hasClass('gray-background'), 'Give your div element the class \"gray-background\".')", + "assert($('.gray-background').css('background-color') === 'rgb(128, 128, 128)', 'Your div element should have a gray background.')" ], "challengeSeed": [ "", @@ -2239,18 +2240,20 @@ "", "", "", - "

Things cats love:

", - "", - "

Top 3 things cats hate:

", - "
    ", - "
  1. flea treatment
  2. ", - "
  3. thunder
  4. ", - "
  5. other cats
  6. ", - "
", + "
", + "

Things cats love:

", + " ", + "

Top 3 things cats hate:

", + "
    ", + "
  1. flea treatment
  2. ", + "
  3. thunder
  4. ", + "
  5. other cats
  6. ", + "
", + "
", "", "
", " ", diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade index ff326cec67a..a780b2030c0 100644 --- a/views/challengeMap/show.jade +++ b/views/challengeMap/show.jade @@ -53,6 +53,7 @@ block content .hidden-xs.col-sm-3.col-md-2.ion-locked.padded-ionic-icon.text-center.large-p.negative-10 .col-xs-12.col-sm-9.col-md-10 li.large-p.negative-10 300-hour Nonprofit Project + hr for challengeBlock in challengeList .row