Merge branch 'master' of github.com:FreeCodeCamp/freecodecamp
This commit is contained in:
43080
public/js/lib/codemirror/addon/emmet/emmet.js
vendored
Normal file
43080
public/js/lib/codemirror/addon/emmet/emmet.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,6 +16,14 @@ var editor = CodeMirror.fromTextArea(document.getElementById("codeEditor"), {
|
||||
onKeyEvent: doLinting
|
||||
});
|
||||
|
||||
var defaultKeymap = {
|
||||
'Cmd-E': 'emmet.expand_abbreviation',
|
||||
'Tab': 'emmet.expand_abbreviation_with_tab',
|
||||
'Enter': 'emmet.insert_formatted_line_break_only'
|
||||
};
|
||||
|
||||
emmetCodeMirror(editor, defaultKeymap);
|
||||
|
||||
|
||||
// Hijack tab key to insert two spaces instead
|
||||
editor.setOption("extraKeys", {
|
@ -509,8 +509,7 @@
|
||||
"Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.",
|
||||
"For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.",
|
||||
"The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.",
|
||||
"Another example, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.",
|
||||
"Lastly, ['Mary', 'Aarmy'] should return false because 'Mary' is only 4 letters while 'Aarmy' is 5, so 'Mary' can't possibly contain 'Aarmy'",
|
||||
"Lastly, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.",
|
||||
"Remember to use <a href='/field-guide/how-do-i-get-help-when-I-get-stuck' target='_blank'>RSAP</a> if you get stuck. Try to pair program. Write your own code."
|
||||
],
|
||||
"challengeSeed": [
|
||||
@ -525,7 +524,7 @@
|
||||
"expect(mutation(['hello', 'Hello'])).to.be.true;",
|
||||
"expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;",
|
||||
"expect(mutation(['Mary', 'Army'])).to.be.true;",
|
||||
"expect(mutation(['Mary', 'Aarmy'])).to.be.false;",
|
||||
"expect(mutation(['Mary', 'Aarmy'])).to.be.true;",
|
||||
"expect(mutation(['Alien', 'line'])).to.be.true;",
|
||||
"expect(mutation(['floor', 'for'])).to.be.true;"
|
||||
],
|
||||
|
@ -659,8 +659,8 @@
|
||||
"Now see if you can make sure the <code>h2</code> element is rendered in the color red without removing the \"blue-text\" class, doing an in-line styling, and without changing the sequence of CSS class declarations."
|
||||
],
|
||||
"tests": [
|
||||
"assert(new RegExp('.blue-text', 'gi').test(editor), 'Create the CSS class \"blue-text\"')",
|
||||
"assert(new RegExp('.urgently-red', 'gi').test(editor), 'Create the CSS class \"urgently-red\"')",
|
||||
"assert(new RegExp('\\.blue-text', 'gi').test(editor), 'Create the CSS class \"blue-text\"')",
|
||||
"assert(new RegExp('\\.urgently-red', 'gi').test(editor), 'Create the CSS class \"urgently-red\"')",
|
||||
"assert(new RegExp('red.?!important', 'gi').test(editor), 'Add the \"!important\" declaration!')",
|
||||
"assert($('h2').hasClass('blue-text'), 'Your h2 element should have the class \"blue-text\".')",
|
||||
"assert($('h2').hasClass('urgently-red'), 'Your h2 element should have the class \"urgently-red\".')",
|
||||
|
@ -18,7 +18,7 @@
|
||||
"Drag the windows around and press the buttons in the lower-right hand corner to change the orientation to suit your preference.",
|
||||
"Click the gear next to CSS. Then in the \"External CSS File or Another Pen\" text field, type \"bootstrap\" and scroll down until you see the latest version of Bootstrap. Click it.",
|
||||
"Verify that bootstrap is active by adding the following code to your HTML: <code><h1 class='text-primary'>Hello CodePen!</h1></code>. The text's color should be Bootstrap blue.",
|
||||
"Click the gear next the JavaScript. Click the \"Latest version of...\" select box and choose jQuery.",
|
||||
"Click the gear next to the JavaScript. Click the \"Latest version of...\" select box and choose jQuery.",
|
||||
"Now add the following code to your JavaScript: <code>$(document).ready(function() { $('.text-primary').text('Hi CodePen!') });</code>. Click the \"Save\" button at the top. Your \"Hello CodePen!\" should change to \"Hi CodePen!\". This means that jQuery is working.",
|
||||
"Now you're ready for your first Zipline. Click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair."
|
||||
],
|
||||
|
@ -18,6 +18,7 @@ block content
|
||||
script(src='/js/lib/codemirror/mode/xml/xml.js')
|
||||
script(src='/js/lib/codemirror/mode/css/css.js')
|
||||
script(src='/js/lib/codemirror/mode/htmlmixed/htmlmixed.js')
|
||||
script(src='/js/lib/codemirror/addon/emmet/emmet.js')
|
||||
.row.courseware-height
|
||||
.vertical-scroll
|
||||
.col-xs-12.col-sm-12.col-md-3.col-lg-3
|
||||
@ -94,4 +95,4 @@ block content
|
||||
span.completion-icon.ion-checkmark-circled.text-primary
|
||||
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
||||
include ../partials/challenge-modals
|
||||
script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.8.js")
|
||||
script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js")
|
||||
|
Reference in New Issue
Block a user