From: Andrew Gerrand Date: Mon, 13 Feb 2012 10:22:36 +0000 (+1100) Subject: godoc: new design X-Git-Tag: weekly.2012-02-14~82 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d84de09e1d46efe6e0dc5edcbb6c30b02733aa70;p=gostls13.git godoc: new design This is not the finished product, but a good checkpoint from which to proceed with further development. R=golang-dev, dsymonds, r CC=golang-dev https://golang.org/cl/5571061 --- diff --git a/doc/all.css b/doc/all.css deleted file mode 100644 index 8caab97206..0000000000 --- a/doc/all.css +++ /dev/null @@ -1,222 +0,0 @@ -/* General Styles */ -body { - font-family: "Bitstream Vera Sans", Verdana, sans-serif; - font-size: 81.25%; - line-height: 1.23em; - padding: 0; - margin: 1.23em; - background: white; - color: black; -} -a { - color: #04a; - text-decoration: none; -} -a:visited { - color: #04a; -} -a:hover { - color: #a40; - text-decoration: underline; -} -a:active { - color: #c00; -} -code, pre { - font-size: 1.2em; -} -pre { - background: #F0F0F0; - padding: 0.5em 1em; -} -h3 { - font-size: 100%; -} - -/* Top bar */ -#container { - width: 100%; - margin: auto; -} -#topnav { - height: 55px; - background: url(/doc/logo.png) no-repeat top left; -} -a#logo-box { - display: block; - height: 55px; -} -h1#title { - display: none; -} -#nav-main { - float: right; - width: 500px; - margin-top: -5px; - text-align: center; -} -#nav-main ul { - padding-left: 0; - margin-left: 0; - margin-bottom: 0.5em; -} -#nav-main li a { - display: inline; - display: inline-block; - padding: .46em .62em .38em .62em; -} -#nav-main li a:link, -#nav-main li a:visited { - color: #000; -} -#nav-main li { - display: inline; - display: inline-block; - background: #e6e6e6 url(/doc/button_background.png) repeat-x; - border: solid 1px #999; - margin-left: -1px; - text-shadow: #fff 0 1px 0; - box-shadow: 0 1px 1px #ccc; - -moz-box-shadow: 0 1px 1px #ccc; - -webkit-box-shadow: 0 1px 1px #ccc; -} -#nav-main li:first-child { - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -#nav-main li:last-child { - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; -} -#nav-main .quickref { - color: #444; -} -#nav-main .quickref .sep { - color: #999; -} -#search { - width: 120px; - margin-left: 0.5em; -} -#search.inactive { - text-align: center; - color: #444; -} - -/* Footer */ -#site-info { - position: relative; - text-align: center; -} -#site-info, #site-info a:link, #site-info a:visited { - color: #aaa; -} - -/* Content */ -#content { - clear: both; - padding: 0; - position: relative; - margin-top: 1.5em; - margin-bottom: 1.5em; - border-top: solid 1px #aaa; - border-bottom: solid 1px #aaa; -} -.left-column { - width: 49%; - float: left; -} -.right-column { - width: 49%; - float: right; -} -.end-columns { - clear: both; -} -#content h1 { - padding: 0; -} -#content h2 { - border-top: 2px solid #ddd; - padding: 8px 0; - margin: 1.5em 0 0; -} -#content .subtitle { - margin-top: 1em; - display: block; -} -.navtop a { - font-weight: normal; font-size: 7pt; - float: right; color: #999; -} - -/* Content and Code Highlighting */ -pre.ebnf, pre.grammar { - background: #FFFFE0; -} -span.ln { - font-size: 80%; - color: #777777; -} -span.comment { - color: #002090; -} -span.highlight { - background: #FF9900; - font-weight: bold; -} -span.highlight-comment { - background: #FF9900; - font-weight: bold; - color: #002090; -} -span.selection { - background: #FFFF00 -} -span.selection-comment { - color: #002090; - background: #FFFF00 -} -span.selection-highlight { - background: #FF9900; - font-weight: bold; -} -span.selection-highlight-comment { - background: #FF9900; - font-weight: bold; - color: #002090; -} -span.alert { - color: #D00000; -} -#nav table { - width: 100%; -} -.detail { - padding: 0.25em 1em; - background: #F4F4F4; -} -sup.new { - color: red; - font-size: 8px; - line-height: 0; -} -.example .expanded { - display: none; -} -.exampleVisible .collapsed { - display: none; -} -.exampleHeading { - cursor: pointer; -} - -/* Table of code entries; used by go1.html */ -.codetable td { - font-family: monospace; - font-size: 120%; -} diff --git a/doc/community.html b/doc/community.html deleted file mode 100644 index aee731e3c0..0000000000 --- a/doc/community.html +++ /dev/null @@ -1,55 +0,0 @@ - - -
- -

