2012-03-25 21:10:27 -06:00
|
|
|
<div id="example_{{.Name}}" class="toggle">
|
2011-10-06 12:56:17 -06:00
|
|
|
<div class="collapsed">
|
2012-03-25 21:10:27 -06:00
|
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Example{{example_suffix .Name}}</span></p>
|
2011-10-06 12:56:17 -06:00
|
|
|
</div>
|
|
|
|
<div class="expanded">
|
2012-03-25 21:10:27 -06:00
|
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Example{{example_suffix .Name}}</span></p>
|
2012-02-15 18:43:22 -07:00
|
|
|
{{with .Doc}}<p>{{html .}}</p>{{end}}
|
2012-10-04 00:53:05 -06:00
|
|
|
{{$output := .Output}}
|
|
|
|
{{with .Play}}
|
|
|
|
<div class="play">
|
2012-12-13 04:08:51 -07:00
|
|
|
<div class="input"><textarea class="code">{{html .}}</textarea></div>
|
2012-10-04 00:53:05 -06:00
|
|
|
<div class="output"><pre>{{html $output}}</pre></div>
|
|
|
|
<div class="buttons">
|
|
|
|
<a class="run" title="Run this code [shift-enter]">Run</a>
|
|
|
|
<a class="fmt" title="Format this code">Format</a>
|
|
|
|
<a class="share" title="Share this code">Share</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<p>Code:</p>
|
|
|
|
<pre class="code">{{.Code}}</pre>
|
|
|
|
{{with .Output}}
|
|
|
|
<p>Output:</p>
|
|
|
|
<pre class="output">{{html .}}</pre>
|
|
|
|
{{end}}
|
2011-12-01 15:52:31 -07:00
|
|
|
{{end}}
|
2011-10-06 12:56:17 -06:00
|
|
|
</div>
|
|
|
|
</div>
|