[release-branch.go1.3] go.tools/godoc: mention sub-repos and package indexes on packages page
««« CL 128490043 / 99ba754ccda0 go.tools/godoc: mention sub-repos and package indexes on packages page Also several cosmetic tweaks to the package page. LGTM=r, bradfitz R=bradfitz, r CC=golang-codereviews https://golang.org/cl/128490043 »»» TBR=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/127630043
This commit is contained in:
parent
bd92d52adb
commit
84ece76229
|
@ -254,8 +254,10 @@ func (h *handlerServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
// special cases for top-level package/command directories
|
||||
switch tabtitle {
|
||||
case "/src/pkg":
|
||||
title = "Packages"
|
||||
tabtitle = "Packages"
|
||||
case "/src/cmd":
|
||||
title = "Commands"
|
||||
tabtitle = "Commands"
|
||||
}
|
||||
|
||||
|
|
|
@ -237,10 +237,18 @@
|
|||
{{/* DirList entries are numbers and strings - no need for FSet */}}
|
||||
{{if $.PDoc}}
|
||||
<h2 id="pkg-subdirectories">Subdirectories</h2>
|
||||
{{else}}
|
||||
<div class="pkgGopher">
|
||||
<img class="gopher" src="/doc/gopher/pkg.png"/>
|
||||
{{end}}
|
||||
{{if eq $.Dirname "/src/pkg"}}
|
||||
<div id="manual-nav">
|
||||
<dl>
|
||||
<dt><a href="#stdlib">Standard library</a></dt>
|
||||
<dt><a href="#other">Other packages</a></dt>
|
||||
<dd><a href="#subrepo">Sub-repositories</a></dd>
|
||||
<dd><a href="#community">Community</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h2 id="stdlib">Standard library</h2>
|
||||
<img class="gopher" src="/doc/gopher/pkg.png"/>
|
||||
{{end}}
|
||||
<table class="dir">
|
||||
<tr>
|
||||
|
@ -248,7 +256,7 @@
|
|||
<th> </th>
|
||||
<th style="text-align: left; width: auto">Synopsis</th>
|
||||
</tr>
|
||||
{{if not $.DirFlat}}
|
||||
{{if not (or (eq $.Dirname "/src/pkg") (eq $.Dirname "/src/cmd") $.DirFlat)}}
|
||||
<tr>
|
||||
<td><a href="..">..</a></td>
|
||||
</tr>
|
||||
|
@ -271,7 +279,34 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
</table>
|
||||
{{if $.PDoc}}{{else}}
|
||||
<p>Need more packages? Check out the <a href="/wiki/SubRepositories">sub-repositories</a> and <a href="/wiki/Projects">other Go projects</a>.</p>
|
||||
|
||||
{{if eq $.Dirname "/src/pkg"}}
|
||||
<h2 id="other">Other packages</h2>
|
||||
|
||||
<h3 id="subrepo">Sub-repositories</h3>
|
||||
<p>
|
||||
These packages are part of the Go Project but outside the main Go tree.
|
||||
They are developed under looser <a href="/doc/go1compat">compatibility requirements</a> than the Go core.
|
||||
Install them with "<a href="/cmd/go/#hdr-Download_and_install_packages_and_dependencies">go get</a>".
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.crypto">crypto</a> — additional cryptography packages.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.image">image</a> — additional imaging packages.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.net">net</a> — additional networking packages.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.sys">sys</a> — packages for making system calls.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.text">text</a> — packages for working with text.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.tools">tools</a> — godoc, vet, cover, and other tools.</li>
|
||||
<li><a href="//godoc.org/code.google.com/p/go.exp">exp</a> — experimental code (handle with care; may change without warning).</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="community">Community</h3>
|
||||
<p>
|
||||
These services can help you find Open Source packages provided by the community.
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="//godoc.org">GoDoc</a> - a package index and search engine.</li>
|
||||
<li><a href="http://go-search.org">Go Search</a> - a code search engine.</li>
|
||||
<li><a href="/wiki/Projects">Projects at the Go Wiki</a> - a curated list of Go projects.</li>
|
||||
</ul>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -411,15 +411,6 @@ img.gopher {
|
|||
margin-bottom: 10px;
|
||||
z-index: -1;
|
||||
}
|
||||
.pkgGopher {
|
||||
text-align: right;
|
||||
}
|
||||
.pkgGopher .gopher {
|
||||
float: none;
|
||||
position: relative;
|
||||
top: -40px;
|
||||
margin-bottom: -120px;
|
||||
}
|
||||
h2 { clear: right; }
|
||||
|
||||
/* example and drop-down playground */
|
||||
|
@ -601,4 +592,4 @@ a.error {
|
|||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
padding: 2px 4px 2px 4px; /* TRBL */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue