diff options
author | Andrew Gerrand <adg@golang.org> | 2012-03-13 10:17:10 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2012-03-13 10:17:10 +1100 |
commit | 2b8bc93f323bd5e161f70cc2a730dcd206b38a00 (patch) | |
tree | 06607c3ff779c992e076c365f2d2647098369fe5 | |
parent | d46438c3dadc5ce4903a2a2244b5bde84e4357cc (diff) | |
download | go-2b8bc93f323bd5e161f70cc2a730dcd206b38a00.tar.gz go-2b8bc93f323bd5e161f70cc2a730dcd206b38a00.zip |
godoc: use elastic layout for most pages
We use the absence of a Title to detect the front page.
I can't find other pages without titles, so this seems reasonable.
R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5797076
-rw-r--r-- | doc/style.css | 10 | ||||
-rw-r--r-- | lib/godoc/godoc.html | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/doc/style.css b/doc/style.css index 1d8ccd0ead..d5b305984a 100644 --- a/doc/style.css +++ b/doc/style.css @@ -129,19 +129,25 @@ div#heading a { div#topbar { background: #E0EBF5; + height: 64px; } body { text-align: center; } div#page, -div#topbar .container { +div#topbar > .container { clear: both; text-align: left; margin-left: auto; margin-right: auto; + padding: 0 20px; width: 900px; } +div#page.wide, +div#topbar > .wide { + width: auto; +} div#plusone { float: right; } @@ -182,6 +188,8 @@ div#blog .read a { } div#menu { + float: right; + min-width: 590px; padding: 10px 0; text-align: right; } diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html index 62deed745b..7efed83b92 100644 --- a/lib/godoc/godoc.html +++ b/lib/godoc/godoc.html @@ -15,10 +15,9 @@ </head> <body> -<div id="topbar"><div class="container"> +<div id="topbar"><div class="container{{if .Title}} wide{{end}}"> <form method="GET" action="/search"> -<div id="heading"><a href="/">The Go Programming Language</a></div> <div id="menu"> <a href="/doc/">Documents</a> <a href="/ref/">References</a> @@ -27,13 +26,12 @@ <a href="/help/">Help</a> <input type="text" id="search" name="q" class="inactive" value="Search"> </div> +<div id="heading"><a href="/">The Go Programming Language</a></div> </form> </div></div> -<div id="page"> - -<div id="content"> +<div id="page"{{if .Title}} class="wide"{{end}}> {{with .Title}} <div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div> @@ -52,8 +50,6 @@ </div> -</div> - <div id="copyright"> Build version {{html .Version}}. Except as noted, this content is licensed under a |