fix trello integration and make minor changes to courseware.json
This commit is contained in:
@ -123,7 +123,7 @@ module.exports = {
|
||||
var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24));
|
||||
client.get('https://trello.com/1/boards/BA3xVpz9/cards?key=' + secrets.trello.key, function(trello, res2) {
|
||||
client.get('https://www.googleapis.com/blogger/v3/blogs/2421288658305323950/posts?key=' + secrets.blogger.key, function(blogger, res3) {
|
||||
var nonprofitProjects = trello.length || 15;
|
||||
var nonprofitProjects = (JSON.parse(trello)).length || 27;
|
||||
var blog = JSON.parse(blogger);
|
||||
User.count({'points': {'$gt': 2}}, function (err, c3) {
|
||||
if (err) {
|
||||
|
@ -9,13 +9,14 @@
|
||||
"You can edit <code>code</code> in the <code>text editor</code> we've embedded into this web page.",
|
||||
"Do you see the code in the text editor that says <code><h1>hello</h1></code>? That's an HTML <code>element</code>.",
|
||||
"Most HTML elements have an <code>opening tag</code> and a <code>closing tag</code>. Opening tags look like this: <code><h1></code>. Closing tags look like this: <code></h1></code>. Note that the only difference between opening and closing tags is that closing tags have a slash after their opening angle bracket.",
|
||||
"To advance to the next exercise, change the h1 tag's text to say \"hello world\" instead of \"hello\"."
|
||||
"Once you've completed the challenge, the \"Go to my next challenge\" button will become enabled. Click it - or press control and enter at the same time - to advance to the next challenge.",
|
||||
"To enable the \"Go to my next challenge\" button on this exercise, change the <code>h1</code> tag's text to say \"Hello World\" instead of \"Hello\"."
|
||||
],
|
||||
"tests": [
|
||||
"expect((/hello(\\s)+world/gi).test($('h1').text())).to.be.true;"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<h1>hello</h1>"
|
||||
"<h1>Hello</h1>"
|
||||
],
|
||||
"challengeType": 0,
|
||||
"completionMessage": ""
|
||||
@ -26,10 +27,10 @@
|
||||
"name": "Use the h2 Element",
|
||||
"difficulty" : "0.01",
|
||||
"description": [
|
||||
"Add an h2 tag that says \"cat photo app\" to create a second HTML element below the \"hello world\" h1 element.",
|
||||
"Add an <code>h2</code> tag that says \"cat photo app\" to make a second HTML <code>element</code> below the \"hello world\" <code>h1</code> element.",
|
||||
"The h2 element you enter will create an h2 element on the website.",
|
||||
"This element tells the browser how to render the text that it contains.",
|
||||
"h2 elements are slightly smaller than h1 elements. There are also an h3, h4, h5 and h6 elements."
|
||||
"<code>h2</code> elements are slightly smaller than <code>h1</code> elements. There are also <code>h3</code>, <code>h4</code>, <code>h5</code> and <code>h6</code> elements."
|
||||
],
|
||||
"tests": [
|
||||
"expect((/hello(\\s)+world/gi).test($('h1').text())).to.be.true;",
|
||||
@ -47,8 +48,8 @@
|
||||
"name": "Use the P Element",
|
||||
"difficulty" : "0.02",
|
||||
"description": [
|
||||
"Create a p - or paragraph - element below the h2 element, and give it the text \"hello paragraph\".",
|
||||
"P elements are the preferred element for normal-sized paragraph text on websites.",
|
||||
"Create a <code>p</code> element below the h2 element, and give it the text \"hello paragraph\".",
|
||||
"<code>p</code> elements are the preferred element for normal-sized paragraph text on websites.",
|
||||
"You can create a p element like so: <code><p>I'm a p tag!</p></code>"
|
||||
],
|
||||
"tests": [
|
||||
@ -88,7 +89,7 @@
|
||||
"name": "Uncomment HTML",
|
||||
"difficulty" : "0.04",
|
||||
"description": [
|
||||
"Uncomment the h1, h2 and p elements.",
|
||||
"Uncomment the <code>h1</code>, <code>h2</code> and <code>p</code> elements.",
|
||||
"Commenting is a way that you can leave comments within your code without affecting the code itself.",
|
||||
"Commenting is also a convenient way to make code inactive without having to delete it entirely.",
|
||||
"You can start a comment with <code><!--</code> and end a comment with <code>--></code>."
|
||||
@ -113,7 +114,7 @@
|
||||
"name": "Comment out HTML",
|
||||
"difficulty" : "0.05",
|
||||
"description": [
|
||||
"Comment out the h1 element and the p element, but leave the h2 element uncommented.",
|
||||
"Comment out the <code>h1</code> element and the <code>p</code> element, but leave the <code>h2</code> element uncommented.",
|
||||
"Remember that in order to start a comment, you need to use <code><!--</code> and to end a comment, you need to use <code>--></code>.",
|
||||
"Here you'll need to end the comment before the h2 element begins."
|
||||
],
|
||||
@ -139,10 +140,10 @@
|
||||
"name": "Use Lorem Ipsum Text as a Placeholder",
|
||||
"difficulty" : "0.06",
|
||||
"description": [
|
||||
"Change the text in the p element to use the first few words of lorem ipsum text.",
|
||||
"Change the text in the <code>p</code> element to use the first few words of <code>lorem ipsum</code> text.",
|
||||
"Designers use <code>lorem ipsum</code> as placeholder text. It's called lorem ipsum text because it's those are the first two words of a passage by Cicero of Ancient Rome.",
|
||||
"Lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web.",
|
||||
"Here are the first 25 words of lorem ipsum text: \"lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\""
|
||||
"Here are the first 25 words of lorem ipsum text, which you can copy and paste into the right position: \"lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\""
|
||||
],
|
||||
"tests": [
|
||||
"expect((/Lorem(\\s)+ipsum(\\s)+dolor/gi).test($('p').text())).to.be.true;"
|
||||
@ -161,10 +162,10 @@
|
||||
"name": "Change the Color of Text",
|
||||
"difficulty" : "0.07",
|
||||
"description": [
|
||||
"Change the h2 element's style so that its text color is red.",
|
||||
"We can do this by changing the <code>style</code> of the h2 element.",
|
||||
"Change the <code>h2</code> element's style so that its text color is red.",
|
||||
"We can do this by changing the <code>style</code> of the <code>h2</code> element.",
|
||||
"The style responsible for the color of an element's text is the \"color\" style.",
|
||||
"Here's how you would set the h2 element's text color to blue: <code><h2 style=\"color: blue\">cat photo app<h2></code>"
|
||||
"Here's how you would set the <code>h2</code> element's text color to blue: <code><h2 style=\"color: blue\">cat photo app<h2></code>"
|
||||
],
|
||||
"tests": [
|
||||
"expect($('h2')).to.have.css('color', 'rgb(255, 0, 0)');"
|
||||
@ -183,12 +184,12 @@
|
||||
"name": "Create a Style Tag for CSS",
|
||||
"difficulty" : "0.08",
|
||||
"description": [
|
||||
"Create a style tag and write the CSS to make all h2 elements blue.",
|
||||
"Create a style tag and write the CSS to make all <code>h2</code> elements blue.",
|
||||
"With CSS, there are hundreds of <code>CSS attributes</code> that you can use to change the way an element looks on a web page.",
|
||||
"When you entered <code><h2 style=\"color: red\">hello html<h2></code>, you were giving that individual h2 element an <code>inline style</code>",
|
||||
"That's one way to add style to an element, but a better way is by using <code>Cascading Style Sheets (CSS)</code>.",
|
||||
"At the top of your code, create a <code>style tag</code> like this: <code><style></style></code>",
|
||||
"Inside that style element, you can create a <code>global style</code> for all h2 elements. For example, if you wanted all h2 elements to be red, your style element would look like this: <code><style>h2: {color: red;}</style></code>",
|
||||
"Inside that style element, you can create a <code>global style</code> for all <code>h2</code> elements. For example, if you wanted all <code>h2</code> elements to be red, your style element would look like this: <code><style>h2: {color: red;}</style></code>",
|
||||
"Note that it's important to have an <code>opening and closing curly braces</code> (<code>{</code> and <code>}</code>) around each element's style. You also need to make sure your element's style is between the opening and closing style tags. Finally, be sure to add the semicolon to the end of each of the element's styles."
|
||||
],
|
||||
"tests": [
|
||||
@ -208,7 +209,7 @@
|
||||
"name": "Use a CSS Class to Style an Element",
|
||||
"difficulty" : "0.09",
|
||||
"description": [
|
||||
"Create a CSS class called \"red-text\" and apply it to the h2 element.",
|
||||
"Create a CSS class called <code>.red-text</code> and apply it to the <code>h2</code> element.",
|
||||
"Classes are reusable styles that can be added to HTML elements.",
|
||||
"Classes always start with a period. You can see that we've created a CSS class called <code>.blue-text</code> within the <code><style></code> tag.",
|
||||
"You can follow that pattern to make a <code>.red-text</code> class, which you can attach to HTML elements by using the <code>class=\"class\"</code> within the relevant element's opening tag."
|
||||
@ -236,7 +237,7 @@
|
||||
"name": "Use a CSS Class to Style Multiple Elements",
|
||||
"difficulty" : "0.10",
|
||||
"description": [
|
||||
"Apply the \"red-text\" class to the h1, h2 and p elements.",
|
||||
"Apply the \"red-text\" class to the <code>h1</code>, <code>h2</code> and <code>p</code> elements.",
|
||||
"Remember that you can attach classes to HTML elements by using the <code>class=\"class\"</code> within the relevant element's opening tag."
|
||||
],
|
||||
"tests": [
|
||||
@ -266,7 +267,7 @@
|
||||
"name": "Change the Font Size of an Element",
|
||||
"difficulty" : "0.11",
|
||||
"description": [
|
||||
"Set the font size of all p elements to 16 pixels",
|
||||
"Set the font size of all <code>p</code> elements to 16 pixels",
|
||||
"Font size is controlled by the <code>font-size</code> CSS attribute.",
|
||||
"We've already set the font-size attribute for all h2 elements. See if you can figure out how to give all p elements the font-size of 16 pixels (<code>16px</code>). You can do this inside the same <code><style></code> tag that we created for h1."
|
||||
],
|
||||
|
Reference in New Issue
Block a user