mirror of
https://github.com/golang/go
synced 2024-11-05 19:46:11 -07:00
4e70a1b26a
Use that property to determine whether to show share functionality or link to sites that are blocked in mainland China. This change requires https://go-review.googlesource.com/c/52872 Change-Id: I47327f9dbd2624206564fa99eb1cc6a10b4f46db Reviewed-on: https://go-review.googlesource.com/52873 Reviewed-by: Chris Broadfoot <cbro@golang.org>
31 lines
1011 B
HTML
31 lines
1011 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" spellcheck="false">{{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 not $.GoogleCN}}
|
|
<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>
|