aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2010-04-27 19:27:32 +1000
committerAndrew Gerrand <adg@golang.org>2010-04-27 19:27:32 +1000
commit28c6305a0e83293e53d3d4aeddc24ada1c198398 (patch)
tree6fd2431cfe3c7ac7a6315ddecb0155d669e679f8
parent6c124cb879cb7b6613d0d8bcec316e271ded3ee5 (diff)
downloadgo-28c6305a0e83293e53d3d4aeddc24ada1c198398.tar.gz
go-28c6305a0e83293e53d3d4aeddc24ada1c198398.zip
homepage: removed animation, use custom js instead of gdynamicfeeds
R=rsc CC=golang-dev https://golang.org/cl/949043
-rw-r--r--doc/root.html29
-rw-r--r--doc/style.css8
2 files changed, 24 insertions, 13 deletions
diff --git a/doc/root.html b/doc/root.html
index 8d73ba67bf..3a5a495154 100644
--- a/doc/root.html
+++ b/doc/root.html
@@ -9,17 +9,30 @@
<!-- begin blog post widget JS/styles -->
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
-<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<script type="text/javascript">
-function loadFeedControl() {
- var feed = "http://blog.golang.org/feeds/posts/default"
- var fg = new GFdynamicFeedControl(feed, "feedControl", {
- numResults: 5,
- displayTime: 5000
+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);
+ }
});
}
google.load("feeds", "1");
-google.setOnLoadCallback(loadFeedControl);
+google.setOnLoadCallback(loadFeed);
</script>
<!-- end blog post widget JS/styles -->
@@ -52,7 +65,7 @@ google.setOnLoadCallback(loadFeedControl);
<div id="blog">
<h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1>
- <div id="feedControl">Loading...</div>
+ <div id="blogFeed">Loading...</div>
</div>
diff --git a/doc/style.css b/doc/style.css
index 7701842774..cd57232a7f 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -250,15 +250,12 @@ span.subtitle {
padding-right: 1em;
padding-bottom: 0.75em;
border: 2px solid #ba9836;
- width: 180px;
+ width: 160px;
}
#blog { margin-bottom: 1.5em; }
#blog h1 { font-size: 1.2em; }
-#blog .gfg-title, #blog .gf-author, #blog .gf-spacer { display: none; }
-#blog .gfg-list { margin-top: 1em; }
-#blog .gf-title { font-size: 1.1em; }
-#blog .gfg-listentry-highlight { font-weight: bold; }
+#blog #blogFeed a { font-size: 1.1em; display: block; margin-top: 1em; }
#gettingStarted h1 {
padding-top: 0.3em;
@@ -267,6 +264,7 @@ span.subtitle {
}
#gettingStarted ol {
+ padding-left: 2em;
}
#gettingStarted a img {