The Go Community

- -

Go Nuts Mailing List

-

The golang-nuts -mailing list is for general Go discussion.

- -

Go Packages Dashboard

-

A list of the most popular goinstall'd -Go libraries.

- -

Go Project Dashboard

-

A list of external Go projects including programs and libraries.

- -

Go IRC Channel

-

#go-nuts on irc.freenode.net is the official Go IRC channel.

- -

@go_nuts at Twitter

-

The Go project's official Twitter account.

- -
- -
- -

Blogs

- -

The Go Blog

-

-The Go project's official blog, maintained by the core Go developers. -

- -

research!rsc

-

-Posts labelled 'Go' by Russ Cox, one of the core Go developers. -

- -

Airs

-

-Posts labelled 'Programming' by Ian Lance Taylor, one of the core Go developers. -

- -

nf.id.au

-

-Posts labelled 'Go' by Andrew Gerrand, one of the core Go developers. -

- -
- -
- diff --git a/doc/contrib.html b/doc/contrib.html index 3ef7d5695a..7ab7eee863 100644 --- a/doc/contrib.html +++ b/doc/contrib.html @@ -1,8 +1,34 @@ -
+

The Go Project

+ +

Source Code

+

Check out the Go source code.

+ +

Build Status

+

View the status of Go builds across the supported operating +systems and architectures.

+ +

Roadmap

+

Features and ideas being developed or discussed by the Go team.

+ +

Release History

+

A summary of the changes between Go releases.

+ +

Weekly Snapshot History

+

A summary of the changes between weekly snapshots of Go.

+ +

Developer Mailing List

+

The golang-dev +mailing list is for discussing and reviewing code for the Go project.

+

For general discussion of Go programming, see golang-nuts.

+ +

Checkins Mailing List

+

A mailing list that receives a message summarizing each checkin to the Go repository.

How you can help

@@ -36,36 +62,3 @@ open issues that interest you. Those labeled HelpWanted are particularly in need of outside help.

- -
- -
- -

The Go Project

- -

Build Status

-

View the status of Go builds across the supported operating -systems and architectures.

- -

Roadmap

-

Features and ideas being developed or discussed by the Go team.

- -

Release History

-

A summary of the changes between Go releases.

- -

Weekly Snapshot History

-

A summary of the changes between weekly snapshots of Go.

- -

Developer Mailing List

-

The golang-dev -mailing list is for discussing and reviewing code for the Go project.

-

For general discussion of Go programming, see golang-nuts.

- -

Checkins Mailing List

-

A mailing list that receives a message summarizing each checkin to the Go repository.

- -
- -
- diff --git a/doc/docs.html b/doc/docs.html index e99017fca0..169b7c14f9 100644 --- a/doc/docs.html +++ b/doc/docs.html @@ -3,22 +3,25 @@ "Path": "/doc/" }--> -
- -

Learning Go

-

-If you're new to Go, we recommend you work through the -tutorial. The -language specification has all the details should -you want to explore. +The Go programming language is an open source project to make programmers more +productive.

+

-Once you've learned a little about the language, -Effective Go will help you learn the style and -idioms of programming in Go. +Go is expressive, concise, clean, and efficient. Its concurrency +mechanisms make it easy to write programs that get the most out of multicore +and networked machines, while its novel type system enables flexible and +modular program construction. Go compiles quickly to machine code yet has the +convenience of garbage collection and the power of run-time reflection. It's a +fast, statically typed, compiled language that feels like a dynamically typed, +interpreted language.

