mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-13 00:37:54 -05:00
* Mobile Safari needs the code to be >= 16px * Buttons that just run the code shouldn’t have a label, since in all the other examples the label signifies the command to be run * Use Bootstrap’s breakpoints * Use Bootstrap’s styling for the <code> element, to avoid misaligned baseline * Updated output * Fix #4704: use replaceState, so that back/forward only happen for user clicks on links; opening and closing Try CoffeeScript doesn’t count as a new history entry, and closing it retrieves the previous URL * Fix #4702: Some changelog entries are more equal than others * Updated output * Eliminate the 1px jitter when initializing code editors * On first time opening Try CoffeeScript, use just #try as the hash * Update output * Increase general body line spacing * Code styling per Jeremy * Don’t let the main text column grow unreasonably wide * Give list items some modest bottom margin (and use ems whenever possible) * Updated output
20 lines
926 B
HTML
20 lines
926 B
HTML
<aside class="code-example container-fluid bg-ribbed-dark" data-example="<%= file %>">
|
|
<div class="row">
|
|
<div class="col-md-6 coffeescript-input-column">
|
|
<textarea class="coffeescript-input" id="<%= file %>-coffee"><%= cs %></textarea>
|
|
<pre class="placeholder-code"><%= highlight('coffeescript', cs) %></pre>
|
|
</div>
|
|
<div class="col-md-6 javascript-output-column">
|
|
<textarea class="javascript-output" id="<%= file %>-js"><%= js %></textarea>
|
|
<pre class="placeholder-code"><%= highlight('javascript', js) %></pre>
|
|
</div>
|
|
</div>
|
|
<% if (run) { %>
|
|
<div class="row">
|
|
<div class="col text-right">
|
|
<button type="button" class="btn btn-primary" data-action="run-code-example" data-example="<%= file %>" data-run="<%= escape(run) %>"><small><%= include('play.svg') %></small><%= run === true ? '' : run.replace(/"/g, '"') %></button>
|
|
</div>
|
|
</div>
|
|
<% } %>
|
|
</aside>
|