diff options
| author | Andrew Gerrand <adg@golang.org> | 2010-09-16 14:01:02 +1000 |
|---|---|---|
| committer | Andrew Gerrand <adg@golang.org> | 2010-09-16 14:01:02 +1000 |
| commit | 6ab8d24d728dff360c5a91f89ff2a2500bae362a (patch) | |
| tree | ab7a8bf826ba2ac1785cd9bb6ddc37293dd88a19 /doc/root.html | |
| parent | 381ab58e2c1c3e10e64faeca292ee1a5b3fb0226 (diff) | |
| download | go-6ab8d24d728dff360c5a91f89ff2a2500bae362a.tar.xz | |
golang.org redesign
R=r, rsc, gri
CC=golang-dev, iant, ken2, lvd, nigeltao_golang, stephenm
https://golang.org/cl/2182042
Diffstat (limited to 'doc/root.html')
| -rw-r--r-- | doc/root.html | 202 |
1 files changed, 86 insertions, 116 deletions
diff --git a/doc/root.html b/doc/root.html index 65869183cb..abfdc1dafa 100644 --- a/doc/root.html +++ b/doc/root.html @@ -1,125 +1,95 @@ -<!-- The Go Programming Language --> - -<script type="text/javascript"> - // On the frontpage we hide the header and navigation elements that other - // pages have. - document.getElementById('generatedHeader').style.display = 'none'; - document.getElementById('nav').style.display = 'none'; -</script> - -<!-- begin blog post widget JS/styles --> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> function loadFeed() { - var url = "http://blog.golang.org/feeds/posts/default"; - var divId = "blogFeed"; - var feed = new google.feeds.Feed(url); - feed.setNumEntries(8) - feed.load(function (result) { - var container = document.getElementById(divId) - if (result.error) { - container.innerHTML = "Error loading feed."; - return; - } - container.innerHTML = ""; - var entries = result.feed.entries; - for (var i=0; i<entries.length; i++) { - var a = document.createElement("a"); - a.setAttribute("href", entries[i].link); - a.appendChild(document.createTextNode(entries[i].title)); - container.appendChild(a); - } - }); + var url = "http://blog.golang.org/feeds/posts/default"; + var divId = "blogFeed"; + var feed = new google.feeds.Feed(url); + feed.setNumEntries(5) + feed.load(function (result) { + var container = document.getElementById(divId) + if (result.error) { + container.innerHTML = "Error loading feed."; + return; + } + container.innerHTML = ""; + var entries = result.feed.entries; + for (var i=0; i<entries.length; i++) { + var li = document.createElement("li"); + var a = document.createElement("a"); + a.setAttribute("href", entries[i].link); + var span_title = document.createElement("span"); + span_title.appendChild(document.createTextNode(entries[i].title)); + span_title.className = "title"; + a.appendChild(span_title); + li.appendChild(a); + var span_date = document.createElement("span"); + span_date.appendChild(document.createTextNode(entries[i].publishedDate.substr(0, 11))); + span_date.className = "date"; + a.appendChild(span_date); + container.appendChild(li); + } + }); } google.load("feeds", "1"); google.setOnLoadCallback(loadFeed); </script> -<!-- end blog post widget JS/styles --> -<table style="padding-top: 1em; padding-bottom: 2em;"> - <tr> - <td> - <img style="padding-right: 1em;" src="/doc/go-logo-black.png"> - </td> - <td> - <div><span style="font-size: 2em; font-weight: bold;">a systems programming language</span><br><span style="font-size: 1.5em;">expressive, concurrent, garbage-collected</span></div> - </td> - </tr> -</table> - -<div id="fp-videos"> - <h1>Go videos</h1> - <div class="video"> - <a href="http://www.youtube.com/watch?v=jgVhBThJdXc"><img src="/doc/video-snap-io.jpg"></a> - <div class="title">"Go Programming"</div> - <div class="subtitle">Google I/O Tech Talk</div> - </div> - <div class="video"> - <a href="http://www.youtube.com/watch?v=wwoWei-GAPo"><img src="/doc/video-snap-fastcompiles.jpg"></a> - <div class="title">"Fast Compiles"</div> - <div class="subtitle">Go Promotional Video</div> - </div> - <div class="video"> - <a href="http://www.youtube.com/gocoding"><img src="/doc/video-snap-gocoding.jpg"></a> - <div class="title">Go Youtube Channel</div> - <div class="subtitle">Screencasts and more</div> + <link rel="stylesheet" type="text/css" href="/doc/frontpage.css"> + <div id="frontpage"> + <div class="left-column"> + <p style="margin-top: 0;"> + 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. + </p> + <h2>Check it out!</h2> + <p> + <a href="/doc/install.html">Install Go now</a>, or try it right here in your browser: <small>[<a href="/doc/playground.html">How does it work?</a>]</small></p> + <div id="playground" class="small"></div> + <script src="/doc/play/playground.js"></script> + </div> + <div class="right-column"> + <div id="content-rotating"> + <div id="content-videos"> + <h2>Go Videos <span class="more">| <a href="/doc/docs.html#videos_talks">More...</a></span></h2> + <a class="video" href="http://www.youtube.com/watch?v=jgVhBThJdXc"><img src="/doc/play_overlay.png" class="thumbnail _001" /> <span class="caption title">“Go Programming”</span> <span class="caption description">Google I/O Tech Talk</span></a> + </div> + <h2>Go Blog <span class="more">| <a href="http://blog.golang.org/">More...</a></span></h2> + <div id="content-blog"> + <ul id="blogFeed"> + </ul> + </div> + </div> + <h2>Quick Links</h2> + <div id="resources"> + <div id="resources-users"> + <h3>For newcomers:</h3> + <ul> + <li><a href="/doc/install.html">Getting Started</a></li> + <li><a href="/doc/go_tutorial.html">Tutorial</a></li> + <li><a href="/doc/effective_go.html">Effective Go</a></li> + <li><a href="/doc/go_faq.html">Go FAQ</a></li> + <li><a href="/doc/docs.html">Other Documentation</a></li> + </ul> + </div> + <div id="resources-contributors" class="resources"> + <h3>For developers:</h3> + <ul> + <li><a href="http://godashboard.appspot.com/package">Package Dashboard</a></li> + <li><a href="http://code.google.com/p/go/issues">Issue Tracker</a></li> + <li><a href="http://godashboard.appspot.com/">Build Status</a></li> + <li><a href="http://code.google.com/p/go/source/browse/">Go Source</a> [<a href="http://code.google.com/p/go/source/list">changes</a>]</li> + <li><a href="/pkg/">Package Reference</a></li> + <li><a href="/doc/go_spec.html">Language Specification</a></li> + </ul> + </div> + </div> + </div> + <div class="end-columns"></div> </div> - <a class="more" href="/doc/go_learning.html#videos_talks">More videos and talks.</a> -</div> - -<div id="frontpage"> - -<div id="blog"> - <h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1> - <div id="blogFeed">Loading...</div> -</div> - -<p style="font-size: 1.5em; font-weight: bold; margin-top: 0;">Go is …</p> - -<h3>… simple</h3> -<pre class="code"> -package main - -import "fmt" - -func main() { - fmt.Printf("Hello, 世界\n") -}</pre> - -<p>Go has a small, simple feature set, making it easy to learn.</p> - -<h3>… fast</h3> - -<p> -Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code. -</p> - -<h3>… concurrent</h3> - -<p> -Go promotes writing systems and servers as sets of lightweight communicating -processes, called goroutines, with strong support from the language. Run -thousands of goroutines if you want—and say good-bye to stack overflows. -</p> - -<h3>… safe</h3> - -<p>Go is type safe and memory safe. Go has pointers but no pointer arithmetic. -For random access, use slices, which know their limits.</p> - -<h3>… fun</h3> - -<p> -Go has fast builds, clean syntax, garbage collection, -methods for any type, and run-time reflection. -It feels like a dynamic language but has the speed and safety of a static language. -It's a joy to use. -</p> - -<h3>… open source</h3> - -<p> -<a href="/doc/install.html">Go for it</a>. -</p> - -</div> |
