diff --git a/documentation/css/docs.css b/documentation/css/docs.css index 1e7f207e..b47c1ff5 100644 --- a/documentation/css/docs.css +++ b/documentation/css/docs.css @@ -4,9 +4,10 @@ body { color: #191933; font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif !important; } -div.container { +.container { width: 950px; - margin: 100px 0 50px 50px; + margin: 0; + padding: 80px 0px 50px 50px; } p, li { width: 625px; @@ -75,6 +76,7 @@ div.code { padding: 7px 0 10px 0; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0px 0px 7px #cacaca; + zoom: 1; } div.code button { position: absolute; @@ -107,11 +109,10 @@ div.code { height: 50px; min-width: 490px; left: 40px; right: 40px; top: 25px; - background: #ddd; padding-left: 235px; + background: #eee; background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#d0d0d0)); background: -moz-linear-gradient(top, #f5f5f5, #d0d0d0); - filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#F5F5F5', EndColorStr='#D0D0D0'); border: 1px solid #aaa; -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: 0 0 7px #aaa; -moz-box-shadow: 0 0 7px #aaa; @@ -126,7 +127,7 @@ div.code { #error { position: absolute; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; - right: 15px; top: 15px; left: 722px; + right: 15px; top: 15px; left: 730px; height: 15px; padding: 2px 5px; background: #fdcdcc; @@ -157,10 +158,9 @@ div.code { } .navigation:hover, .navigation.active { - background: #d0d0d0; + background: #eee; background: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#c0c0c0)); background: -moz-linear-gradient(top, #f0f0f0, #c0c0c0); - filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#F0F0F0', EndColorStr='#C0C0C0'); } .navigation .button { font-weight: bold; @@ -171,6 +171,8 @@ div.code { background: #fff; top: 51px; left: 0; padding: 5px 0; + margin-left: -1px; + border: 1px solid #aaa; border-top: 0; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0; -webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0; @@ -187,7 +189,7 @@ div.code { body.full_screen .navigation .contents.repl_wrapper { position: fixed; width: auto; height: auto; - left: 60px; top: 75px; right: 60px; bottom: 30px; + left: 60px; top: 77px; right: 60px; bottom: 30px; } .navigation .contents.repl_wrapper .code { -webkit-box-shadow: none; -moz-box-shadow: none; @@ -202,13 +204,19 @@ div.code { .navigation .code button { bottom: 10px; text-transform: none; + line-height: 14px; + left: auto; right: auto; } - .navigation .full_screen, .navigation .minimize { - right: auto; + .navigation .code .run { + width: 40px; + right: 10px; + } + .navigation .code .full_screen, .navigation .code .minimize { left: 10px; display: none; + width: 90px; } - body.minimized .full_screen, body.full_screen .minimize { + body.minimized .code .full_screen, body.full_screen .code .minimize { display: inline; } .navigation .contents a { @@ -246,7 +254,7 @@ div.code { } #repl_source { width: 96%; - height: 100%; + height: 250px; border: 0; resize: none; } @@ -265,6 +273,9 @@ div.code { margin-bottom: 0; top: 10px; left: 10px; right: 10px; bottom: 40px; } + body.full_screen #repl_source { + height: 100%; + } body.full_screen #repl_source_wrap { right: 50%; } diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 67d45de6..01e90c6d 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -71,7 +71,7 @@
Switch/When/Else - Switch statements in JavaScript are a bit awkward. You need to - remember to break at the end of every case statement to - avoid accidentally falling through to the default case. + Switch statements in JavaScript are a bit awkward. You need to + remember to break at the end of every case statement to + avoid accidentally falling through to the default case. CoffeeScript prevents accidental fall-through, and can convert the switch into a returnable, assignable expression. The format is: switch condition, when clauses, else the default case. @@ -808,7 +808,7 @@ coffee --print app/scripts/*.coffee > concatenation.js <%= code_for('cake_tasks') %>
If you need to invoke one task before another — for example, running - build before test, you can use the invoke function: + build before test, you can use the invoke function: invoke 'build'
@@ -922,12 +922,12 @@ coffee --print app/scripts/*.coffee > concatenation.js0.9.4 CoffeeScript now uses appropriately-named temporary variables, and recycles @@ -965,11 +965,11 @@ coffee --print app/scripts/*.coffee > concatenation.js single CoffeeScript object to global scope. Fixes for implicit object and block comment edge cases.
- +0.9.3 CoffeeScript switch statements now compile into JS switch - statements — they previously compiled into if/else chains + statements — they previously compiled into if/else chains for JavaScript 1.3 compatibility. Soaking a function invocation is now supported. Users of the RubyMine editor should now be able to use --watch mode. diff --git a/documentation/js/expressions.js b/documentation/js/expressions.js index 9dd8947d..6ea42bca 100644 --- a/documentation/js/expressions.js +++ b/documentation/js/expressions.js @@ -1,11 +1,5 @@ var eldest, grade; grade = function(student) { - if (student.excellentWork) { - return "A+"; - } else if (student.okayStuff) { - return student.triedHard ? "B" : "B-"; - } else { - return "C"; - } + return student.excellentWork ? "A+" : (student.okayStuff ? (student.triedHard ? "B" : "B-") : "C"); }; eldest = 24 > 21 ? "Liz" : "Ike"; \ No newline at end of file diff --git a/documentation/js/expressions_comprehension.js b/documentation/js/expressions_comprehension.js index fa850ce4..773e49cd 100644 --- a/documentation/js/expressions_comprehension.js +++ b/documentation/js/expressions_comprehension.js @@ -1,10 +1,9 @@ -var _i, _ref, _result, globals, name; +var _ref, _result, globals, name; var __hasProp = Object.prototype.hasOwnProperty; globals = (function() { _result = []; _ref = window; for (name in _ref) { if (!__hasProp.call(_ref, name)) continue; - _i = _ref[name]; _result.push(name); } return _result; diff --git a/documentation/js/strings.js b/documentation/js/strings.js index 5a47f391..cfdf5d55 100644 --- a/documentation/js/strings.js +++ b/documentation/js/strings.js @@ -1,7 +1,2 @@ var mobyDick; -mobyDick = "Call me Ishmael. Some years ago --\ - never mind how long precisely -- having little\ - or no money in my purse, and nothing particular\ - to interest me on shore, I thought I would sail\ - about a little and see the watery part of the\ - world..."; \ No newline at end of file +mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world..."; \ No newline at end of file diff --git a/documentation/js/while.js b/documentation/js/while.js index b88294fa..910b839e 100644 --- a/documentation/js/while.js +++ b/documentation/js/while.js @@ -11,8 +11,7 @@ num = 6; lyrics = (function() { _result = []; while (num -= 1) { - _result.push(num + " little monkeys, jumping on the bed.\ - One fell out and bumped his head."); + _result.push(num + " little monkeys, jumping on the bed. One fell out and bumped his head."); } return _result; })(); \ No newline at end of file diff --git a/index.html b/index.html index 69c7a1bf..0b05db07 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@
var eldest, grade; grade = function(student) { - if (student.excellentWork) { - return "A+"; - } else if (student.okayStuff) { - return student.triedHard ? "B" : "B-"; - } else { - return "C"; - } + return student.excellentWork ? "A+" : (student.okayStuff ? (student.triedHard ? "B" : "B-") : "C"); }; eldest = 24 > 21 ? "Liz" : "Ike";
@@ -1059,24 +1045,22 @@ six = (one = 1) + (two = 2) + (three = 3);;alert(six);'>run: six
# The first ten global properties. globals = (name for name of window)[0...10] -
var _i, _ref, _result, globals, name;
+
var _ref, _result, globals, name; var __hasProp = Object.prototype.hasOwnProperty; globals = (function() { _result = []; _ref = window; for (name in _ref) { if (!__hasProp.call(_ref, name)) continue; - _i = _ref[name]; _result.push(name); } return _result; })().slice(0, 10); -
Heredocs can be used to hold formatted or indentation-sensitive text
(or, if you just don't feel like escaping quotes and apostrophes). The
@@ -1716,7 +1690,7 @@ task('build:parser'build:parserRoast
- — a CoffeeScript compiler plug-in that allows you to include external
+ — a CoffeeScript compiler plug-in that allows you to include external
source files.
0.9.4
CoffeeScript now uses appropriately-named temporary variables, and recycles
@@ -1873,11 +1847,11 @@ task('build:parser0.9.3
CoffeeScript switch statements now compile into JS switch
- statements — they previously compiled into if/else chains
+ statements — they previously compiled into if/else chains
for JavaScript 1.3 compatibility.
Soaking a function invocation is now supported. Users of the RubyMine
editor should now be able to use --watch mode.