mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
rebuilt the site with some IE fixes.
This commit is contained in:
parent
3c848736a7
commit
e3ec325619
7 changed files with 55 additions and 83 deletions
|
@ -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;
|
||||
}
|
||||
|
@ -264,6 +272,9 @@ div.code {
|
|||
position: absolute;
|
||||
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%;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
<div class="contents repl_wrapper">
|
||||
<div class="code">
|
||||
<div id="repl_source_wrap"><textarea id="repl_source">alert "Hello CoffeeScript!"</textarea></div>
|
||||
<div id="repl_source_wrap"><textarea id="repl_source" rows="100">alert "Hello CoffeeScript!"</textarea></div>
|
||||
<pre id="repl_results"></pre>
|
||||
<button class="full_screen">go full screen</button>
|
||||
<button class="minimize">minimize</button>
|
||||
|
|
|
@ -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";
|
|
@ -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;
|
||||
|
|
|
@ -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...";
|
||||
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...";
|
|
@ -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;
|
||||
})();
|
44
index.html
44
index.html
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
<div class="contents repl_wrapper">
|
||||
<div class="code">
|
||||
<div id="repl_source_wrap"><textarea id="repl_source">alert "Hello CoffeeScript!"</textarea></div>
|
||||
<div id="repl_source_wrap"><textarea id="repl_source" rows="100">alert "Hello CoffeeScript!"</textarea></div>
|
||||
<pre id="repl_results"></pre>
|
||||
<button class="full_screen">go full screen</button>
|
||||
<button class="minimize">minimize</button>
|
||||
|
@ -785,8 +785,7 @@ num <span class="Keyword">=</span> <span class="Number">6</span>;
|
|||
lyrics <span class="Keyword">=</span> (<span class="Storage">function</span>() {
|
||||
_result <span class="Keyword">=</span> [];
|
||||
<span class="Keyword">while</span> (num <span class="Keyword">-</span><span class="Keyword">=</span> <span class="Number">1</span>) {
|
||||
_result.<span class="LibraryFunction">push</span>(num <span class="Keyword">+</span> <span class="String"><span class="String">"</span> little monkeys, jumping on the bed.\</span>
|
||||
<span class="String"> One fell out and bumped his head.<span class="String">"</span></span>);
|
||||
_result.<span class="LibraryFunction">push</span>(num <span class="Keyword">+</span> <span class="String"><span class="String">"</span> little monkeys, jumping on the bed. One fell out and bumped his head.<span class="String">"</span></span>);
|
||||
}
|
||||
<span class="Keyword">return</span> _result;
|
||||
})();
|
||||
|
@ -803,8 +802,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;
|
||||
})();;alert(lyrics.join("\n"));'>run: lyrics.join("\n")</button><br class='clear' /></div>
|
||||
|
@ -1016,24 +1014,12 @@ numbers.splice.apply(numbers, [3, 6 - 3 + 1].concat([-3, -4, -5, -6]));;alert(nu
|
|||
eldest <span class="Keyword">=</span> <span class="Keyword">if</span> <span class="Number">24</span> <span class="Keyword">></span> <span class="Number">21</span> <span class="Keyword">then</span> <span class="String"><span class="String">"</span>Liz<span class="String">"</span></span> <span class="Keyword">else</span> <span class="String"><span class="String">"</span>Ike<span class="String">"</span></span>
|
||||
</pre><pre class="idle"><span class="Storage">var</span> eldest, grade;
|
||||
<span class="FunctionName">grade</span> = <span class="Storage">function</span>(<span class="FunctionArgument">student</span>) {
|
||||
<span class="Keyword">if</span> (student.excellentWork) {
|
||||
<span class="Keyword">return</span> <span class="String"><span class="String">"</span>A+<span class="String">"</span></span>;
|
||||
} <span class="Keyword">else</span> <span class="Keyword">if</span> (student.okayStuff) {
|
||||
<span class="Keyword">return</span> student.triedHard ? <span class="String"><span class="String">"</span>B<span class="String">"</span></span> : <span class="String"><span class="String">"</span>B-<span class="String">"</span></span>;
|
||||
} <span class="Keyword">else</span> {
|
||||
<span class="Keyword">return</span> <span class="String"><span class="String">"</span>C<span class="String">"</span></span>;
|
||||
}
|
||||
<span class="Keyword">return</span> student.excellentWork ? <span class="String"><span class="String">"</span>A+<span class="String">"</span></span> : (student.okayStuff ? (student.triedHard ? <span class="String"><span class="String">"</span>B<span class="String">"</span></span> : <span class="String"><span class="String">"</span>B-<span class="String">"</span></span>) : <span class="String"><span class="String">"</span>C<span class="String">"</span></span>);
|
||||
};
|
||||
eldest <span class="Keyword">=</span> <span class="Number">24</span> <span class="Keyword">></span> <span class="Number">21</span> ? <span class="String"><span class="String">"</span>Liz<span class="String">"</span></span> : <span class="String"><span class="String">"</span>Ike<span class="String">"</span></span>;
|
||||
</pre><button onclick='javascript: 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";;alert(eldest);'>run: eldest</button><br class='clear' /></div>
|
||||
<p>
|
||||
|
@ -1059,24 +1045,22 @@ six = (one = 1) + (two = 2) + (three = 3);;alert(six);'>run: six</button><br cla
|
|||
<div class='code'><pre class="idle"><span class="Comment"><span class="Comment">#</span> The first ten global properties.</span>
|
||||
|
||||
globals <span class="Keyword">=</span> (name <span class="Keyword">for</span> name <span class="Keyword">of</span> window)[<span class="Number">0</span>...<span class="Number">10</span>]
|
||||
</pre><pre class="idle"><span class="Storage">var</span> _i, _ref, _result, globals, name;
|
||||
</pre><pre class="idle"><span class="Storage">var</span> _ref, _result, globals, name;
|
||||
<span class="Storage">var</span> __hasProp <span class="Keyword">=</span> <span class="LibraryClassType">Object</span>.<span class="LibraryConstant">prototype</span>.hasOwnProperty;
|
||||
globals <span class="Keyword">=</span> (<span class="Storage">function</span>() {
|
||||
_result <span class="Keyword">=</span> []; _ref <span class="Keyword">=</span> <span class="LibraryClassType">window</span>;
|
||||
<span class="Keyword">for</span> (name <span class="Keyword">in</span> _ref) {
|
||||
<span class="Keyword">if</span> (<span class="Keyword">!</span>__hasProp.<span class="LibraryFunction">call</span>(_ref, name)) <span class="Keyword">continue</span>;
|
||||
_i <span class="Keyword">=</span> _ref[name];
|
||||
_result.<span class="LibraryFunction">push</span>(name);
|
||||
}
|
||||
<span class="Keyword">return</span> _result;
|
||||
})().<span class="LibraryFunction">slice</span>(<span class="Number">0</span>, <span class="Number">10</span>);
|
||||
</pre><button onclick='javascript: var _i, _ref, _result, globals, name;
|
||||
</pre><button onclick='javascript: 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;
|
||||
|
@ -1625,19 +1609,9 @@ dates = (new RegExp("\\d+" + (sep) + "\\d+" + (sep) + "\\d+", "g"));;alert(sente
|
|||
|
||||
|
||||
</pre><pre class="idle"><span class="Storage">var</span> mobyDick;
|
||||
mobyDick <span class="Keyword">=</span> <span class="String"><span class="String">"</span>Call me Ishmael. Some years ago --\</span>
|
||||
<span class="String"> never mind how long precisely -- having little\</span>
|
||||
<span class="String"> or no money in my purse, and nothing particular\</span>
|
||||
<span class="String"> to interest me on shore, I thought I would sail\</span>
|
||||
<span class="String"> about a little and see the watery part of the\</span>
|
||||
<span class="String"> world...<span class="String">"</span></span>;
|
||||
mobyDick <span class="Keyword">=</span> <span class="String"><span class="String">"</span>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...<span class="String">"</span></span>;
|
||||
</pre><button onclick='javascript: 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...";;alert(mobyDick);'>run: mobyDick</button><br class='clear' /></div>
|
||||
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...";;alert(mobyDick);'>run: mobyDick</button><br class='clear' /></div>
|
||||
<p>
|
||||
Heredocs can be used to hold formatted or indentation-sensitive text
|
||||
(or, if you just don't feel like escaping quotes and apostrophes). The
|
||||
|
|
Loading…
Reference in a new issue