Merge pull request #7771 from FreeCodeCamp/staging

Release staging
This commit is contained in:
Berkeley Martinez
2016-03-28 08:01:15 -07:00
10 changed files with 110 additions and 26 deletions

View File

@ -37,6 +37,56 @@ window.common = (function(global) {
/> />
<style> <style>
body { padding: 0px 3px 0px 3px; } body { padding: 0px 3px 0px 3px; }
/* FORM RESET: */
textarea,
select,
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-background-clip: padding;
-moz-background-clip: padding;
background-clip:padding-box;
-webkit-border-radius:0;
-moz-border-radius:0;
-ms-border-radius:0;
-o-border-radius:0;
border-radius:0;
-webkit-appearance:none;
background-color:#fff;
color:#000;
outline:0;
margin:0;
padding:0;
text-align: left;
font-size:1em;
height: 1.8em;
vertical-align: middle;
}
select, select, select {
background:#fff
url('data:image/png;base64,\
R0lGODlhDQAEAIAAAAAAAP8A/yH5BAEHAAEAL\
AAAAAANAAQAAAILhA+hG5jMDpxvhgIAOw==');
background-repeat: no-repeat;
background-position: 97% center;
padding:0 25px 0 8px;
font-size: .875em;
}
// ! FORM RESET
</style> </style>
`; `;
const codeDisabledError = ` const codeDisabledError = `

View File

@ -79,6 +79,9 @@ var links = {
"Array.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice", "Array.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice",
"Array.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString", "Array.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString",
// ======== STATEMENTS AND DECLARATIONS
"Switch Statement": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch",
// ======== MATH METHODS // ======== MATH METHODS
"Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max", "Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max",
"Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min", "Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min",

View File

@ -644,31 +644,31 @@
"title": "Where do I belong", "title": "Where do I belong",
"description": [ "description": [
"Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted.", "Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted.",
"For example, <code>where([1,2,3,4], 1.5)</code> should return <code>1</code> because it is greater than <code>1</code> (index 0), but less than <code>2</code> (index 1).", "For example, <code>getIndexToIns([1,2,3,4], 1.5)</code> should return <code>1</code> because it is greater than <code>1</code> (index 0), but less than <code>2</code> (index 1).",
"Likewise, <code>where([20,3,5], 19)</code> should return <code>2</code> because once the array has been sorted it will look like <code>[3,5,20]</code> and <code>19</code> is less than <code>20</code> (index 2) and greater than <code>5</code> (index 1).", "Likewise, <code>getIndexToIns([20,3,5], 19)</code> should return <code>2</code> because once the array has been sorted it will look like <code>[3,5,20]</code> and <code>19</code> is less than <code>20</code> (index 2) and greater than <code>5</code> (index 1).",
"Remember to use <a href=\"//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck\" target=\"_blank\">Read-Search-Ask</a> if you get stuck. Write your own code." "Remember to use <a href=\"//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck\" target=\"_blank\">Read-Search-Ask</a> if you get stuck. Write your own code."
], ],
"challengeSeed": [ "challengeSeed": [
"function where(arr, num) {", "function getIndexToIns(arr, num) {",
" // Find my place in this sorted array.", " // Find my place in this sorted array.",
" return num;", " return num;",
"}", "}",
"", "",
"where([40, 60], 50);" "getIndexToIns([40, 60], 50);"
], ],
"tests": [ "tests": [
"assert(where([10, 20, 30, 40, 50], 35) === 3, 'message: <code>where([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.');", "assert(getIndexToIns([10, 20, 30, 40, 50], 35) === 3, 'message: <code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.');",
"assert(where([10, 20, 30, 40, 50], 30) === 2, 'message: <code>where([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.');", "assert(getIndexToIns([10, 20, 30, 40, 50], 30) === 2, 'message: <code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.');",
"assert(where([40, 60], 50) === 1, 'message: <code>where([40, 60], 50)</code> should return <code>1</code>.');", "assert(getIndexToIns([40, 60], 50) === 1, 'message: <code>getIndexToIns([40, 60], 50)</code> should return <code>1</code>.');",
"assert(where([3, 10, 5], 3) === 0, 'message: <code>where([3, 10, 5], 3)</code> should return <code>0</code>.');", "assert(getIndexToIns([3, 10, 5], 3) === 0, 'message: <code>getIndexToIns([3, 10, 5], 3)</code> should return <code>0</code>.');",
"assert(where([5, 3, 20, 3], 5) === 2, 'message: <code>where([5, 3, 20, 3], 5)</code> should return <code>2</code>.');", "assert(getIndexToIns([5, 3, 20, 3], 5) === 2, 'message: <code>getIndexToIns([5, 3, 20, 3], 5)</code> should return <code>2</code>.');",
"assert(where([2, 20, 10], 19) === 2, 'message: <code>where([2, 20, 10], 19)</code> should return <code>2</code>.');", "assert(getIndexToIns([2, 20, 10], 19) === 2, 'message: <code>getIndexToIns([2, 20, 10], 19)</code> should return <code>2</code>.');",
"assert(where([2, 5, 10], 15) === 3, 'message: <code>where([2, 5, 10], 15)</code> should return <code>3</code>.');" "assert(getIndexToIns([2, 5, 10], 15) === 3, 'message: <code>getIndexToIns([2, 5, 10], 15)</code> should return <code>3</code>.');"
], ],
"type": "bonfire", "type": "bonfire",
"isRequired": true, "isRequired": true,
"solutions": [ "solutions": [
"function where(arr, num) {\n arr = arr.sort(function(a, b){return a-b;});\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] >= num)\n {\n return i;\n }\n }\n return arr.length;\n}" "function getIndexToIns(arr, num) {\n arr = arr.sort(function(a, b){return a-b;});\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] >= num)\n {\n return i;\n }\n }\n return arr.length;\n}"
], ],
"MDNlinks": [ "MDNlinks": [
"Array.sort()" "Array.sort()"

View File

@ -651,7 +651,7 @@
}, },
{ {
"id": "56533eb9ac21ba0edf2244af", "id": "56533eb9ac21ba0edf2244af",
"title": "Compound Assignment With +=", "title": "Compound Assignment With Augmented Addition",
"description": [ "description": [
"In programming, it is common to use assignments to modify the contents of a variable. Remember that everything to the right of the equals sign is evaluated first, so we can say:", "In programming, it is common to use assignments to modify the contents of a variable. Remember that everything to the right of the equals sign is evaluated first, so we can say:",
"<code>myVar = myVar + 5;</code>", "<code>myVar = myVar + 5;</code>",
@ -702,7 +702,7 @@
}, },
{ {
"id": "56533eb9ac21ba0edf2244b0", "id": "56533eb9ac21ba0edf2244b0",
"title": "Compound Assignment With -=", "title": "Compound Assignment With Augmented Subtraction",
"description": [ "description": [
"Like the <code>+=</code> operator, <code>-=</code> subtracts a number from a variable.", "Like the <code>+=</code> operator, <code>-=</code> subtracts a number from a variable.",
"<code>myVar = myVar - 5;</code>", "<code>myVar = myVar - 5;</code>",
@ -752,7 +752,7 @@
}, },
{ {
"id": "56533eb9ac21ba0edf2244b1", "id": "56533eb9ac21ba0edf2244b1",
"title": "Compound Assignment With *=", "title": "Compound Assignment With Augmented Multiplication",
"description": [ "description": [
"The <code>*=</code> operator multiplies a variable by a number.", "The <code>*=</code> operator multiplies a variable by a number.",
"<code>myVar = myVar * 5;</code>", "<code>myVar = myVar * 5;</code>",
@ -802,7 +802,7 @@
}, },
{ {
"id": "56533eb9ac21ba0edf2244b2", "id": "56533eb9ac21ba0edf2244b2",
"title": "Compound Assignment With /=", "title": "Compound Assignment With Augmented Division",
"description": [ "description": [
"The <code>/=</code> operator divides a variable by another number.", "The <code>/=</code> operator divides a variable by another number.",
"<code>myVar = myVar / 5;</code>", "<code>myVar = myVar / 5;</code>",
@ -3446,6 +3446,9 @@
"solutions": [ "solutions": [
"function myTest(val) {\n var answer = \"\";\n\n switch (val) {\n case 1:\n answer = \"alpha\";\n break;\n case 2:\n answer = \"beta\";\n break;\n case 3:\n answer = \"gamma\";\n break;\n case 4:\n answer = \"delta\";\n }\n return answer; \n}" "function myTest(val) {\n var answer = \"\";\n\n switch (val) {\n case 1:\n answer = \"alpha\";\n break;\n case 2:\n answer = \"beta\";\n break;\n case 3:\n answer = \"gamma\";\n break;\n case 4:\n answer = \"delta\";\n }\n return answer; \n}"
], ],
"MDNlinks": [
"Switch Statement"
],
"tests": [ "tests": [
"assert(myTest(1) === \"alpha\", 'message: <code>myTest(1) should have a value of \"alpha\"');", "assert(myTest(1) === \"alpha\", 'message: <code>myTest(1) should have a value of \"alpha\"');",
"assert(myTest(2) === \"beta\", 'message: <code>myTest(2) should have a value of \"beta\"');", "assert(myTest(2) === \"beta\", 'message: <code>myTest(2) should have a value of \"beta\"');",

View File

@ -17,7 +17,7 @@
"To get started, we should nest all of our HTML in a <code>div</code> element with the class <code>container-fluid</code>." "To get started, we should nest all of our HTML in a <code>div</code> element with the class <code>container-fluid</code>."
], ],
"challengeSeed": [ "challengeSeed": [
"<link href=\"http://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">", "<link href=\"https://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">",
"<style>", "<style>",
" .red-text {", " .red-text {",
" color: red;", " color: red;",

View File

@ -684,7 +684,8 @@
"id": "a5deed1811a43193f9f1c841", "id": "a5deed1811a43193f9f1c841",
"title": "Drop it", "title": "Drop it",
"description": [ "description": [
"Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns <code>true</code>.",
"The second argument, <code>func</code>, is a function you'll use to test the first elements of the array to decide if you should drop it or not.",
"Return the rest of the array, otherwise return an empty array.", "Return the rest of the array, otherwise return an empty array.",
"Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code." "Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code."
], ],

View File

@ -342,7 +342,7 @@
"assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?button\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\"button\"&#41</code> selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?button\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\"button\"&#41</code> selector.');",
"assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?\\.btn\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\".btn\"&#41</code> selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?\\.btn\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\".btn\"&#41</code> selector.');",
"assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\"#target1\"&#41</code> selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")/gi), 'message: Use the <code>$&#40\"#target1\"&#41</code> selector.');",
"assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")[\\w-]+\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');", "assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")\\s*?[\\w-]+\\s*?\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');",
"assert($(\"#target1\").hasClass(\"animated\") && $(\"#target1\").hasClass(\"shake\") && $(\"#target1\").hasClass(\"btn-primary\"), 'message: Your <code>#target1</code> element should have the classes <code>animated</code>&#130; <code>shake</code> and <code>btn-primary</code>.');", "assert($(\"#target1\").hasClass(\"animated\") && $(\"#target1\").hasClass(\"shake\") && $(\"#target1\").hasClass(\"btn-primary\"), 'message: Your <code>#target1</code> element should have the classes <code>animated</code>&#130; <code>shake</code> and <code>btn-primary</code>.');",
"assert(!code.match(/class.*animated/g), 'message: Only use jQuery to add these classes to the element.');" "assert(!code.match(/class.*animated/g), 'message: Only use jQuery to add these classes to the element.');"
], ],

View File

@ -118,7 +118,34 @@
"" ""
] ]
], ],
"titleEs": "Reclama tu certificado de Visualización de datos" "titleEs": "Reclama tu certificado de Visualización de datos",
"descriptionFr": [
[
"//i.imgur.com/Et3iD74.jpg",
"Une image de note Certificat de Visualisation de données",
"Ce défi vous permettra davoir votre Certificat de Visualisation de données vérifiée. Avant de vous donner votre certificat, il faut sassurer que vous avez bien accomplie tous les projets de React et D3.js et il faut que vous acceptiez notre Academic Honesty Pledge. Cliquez sur le bouton si dessous pour démarrer le processus.",
""
],
[
"//i.imgur.com/HArFfMN.jpg",
"Une définition du plagiat : Plagiat (nom) copier le travail dun autre et le présenter comme étant le tien, sans mention de lauteur original",
"En cliquant si dessous, je garantie que tout le code que jai présenté A) est mon propre code ou celui de mon collaborateur, B) vient dun projet open-source comme jQuery, ou C) contient les mentions nécessaires des auteurs. Vous nous donnez aussi la permission de vérifier vos solutions et de révoquer votre certificat en cas de détection de plagiat.",
"#"
],
[
"//i.imgur.com/14F2Van.jpg",
"Une image du texte \"Data Visualization Certificate requirements\"",
"On va confirmer maintenant que vous avez bien terminé nos projets de React et D3.js. Cliquez sur le bouton si dessous pour vérifier cela.",
"#"
],
[
"//i.imgur.com/16SIhHO.jpg",
"Une image du mot \"Congratulations\"",
"Félicitations! On vient dajouter votre Certificat de Visualisation de données à votre profile. Cette certificat est public et vérifiable, mais vous pouvez le cacher si vous désirer.",
""
]
],
"titleFr":"Réclamer votre Certificat de Visualisation de données"
} }
] ]
} }

View File

@ -29,12 +29,6 @@ block content
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google') a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
i.fa.fa-google-plus i.fa.fa-google-plus
| Add my Google+ to my portfolio | Add my Google+ to my portfolio
.col-xs-12
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/logout')
| Sign me out of Free Code Camp
.col-xs-12
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com')
| Email us at team@freecodecamp.com
.spacer .spacer
h2.text-center Account Settings h2.text-center Account Settings
.row .row

View File

@ -12,6 +12,12 @@ block content
.col-xs-12 .col-xs-12
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/settings') a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/settings')
| Update your settings | Update your settings
.col-xs-12
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/logout')
| Sign me out of Free Code Camp
.col-xs-12
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com')
| Email us at team@freecodecamp.com
.spacer .spacer
h1.text-center #{username}'s code portfolio h1.text-center #{username}'s code portfolio
hr hr