+
+ +

Learning Go

+

A Tour of Go

An interactive introduction to Go in three sections. @@ -43,24 +46,27 @@ A must read for any new Go programmer. It augments the tutorial and the language specification, both of which should be read first.

-

Frequently Asked Questions (FAQ)

-

-Answers to common questions about Go. -

-

How to write Go code

How to write a new package and how to test code.

-

Codelab: Writing Web Applications

+

Frequently Asked Questions (FAQ)

-This codelab takes the reader through the creation of a simple wiki web -application. It touches on structs, methods, file I/O, http, regular expressions, -and closures. +Answers to common questions about Go.

-

Codewalks

+

Other introductory articles

+ + + +

Go Articles

+ +

Codewalks

Guided tours of Go programs.

@@ -70,17 +76,6 @@ Guided tours of Go programs.
  • Share Memory by Communicating
  • -

    Go for C++ Programmers

    -

    -An introduction to Go for C++ programmers. -

    - -

    Go Articles

    - -

    -Notable articles from the Go Blog. -

    -

    Language

    -

    Non-English Documentation

    - -

    Belarusian — Беларуская

    - - - -

    Chinese — 中文

    - - - -

    Czech — ČeÅ¡tina

    - - - -

    French — Français

    - - - -

    German — Deutsch

    - - - -

    Japanese — 日本語

    - - -

    Korean — 한국어

    - - -
    - - -
    - -

    References

    - -

    Keep these under your pillow.

    - -

    Package Documentation

    -

    -The built-in documentation for the Go standard library. -

    - -

    Command Documentation

    -

    -The built-in documentation for the Go tools. -

    - -

    Language Specification

    -

    -The official Go Language specification. -

    - -

    Release History

    -

    A summary of the changes between Go releases.

    - -

    The Go Memory Model

    -

    -A document that specifies the conditions under which reads of a variable in -one goroutine can be guaranteed to observe values produced by writes to the -same variable in a different goroutine. -

    - -

    Debugging Go Code with GDB

    -

    -Using GDB to debug Go programs. -

    -

    Videos and Talks

    Writing Web Apps in Go

    @@ -225,7 +132,7 @@ examples demonstrating features particular to Go. These include concurrency, embedded types, methods on any type, and program construction using interfaces.

    -

    Practical Go Programming

    +

    Practical Go Programming

    This talk presents the development of a complete web application in Go. It looks at design, storage, concurrency, and scaling issues in detail, using @@ -240,15 +147,6 @@ The language's first public introduction. (See the gocoding YouTube Channel -

    -A YouTube channel that includes screencasts and other Go-related videos: -

    - -

    The Expressiveness Of Go

    A discussion of the qualities that make Go an expressive and comprehensible @@ -290,6 +188,71 @@ Ian Lance Taylor's paper delivered at the GCC Summit 2010. A short promotional video featuring Russ Cox demonstrating Go's fast compiler.

    -
    +

    The Go Community

    + +

    Go Nuts Mailing List

    +

    The golang-nuts +mailing list is for general Go discussion.

    + +

    Go Packages Dashboard

    +

    A list of the most popular goinstall'd +Go libraries.

    + +

    Go Project Dashboard

    +

    A list of external Go projects including programs and libraries.

    + +

    Go IRC Channel

    +

    #go-nuts on irc.freenode.net is the official Go IRC channel.

    + +

    @go_nuts at Twitter

    +

    The Go project's official Twitter account.

    + +

    Non-English Documentation

    + +

    Belarusian — Беларуская

    + + + +

    Chinese — 中文

    + + + +

    Czech — ČeÅ¡tina

    + + + +

    French — Français

    + + + +

    German — Deutsch

    + + + +

    Japanese — 日本語

    + + +

    Korean — 한국어

    + -
    diff --git a/doc/frontpage.css b/doc/frontpage.css deleted file mode 100644 index 299855ce9a..0000000000 --- a/doc/frontpage.css +++ /dev/null @@ -1,143 +0,0 @@ -/* Overloads to all.css */ -#container { width: 76em } -.left-column { width: 48%; } -.right-column { width: 48%; } - -/* Frontpage styles */ -#content-introductory code { - font-family: "Bitstream Vera Sans Mono", "Andale Mono", monospace; -} -#content-introductory input, select, textarea { - font-family: "Bitstream Vera Sans", Verdana, sans-serif; - font-size: 1em; -} -span.keyword { - font-family: Cambria, Georgia, Times, "Times New Roman", serif; - font-size: 1.15em; - font-style: italic; -} -#content h3, #content h2 { - margin: 0; - font-size: 1em; - background: none; - border: none; - padding: 0; -} -#content .more { - color: #999; - font-weight: normal; -} -#frontpage h2#branding-tagline { - font-weight: normal; - font-style: italic; -} -#resources { - position: relative; - margin-top: 1em; -} -#resources h3 { - margin-top: 0; - margin-bottom: -.5em; - font-size: 1em; - font-weight: normal; -} -#resources-users { - float: left; - width: 48%; -} -#resources-contributors { - float: right; - width: 50%; -} -#resources ul { - padding-left: 2em; -} -#resources li { - margin-bottom: 0.5em; -} -#content-rotating { - height: 200px; -} -#content-videos { - float: left; - width: 170px; -} -#content-videos .thumbnail { - width: 150px; - height: 103px; - background-repeat: no-repeat; - border: none; -} -#content-videos .thumbnail._001 { - background: url(/doc/video-001.png); -} -#content-videos .thumbnail._002 { - background: url(/doc/video-002.png); -} -#content-videos .thumbnail._003 { - background: url(/doc/video-003.png); -} -#content-videos .thumbnail._004 { - background: url(/doc/video-004.png); -} -#content-videos .thumbnail._005 { - background: url(/doc/video-005.jpg); -} -#content-videos a.video { - display: inline-block; - width: 150px; - margin-right: .30em; - margin-top: 1.2em; -} -#content-videos a.video .caption { - display: block; - text-align: center; -} -#content-videos a.video .caption.title { - margin-top: .31em; - font-weight: bold; -} -#content-blog ul { - margin-top: 1em; - margin-left: 0; - padding-left: 0; -} -#content-blog li { - list-style: none; - margin-bottom: 1em; -} -#content-blog li a { - color: #999; - text-decoration: none; -} -#content-blog .date { - color: #999; - font-size: 0.8em; - display: inline-block; - margin-left: 0.5em; -} -#content-blog li a:link .title { - color: #04a; -} -#content-blog li a:visited .title { - color: #04a; -} -#content-blog li a:hover .title { - color: #a40; - text-decoration: underline; -} -#content-blog li a:active .title { - color: #c00; -} -.navtop { - display: none !important; -} -.how { - float: right; - font-size: 75%; -} -.unsupported { - font-weight: bold; - color: red; -} - diff --git a/doc/godocs.js b/doc/godocs.js index 3b8625a58d..5320de6bcc 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -23,7 +23,6 @@ bindEvent(window, 'load', godocs_onload); function godocs_onload() { godocs_bindSearchEvents(); godocs_generateTOC(); - godocs_addTopLinks(); godocs_bindExampleToggles(); } @@ -64,8 +63,15 @@ function godocs_generateTOC() { var toc_items = []; var i; + var seenNav = false; for (i = 0; i < navbar.parentNode.childNodes.length; i++) { var node = navbar.parentNode.childNodes[i]; + if (!seenNav) { + if (node.id == 'nav') { + seenNav = true; + } + continue; + } if ((node.tagName != 'h2') && (node.tagName != 'H2') && (node.tagName != 'h3') && (node.tagName != 'H3')) { continue; @@ -152,33 +158,6 @@ function godocs_nodeToText(node) { return text; } -/* For each H2 heading, add a link up to the #top of the document. - * (As part of this: ensure existence of 'top' named anchor link - * (theoretically at doc's top).) - */ -function godocs_addTopLinks() { - /* Make sure there's a "top" to link to. */ - var top = document.getElementById('top'); - if (!top) { - document.body.id = 'top'; - } - - if (!document.getElementsByTagName) return; // no browser support - - var headers = document.getElementsByTagName('h2'); - - for (var i = 0; i < headers.length; i++) { - var span = document.createElement('span'); - span.className = 'navtop'; - var link = document.createElement('a'); - span.appendChild(link); - link.href = '#top'; - var textNode = document.createTextNode('[Top]'); - link.appendChild(textNode); - headers[i].appendChild(span); - } -} - function godocs_bindExampleToggles() { var examples = document.getElementsByClassName("example"); for (var i = 0; i < examples.length; i++) { diff --git a/doc/gopher/frontpage.png b/doc/gopher/frontpage.png new file mode 100644 index 0000000000..ed1f49b059 Binary files /dev/null and b/doc/gopher/frontpage.png differ diff --git a/doc/gopher/ref.png b/doc/gopher/ref.png new file mode 100644 index 0000000000..26530a3a0a Binary files /dev/null and b/doc/gopher/ref.png differ diff --git a/doc/install.html b/doc/install.html index e462f1cce7..b3d48e379a 100644 --- a/doc/install.html +++ b/doc/install.html @@ -1,5 +1,6 @@

    Introduction

    diff --git a/doc/reference.html b/doc/reference.html new file mode 100644 index 0000000000..278b4bba23 --- /dev/null +++ b/doc/reference.html @@ -0,0 +1,40 @@ + + + +

    Keep these under your pillow.

    + +
    + +

    Package Documentation

    +

    +The built-in documentation for the Go standard library. +

    + +

    Command Documentation

    +

    +The built-in documentation for the Go tools. +

    + +

    Language Specification

    +

    +The official Go Language specification. +

    + +

    Release History

    +

    A summary of the changes between Go releases.

    + +

    The Go Memory Model

    +

    +A document that specifies the conditions under which reads of a variable in +one goroutine can be guaranteed to observe values produced by writes to the +same variable in a different goroutine. +

    + +

    Debugging Go Code with GDB

    +

    +Using GDB to debug Go programs. +

    + +
    diff --git a/doc/root.html b/doc/root.html index 23a35eb844..7007dceb4b 100644 --- a/doc/root.html +++ b/doc/root.html @@ -2,105 +2,112 @@ "Path": "/" }--> - - - - + -
    -
    -

    - The Go programming language is an open source project to make - programmers more productive. Go is expressive, concise, clean, - and efficient. Its concurrency mechanisms make it easy to write - programs that get the most out of multicore and networked machines, - while its novel type system enables flexible and modular program - construction. Go compiles quickly to machine code yet has the - convenience of garbage collection and the power of run-time reflection. - It's a fast, statically typed, compiled language that feels like a - dynamically typed, interpreted language. -

    -

    - Get started now with - A Tour of Go - in your browser. -

    -

    -

    - Or try Go right here:

    -
    - -
    -
    -
    - -

    Go Blog | More...

    -
    -
      -
    -
    -
    -

    Quick Links

    - -
    -
    -
    +function feedLoaded(result) { + if (result.error) { + console.log(result.error); + return; + } + var blog = document.getElementById("blog"); + var read = blog.getElementsByClassName("read")[0]; + for (var i = 0; i < result.feed.entries.length && i < 2; i++) { + var entry = result.feed.entries[i]; + var title = document.createElement("a"); + title.className = "title"; + title.href = entry.link; + title.innerHTML = entry.title; + blog.insertBefore(title, read); + var extract = document.createElement("div"); + extract.className = "extract"; + extract.innerHTML = entry.contentSnippet; + blog.insertBefore(extract, read); + var when = document.createElement("div"); + when.className = "when"; + var pub = entry.publishedDate.split(" ").slice(1,3).join(" "); + when.innerHTML = "Published " + pub + blog.insertBefore(when, read); + } +} + +function fetchFeeds() { + var feed = new google.feeds.Feed("http://blog.golang.org/feeds/posts/default"); + feed.load(feedLoaded); +} + +google.setOnLoadCallback(fetchFeeds); + diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 0000000000..cf1f4145fd --- /dev/null +++ b/doc/style.css @@ -0,0 +1,320 @@ +body { + margin: 0; + font-family: Helvetica, Arial, sans-serif; + font-size: 16px; +} +pre, code { + font-family: Menlo, monospace; + font-size: 14px; +} +body { + color: #222; +} +a { + color: #375EAB; + text-decoration: none; +} +p, pre, ul, ol { + margin: 20px; +} +pre { + background: #e9e9e9; + padding: 10px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +h1, h2, h3, h4, .rootHeading { + margin: 20px 0; + padding: 0; + color: #375EAB; + font-weight: bold; +} +h1 { + font-size: 24px; +} +h2 { + font-size: 20px; + background: #E0EBF5; + padding: 2px 5px; +} +h3 { + font-size: 18px; +} +h3, h4 { + margin: 20px 5px; +} +h4 { + font-size: 16px; +} +.rootHeading { + font-size: 20px; + margin: 0; +} + +h1 a, h2 a, h3 a, h4 a { + text-decoration: underline; +} + +dl { + margin: 20px; +} +dd { + margin: 2px 20px; +} +dl, dd { + font-size: 14px; +} +#nav table td { + vertical-align: top; +} + +table.dir th { + text-align: left; +} +table.dir td { + word-wrap: break-word; + vertical-align: top; +} + +#heading { + float: left; + margin: 0 0 10px 0; + padding: 16px 0; + font-size: 26px; + font-weight: normal; +} +#heading a { + color: #222; + text-decoration: none; +} + +#topbar { + background: #E0EBF5; +} + +body { + text-align: center; +} +#page, +#topbar .container { + clear: both; + text-align: left; + margin-left: auto; + margin-right: auto; + width: 900px; +} +#plusone { + float: right; +} +#plusoneRoot { + float: right; +} + +#copyright { + color: #666; + font-size: 14px; + margin: 40px 0; +} + +#menu > a, +#menu > input, +#learn .buttons a, +#blog .read a { + padding: 10px; + + text-decoration: none; + font-size: 16px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +#menu > a, +#menu > input { + border: 1px solid #375EAB; +} +#menu > a { + color: white; + background: #375EAB; +} +#start, +#learn .buttons a, +#blog .read a { + color: #222; + border: 1px solid #375EAB; + background: #E0EBF5; +} + +#menu { + padding: 10px 0; + text-align: right; +} +#menu > a { + margin-right: 5px; + margin-bottom: 10px; + + padding: 10px; +} +#menu > input { + position: relative; + top: 1px; + width: 100px; + background: white; + color: #222; +} +#menu > input.inactive { + color: #999; +} + +#left { + float: left; +} +#right { + float: right; +} +#left, #right { + width: 415px; +} + +#learn, +#about { + padding-top: 20px; +} +#learn h2, +#about { + margin: 0; +} +#about { + font-size: 20px; +} + +#about { + height: 96px; +} +#gopher { + background: url(/doc/gopher/frontpage.png) no-repeat; + background-position: center top; + height: 155px; +} +#start { + display: block; + padding: 10px; + + text-align: center; + text-decoration: none; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +#start .big { + font-weight: bold; + font-size: 20px; +} +#start .desc { + font-size: 14px; + font-weight: normal; + margin-top: 5px; +} + +#learn pre, #learn textarea { + margin: 0; + font-family: Menlo, monospace; + font-size: 14px; +} +#learn .input { + padding: 10px; + margin-top: 10px; + height: 150px; + + -webkit-border-top-left-radius: 5px; + -webkit-border-top-right-radius: 5px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +#learn .input textarea { + width: 100%; + height: 100%; + border: none; + outline: none; + resize: none; +} +#learn .output { + border-top: none !important; + + padding: 10px; + height: 59px; + overflow: auto; + + -webkit-border-bottom-right-radius: 5px; + -webkit-border-bottom-left-radius: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} +#learn .output pre { + padding: 0; + + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +#learn .input, +#learn .input textarea, +#learn .output, +#learn .output pre { + background: #FFFFD8; +} +#learn .input, +#learn .output { + border: 1px solid #375EAB; +} +#learn .buttons { + padding: 20px 0 10px 0; + text-align: right; +} +#learn .buttons a { + height: 16px; + margin-left: 5px; + + padding: 10px; +} +#learn .buttons .tour { + float: right; +} +#learn .buttons .tour a { + margin-right: 0; + font-weight: bold; +} + +#blog, #video { + margin-top: 40px; +} +#blog > div, #blog > a, #video > div, #video > a, #blog > h2, #video > h2 { + margin-bottom: 10px; +} +#blog .title, #video .title { + color: #222; + text-decoration: none; + display: block; + font-size: 20px; +} +#blog .when { + color: #666; + font-size: 14px; +} +#blog .read { + text-align: right; +} + +.exampleHeading { cursor: pointer; } +.example .collapsed { display: block; } +.example .expanded { display: none; } +.exampleVisible .collapsed { display: none; } +.exampleVisible .expanded { display: block; } diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html index e99b758586..380a3910d9 100644 --- a/lib/godoc/godoc.html +++ b/lib/godoc/godoc.html @@ -1,72 +1,73 @@ - + {{with .Title}} {{html .}} - The Go Programming Language {{else}} The Go Programming Language {{end}} - - + {{if .SearchBox}} {{end}} -
    -
    -

    The Go Programming Language

    - - -
    -
    - - {{with .Menu}} - - {{end}} - {{with .Title}} -

    {{html .}}

    - {{end}} - {{with .Subtitle}} - {{html .}} - {{end}} + + +
    + +
    + +{{with .Title}} +
    +

    {{html .}}

    +{{end}} +{{with .Subtitle}} +

    {{html .}}

    +{{end}} + +{{/* The Table of Contents is automatically inserted in this
    . + Do not delete this
    . */}} + + +{{/* Content is HTML-escaped elsewhere */}} +{{printf "%s" .Content}} + +
    - - {{printf "%s" .Content}} -
    -
    -

    Build version {{html .Version}}. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.

    -
    + + + + + diff --git a/lib/godoc/package.html b/lib/godoc/package.html index afb0d4ae1f..f4b6a0b7e3 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -50,19 +50,18 @@ {{if .Bugs}}
    Bugs
    {{end}} -
    - {{with .Filenames}} -

    Package files

    -

    - - {{range .}} - {{.|filename|html}} - {{end}} - -

    - {{end}} -
    + + {{with .Filenames}} +

    Package files

    +

    + + {{range .}} + {{.|filename|html}} + {{end}} + +

    + {{end}} {{with .Consts}}

    Constants

    @@ -147,30 +146,23 @@ {{/* DirList entries are numbers and strings - no need for FSet */}}

    Subdirectories

    - +
    - {{if $.DirFlat}} - - {{else}} - - {{end}} - - + + + - + {{range .List}} - - {{if $.DirFlat}} - - {{else}} - {{repeat `` .Depth}} - - {{end}} - - - + + + + + {{end}}
    NameNameSynopsisName    Synopsis
    ....
    {{html .Path}}{{html .Name}}{{html .Synopsis}}
    + {{repeat `     ` .Depth}}{{html .Name}} +     {{html .Synopsis}}

    diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go index 5745b28ba6..613475a592 100644 --- a/src/cmd/godoc/godoc.go +++ b/src/cmd/godoc/godoc.go @@ -63,7 +63,7 @@ var ( // layout control tabwidth = flag.Int("tabwidth", 4, "tab width") - showTimestamps = flag.Bool("timestamps", true, "show timestamps with directory listings") + showTimestamps = flag.Bool("timestamps", false, "show timestamps with directory listings") templateDir = flag.String("templates", "", "directory containing alternate template files") // search index