1
0
mirror of https://github.com/golang/go synced 2024-11-22 21:10:03 -07:00
go/doc/root.html
2012-03-15 17:44:47 +11:00

139 lines
3.6 KiB
HTML

<!--{
"Path": "/"
}-->
<div class="left">
<div id="learn">
<img class="icon share" src="/doc/share.png" alt="View full screen" title="View full screen">
<div class="rootHeading">Try Go</div>
<div class="input">
<textarea spellcheck="false" class="code">// You can edit this code!
// Click here and start typing.
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}</textarea>
</div>
<div class="output">
<pre>
Hello, 世界
</pre>
</div>
<div class="buttons">
<a class="run" href="#" title="Run this code [shift-enter]">Run</a>
<a class="share" href="#" title="Share this code">Share</a>
<a class="tour" href="http://tour.golang.org/" title="Learn Go from your browser">Tour</a>
</div>
<div class="toys">
<select>
<option value="hello.go">Hello, World!</option>
<option value="fib.go">Fibonacci Closure</option>
<option value="peano.go">Peano Integers</option>
<option value="pi.go">Concurrent pi</option>
<option value="sieve.go">Concurrent Prime Sieve</option>
<option value="solitaire.go">Peg Solitaire Solver</option>
<option value="tree.go">Tree Comparison</option>
</select>
</div>
</div>
</div>
<div class="right">
<div id="about">
Go is an open source programming environment that makes it easy to build
simple, reliable, and efficient software.
</div>
<div id="gopher"></div>
<a href="/doc/install" id="start">
<div class="big">Download Go</div>
<div class="desc">
Binary distributions available for<br>
Linux, Mac OS X, Windows, and more.
</div>
</a>
</div>
<div style="clear: both"></div>
<div class="left">
<div id="video">
<div class="rootHeading">Featured video</div>
<a class="title" href="http://www.youtube.com/watch?v=Mo1YKpIF1PQ">Building integrated apps on Google's cloud platform with Go</a>
<iframe width="415" height="241" src="http://www.youtube.com/embed/Mo1YKpIF1PQ" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="right">
<div id="blog">
<div class="rootHeading">Featured articles</div>
<div class="read"><a href="http://blog.golang.org/">Read more</a></div>
</div>
</div>
<div style="clear: both;"></div>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="/doc/play/playground.js"></script>
<script type="text/javascript">
google.load("feeds", "1");
google.load("jquery", "1.7.1");
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 init() {
// Load blog feed.
var feed = new google.feeds.Feed("http://blog.golang.org/feeds/posts/default");
feed.load(feedLoaded);
// Set up playground.
playground({
"simple": true,
"codeEl": "#learn .code",
"outputEl": "#learn .output",
"runEl": "#learn .run",
"shareEl": "#learn .share",
"shareRedirect": "http://play.golang.org/p/",
"toysEl": "#learn .toys select"
});
}
google.setOnLoadCallback(init);
</script>