|
401 | 401 |
|
402 | 402 | .try-coffeescript .code-column {
|
403 | 403 | overflow: hidden;
|
404 |
| - padding-bottom: 100%; |
405 |
| - margin-bottom: -100%; |
406 | 404 | background-color: #2f2625;
|
407 | 405 | color: #2f2625;
|
408 | 406 | }
|
409 | 407 |
|
| 408 | +@media screen and (max-width: 767px) { |
| 409 | + .try-coffeescript .code-column { |
| 410 | + height: calc(50vh - 0.5 * 3.5rem); |
| 411 | + } |
| 412 | +} |
| 413 | +@media screen and (min-width: 768px) { |
| 414 | + .try-coffeescript .code-column { |
| 415 | + padding-bottom: 100%; |
| 416 | + margin-bottom: -100%; |
| 417 | + } |
| 418 | +} |
| 419 | + |
410 | 420 | .try-coffeescript button svg {
|
411 | 421 | height: 1em;
|
412 | 422 | transform: scale(1.3) translateY(0.1em);
|
413 | 423 | fill: #0b140f;
|
414 | 424 | }
|
415 | 425 |
|
| 426 | +@media screen and (max-width: 767px) { |
| 427 | + .try-coffeescript .try-buttons { |
| 428 | + position: absolute; |
| 429 | + bottom: 1em; |
| 430 | + z-index: 1002; |
| 431 | + } |
| 432 | +} |
| 433 | + |
416 | 434 | /* Adapted from https://github.com/FarhadG/code-mirror-themes/blob/master/themes/twilight.css */
|
417 | 435 |
|
418 | 436 | .cm-s-twilight {
|
|
494 | 512 | </div>
|
495 | 513 | </div>
|
496 | 514 | <div class="row">
|
497 |
| - <div class="col-xs-12 text-xs-right"> |
| 515 | + <div class="col-xs-12 text-xs-right try-buttons"> |
498 | 516 | <button type="button" class="btn btn-primary" data-action="run-code-example" data-example="try-coffeescript" data-run="true">▶</button> 
|
499 | 517 | <button type="button" class="btn btn-primary" data-action="link" data-example="try-coffeescript"><svg aria-hidden="true" version="1.1" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>
|
500 | 518 | </button>
|
|
651 | 669 | <section id="overview">
|
652 | 670 | <p><strong>CoffeeScript is a little language that compiles into JavaScript.</strong> Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.</p>
|
653 | 671 | <p>The golden rule of CoffeeScript is: <em>“It’s just JavaScript.”</em> The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable, pretty-printed, and tends to run as fast or faster than the equivalent handwritten JavaScript.</p>
|
654 |
| -<p><strong>Latest Version:</strong> <a href="http://github.com/jashkenas/coffeescript/tarball/2.0.0-alpha1">2.0.0-alpha1</a></p> |
| 672 | +<p><strong>Latest Version:</strong> <a href="http://github.com/jashkenas/coffeescript/tarball/2.0.0-alpha">2.0.0-alpha</a></p> |
655 | 673 | <blockquote>
|
656 | 674 | <pre><code>npm install -g coffeescript</code></pre></blockquote>
|
657 | 675 |
|
@@ -3272,7 +3290,7 @@ <h2>Web Chat (IRC)</h2><p>Quick help and advice can often be found in the Coffee
|
3272 | 3290 |
|
3273 | 3291 | </section>
|
3274 | 3292 | <section id="annotated-source">
|
3275 |
| - <h2>Annotated Source</h2><p>You can browse the CoffeeScript 2.0.0-alpha1 source in readable, annotated form <a href="http://coffeescript.org/v2/annotated-source/">here</a>. You can also jump directly to a particular source file:</p> |
| 3293 | + <h2>Annotated Source</h2><p>You can browse the CoffeeScript 2.0.0-alpha source in readable, annotated form <a href="http://coffeescript.org/v2/annotated-source/">here</a>. You can also jump directly to a particular source file:</p> |
3276 | 3294 | <ul>
|
3277 | 3295 | <li><a href="http://coffeescript.org/v2/annotated-source/grammar.html">Grammar Rules — src/grammar</a></li>
|
3278 | 3296 | <li><a href="http://coffeescript.org/v2/annotated-source/lexer.html">Lexing Tokens — src/lexer</a></li>
|
|
0 commit comments