diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
commit | 3e45412327a2654a77944249962b3652e6142299 (patch) | |
tree | bc3bf69452afa055423cbe0c5cfa8ca357df6ccf /doc/root.html | |
parent | c533680039762cacbc37db8dc7eed074c3e497be (diff) | |
download | golang-upstream/2011.01.12.tar.gz |
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'doc/root.html')
-rw-r--r-- | doc/root.html | 210 |
1 files changed, 88 insertions, 122 deletions
diff --git a/doc/root.html b/doc/root.html index 3a5a49515..f98f9c243 100644 --- a/doc/root.html +++ b/doc/root.html @@ -1,131 +1,97 @@ -<!-- The Go Programming Language --> +<link rel="stylesheet" type="text/css" href="/doc/frontpage.css"> -<script> - // 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(4) + 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 --> - -<div id="gettingStarted"> - <h1>Getting started</h1> - - <ol> - <li> - <span><a href="/doc/install.html">Install Go</a>.</span> - </li> - - <li> - <span>Read the <a href="/doc/go_tutorial.html">tutorial</a>.</span> - </li> - - <li> - <span>Learn the <a href="/pkg">libraries</a>.</span> - </li> - </ol> - - <h1>Slow compiles?<br>Watch this</h1> - <table width="100%"> - <tr> - <td align=center width="100%"> - <a href="http://www.youtube.com/watch?v=wwoWei-GAPo"><img src="/doc/video-snap.jpg"></a> - </td> - </tr> - </table> -</div> - -<div id="blog"> - <h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1> - <div id="blogFeed">Loading...</div> -</div> - - -<div id="frontpage"> - -<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> - -<p style="font-size: 1.5em; font-weight: bold;">Go is …</p> - -<h3>… simple</h3> -<pre class="code"> -package main - -import "fmt" - -func main() { - fmt.Printf("Hello, 世界\n") -}</pre> - -<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>… 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>… 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>… 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> + <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> + <div class="how">[<a href="/doc/playground.html">How does this work?</a>]</div> + <a href="/doc/install.html">Install Go now</a>, or try it right here in your browser:</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://osdc.blip.tv/file/4432146/"><img src="/doc/play_overlay.png" class="thumbnail _004" /> <span class="caption title">“Practical Go Programming”</span> <span class="caption description">OSDC 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> |