Files
coffeescript/documentation/site/code.html
Geoffrey Booth 5cbd25f5d4 Docs fixes (#4707)
* 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
2017-09-20 13:10:48 -07:00

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, '&quot;') %></button>
</div>
</div>
<% } %>
</aside>