]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: use elastic layout for most pages
authorAndrew Gerrand <adg@golang.org>
Mon, 12 Mar 2012 23:17:10 +0000 (10:17 +1100)
committerAndrew Gerrand <adg@golang.org>
Mon, 12 Mar 2012 23:17:10 +0000 (10:17 +1100)
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

doc/style.css
lib/godoc/godoc.html

index 1d8ccd0ead3671561ba91fa338af259a8ea16d27..d5b305984a59b830697b9ee416936e0f1b273d51 100644 (file)
@@ -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;
 }
index 62deed745b62301ff12ca213f2a4e769761bd2bb..7efed83b922a3b209a1285b39d24aaa51ecb5606 100644 (file)
 </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>
 <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