1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:44:40 -07:00

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
This commit is contained in:
Andrew Gerrand 2012-03-13 10:17:10 +11:00
parent d46438c3da
commit 2b8bc93f32
2 changed files with 12 additions and 8 deletions

View File

@ -129,19 +129,25 @@ div#heading a {
div#topbar { div#topbar {
background: #E0EBF5; background: #E0EBF5;
height: 64px;
} }
body { body {
text-align: center; text-align: center;
} }
div#page, div#page,
div#topbar .container { div#topbar > .container {
clear: both; clear: both;
text-align: left; text-align: left;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
padding: 0 20px;
width: 900px; width: 900px;
} }
div#page.wide,
div#topbar > .wide {
width: auto;
}
div#plusone { div#plusone {
float: right; float: right;
} }
@ -182,6 +188,8 @@ div#blog .read a {
} }
div#menu { div#menu {
float: right;
min-width: 590px;
padding: 10px 0; padding: 10px 0;
text-align: right; text-align: right;
} }

View File

@ -15,10 +15,9 @@
</head> </head>
<body> <body>
<div id="topbar"><div class="container"> <div id="topbar"><div class="container{{if .Title}} wide{{end}}">
<form method="GET" action="/search"> <form method="GET" action="/search">
<div id="heading"><a href="/">The Go Programming Language</a></div>
<div id="menu"> <div id="menu">
<a href="/doc/">Documents</a> <a href="/doc/">Documents</a>
<a href="/ref/">References</a> <a href="/ref/">References</a>
@ -27,13 +26,12 @@
<a href="/help/">Help</a> <a href="/help/">Help</a>
<input type="text" id="search" name="q" class="inactive" value="Search"> <input type="text" id="search" name="q" class="inactive" value="Search">
</div> </div>
<div id="heading"><a href="/">The Go Programming Language</a></div>
</form> </form>
</div></div> </div></div>
<div id="page"> <div id="page"{{if .Title}} class="wide"{{end}}>
<div id="content">
{{with .Title}} {{with .Title}}
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div> <div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
@ -52,8 +50,6 @@
</div> </div>
</div>
<div id="copyright"> <div id="copyright">
Build version {{html .Version}}. Build version {{html .Version}}.
Except as noted, this content is licensed under a Except as noted, this content is licensed under a