summaryrefslogtreecommitdiff
path: root/lib/godoc/godoc.html
diff options
context:
space:
mode:
Diffstat (limited to 'lib/godoc/godoc.html')
-rw-r--r--lib/godoc/godoc.html42
1 files changed, 35 insertions, 7 deletions
diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html
index fd6032927..b7a772cb2 100644
--- a/lib/godoc/godoc.html
+++ b/lib/godoc/godoc.html
@@ -8,6 +8,11 @@
<title>The Go Programming Language</title>
{{end}}
<link type="text/css" rel="stylesheet" href="/doc/style.css">
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
+<script type="text/javascript">window.jQuery || document.write(unescape("%3Cscript src='/doc/jquery.js' type='text/javascript'%3E%3C/script%3E"));</script>
+{{if .Playground}}
+<script type="text/javascript" src="/doc/play/playground.js"></script>
+{{end}}
<script type="text/javascript" src="/doc/godocs.js"></script>
{{if .SearchBox}}
<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" />
@@ -15,7 +20,7 @@
</head>
<body>
-<div id="topbar"><div class="container{{if .Title}} wide{{end}}">
+<div id="topbar"{{if .Title}} class="wide"{{end}}><div class="container">
<form method="GET" action="/search">
<div id="menu">
@@ -24,14 +29,36 @@
<a href="/pkg/">Packages</a>
<a href="/project/">The Project</a>
<a href="/help/">Help</a>
-<input type="text" id="search" name="q" class="inactive" value="Search">
+{{if .Playground}}
+<a id="playgroundButton" href="http://play.golang.org/" title="Show Go Playground">Play</a>
+{{end}}
+<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
</div>
<div id="heading"><a href="/">The Go Programming Language</a></div>
</form>
</div></div>
+{{if .Playground}}
+<div id="playground" class="play">
+ <div class="input"><textarea class="code">package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello, 世界")
+}</textarea></div>
+ <div class="output"></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>
+{{end}}
+
<div id="page"{{if .Title}} class="wide"{{end}}>
+<div class="container">
{{with .Title}}
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
@@ -45,10 +72,8 @@
Do not delete this <div>. */}}
<div id="nav"></div>
-{{/* Content is HTML-escaped elsewhere */}}
-{{printf "%s" .Content}}
-
-</div>
+{{/* Body is HTML-escaped elsewhere */}}
+{{printf "%s" .Body}}
<div id="footer">
Build version {{html .Version}}.<br>
@@ -57,9 +82,12 @@ the content of this page is licensed under the
Creative Commons Attribution 3.0 License,
and code is licensed under a <a href="/LICENSE">BSD license</a>.<br>
<a href="/doc/tos.html">Terms of Service</a> |
-<a href="http://www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a>
+<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
</div>
+</div><!-- .container -->
+</div><!-- #page -->
+
</body>
<script type="text/javascript">
(function() {