mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
doc: hide blog content for golang.google.cn
/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>
This commit is contained in:
parent
f396fa4285
commit
cc402c2c4d
1 changed files with 22 additions and 23 deletions
|
@ -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>
|
<iframe width="415" height="241" src="//www.youtube.com/embed/ytEkHepK08c" frameborder="0" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div {{if not $.GoogleCN}}class="right"{{end}}>
|
<div class="right">
|
||||||
<div id="blog">
|
<div id="blog">
|
||||||
<div class="rootHeading">Featured articles</div>
|
<div class="rootHeading">Featured articles</div>
|
||||||
<div class="read"><a href="//blog.golang.org/">Read more</a></div>
|
<div class="read"><a href="//blog.golang.org/">Read more</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
|
|
||||||
|
@ -93,6 +92,24 @@ Linux, Mac OS X, Windows, and more.
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
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) {
|
function readableTime(t) {
|
||||||
var m = ["January", "February", "March", "April", "May", "June", "July",
|
var m = ["January", "February", "March", "April", "May", "June", "July",
|
||||||
"August", "September", "October", "November", "December"];
|
"August", "September", "October", "November", "December"];
|
||||||
|
@ -123,29 +140,11 @@ Linux, Mac OS X, Windows, and more.
|
||||||
}
|
}
|
||||||
|
|
||||||
window.initFuncs.push(function() {
|
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.
|
// Load blog feed.
|
||||||
$('<script/>').attr('text', 'text/javascript')
|
$('<script/>').attr('text', 'text/javascript')
|
||||||
.attr('src', '//blog.golang.org/.json?jsonp=feedLoaded')
|
.attr('src', '//blog.golang.org/.json?jsonp=feedLoaded')
|
||||||
.appendTo('body');
|
.appendTo('body');
|
||||||
});
|
|
||||||
|
|
||||||
{{if not $.GoogleCN}}
|
|
||||||
|
|
||||||
window.initFuncs.push(function() {
|
|
||||||
// Set the video at random.
|
// Set the video at random.
|
||||||
var videos = [
|
var videos = [
|
||||||
{h: 241, s: "//www.youtube.com/embed/ytEkHepK08c"}, // Tour of Go
|
{h: 241, s: "//www.youtube.com/embed/ytEkHepK08c"}, // Tour of Go
|
||||||
|
|
Loading…
Reference in a new issue