mirror of
https://github.com/golang/go
synced 2024-11-18 19:54:44 -07:00
1330b289ad
This will permit us to serve *.golang.org to Chinese users. Change-Id: I5217753aa67931522c7e6be106477534c99a20b2 Reviewed-on: https://go-review.googlesource.com/14194 Reviewed-by: Andrew Gerrand <adg@golang.org>
31 lines
985 B
HTML
31 lines
985 B
HTML
<div id="example_{{.Name}}" class="toggle">
|
|
<div class="collapsed">
|
|
<p class="exampleHeading toggleButton">▹ <span class="text">Example{{example_suffix .Name}}</span></p>
|
|
</div>
|
|
<div class="expanded">
|
|
<p class="exampleHeading toggleButton">▾ <span class="text">Example{{example_suffix .Name}}</span></p>
|
|
{{with .Doc}}<p>{{html .}}</p>{{end}}
|
|
{{$output := .Output}}
|
|
{{with .Play}}
|
|
<div class="play">
|
|
<div class="input"><textarea class="code">{{html .}}</textarea></div>
|
|
<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>
|
|
{{if $.Share}}
|
|
<a class="share" title="Share this code">Share</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<p>Code:</p>
|
|
<pre class="code">{{.Code}}</pre>
|
|
{{with .Output}}
|
|
<p>Output:</p>
|
|
<pre class="output">{{html .}}</pre>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|