Commit 2b8bc93f authored by Andrew Gerrand's avatar Andrew Gerrand

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
parent d46438c3
...@@ -129,19 +129,25 @@ div#heading a { ...@@ -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 { ...@@ -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;
} }
......
...@@ -15,10 +15,9 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment