]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.8] doc: hide blog content for golang.google.cn
authorAndrew Bonventre <andybons@golang.org>
Thu, 3 Aug 2017 16:33:26 +0000 (12:33 -0400)
committerAndrew Bonventre <andybons@golang.org>
Thu, 30 Nov 2017 21:11:42 +0000 (21:11 +0000)
/blog redirects to blog.golang.org (currently blocked in China)
unless there is a local checkout of golang.org/x/blog, which is
not possible on App Engine Classic.

Change-Id: Ia695e663c9bebcc6c3bedea324c630299eaad4dc
Reviewed-on: https://go-review.googlesource.com/53051
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-on: https://go-review.googlesource.com/81175
Reviewed-by: Russ Cox <rsc@golang.org>
doc/root.html

index 0b3c74954baac5fde1e14d2ab3e79dc581e72ba6..9bdf9274804074a8779884846aa83ab4e92a5dab 100644 (file)
@@ -77,15 +77,14 @@ Linux, Mac OS X, Windows, and more.
     <iframe width="415" height="241" src="//www.youtube.com/embed/ytEkHepK08c" frameborder="0" allowfullscreen></iframe>
   </div>
 </div>
-{{end}}
 
- <div {{if not $.GoogleCN}}class="right"{{end}}>
+<div class="right">
        <div id="blog">
                <div class="rootHeading">Featured articles</div>
                <div class="read"><a href="//blog.golang.org/">Read more</a></div>
        </div>
- </div>
-
+</div>
+{{end}}
 
 <div style="clear: both;"></div>
 
@@ -93,7 +92,25 @@ Linux, Mac OS X, Windows, and more.
 (function() {
        'use strict';
 
-  function readableTime(t) {
+       window.initFuncs.push(function() {
+               // Set up playground if enabled.
+               if (window.playground) {
+                       window.playground({
+                               "codeEl":        "#learn .code",
+                               "outputEl":      "#learn .output",
+                               "runEl":         "#learn .run",
+                               "shareEl":       "#learn .share",
+                               "shareRedirect": "//play.golang.org/p/",
+                               "toysEl":        "#learn .toys select"
+                       });
+               } else {
+                       $('#learn').hide()
+               }
+       });
+
+       {{if not $.GoogleCN}}
+
+       function readableTime(t) {
                var m = ["January", "February", "March", "April", "May", "June", "July",
                        "August", "September", "October", "November", "December"];
                var p = t.substring(0, t.indexOf("T")).split("-");
@@ -123,29 +140,11 @@ Linux, Mac OS X, Windows, and more.
        }
 
        window.initFuncs.push(function() {
-               // Set up playground if enabled.
-               if (window.playground) {
-                       window.playground({
-                               "codeEl":        "#learn .code",
-                               "outputEl":      "#learn .output",
-                               "runEl":         "#learn .run",
-                               "shareEl":       "#learn .share",
-                               "shareRedirect": "//play.golang.org/p/",
-                               "toysEl":        "#learn .toys select"
-                       });
-               } else {
-                       $('#learn').hide()
-               }
-
                // Load blog feed.
                $('<script/>').attr('text', 'text/javascript')
                        .attr('src', '//blog.golang.org/.json?jsonp=feedLoaded')
                        .appendTo('body');
-       });
 
-       {{if not $.GoogleCN}}
-
-       window.initFuncs.push(function() {
                // Set the video at random.
                var videos = [
                        {h: 241, s: "//www.youtube.com/embed/ytEkHepK08c"}, // Tour of Go