go.dev: turn off share button on golang.google.cn

Right now golang.google.cn serves a copy of golang.org.
Eventually it will serve a copy of go.dev instead.
Prepare for that by disabling the share button on the go.dev
home page when the request is actually for golang.google.cn.

Change-Id: I2b80d066ceb789cd188f6409694bccfed2a87c19
Reviewed-on: https://go-review.googlesource.com/c/website/+/362956
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
This commit is contained in:
Russ Cox 2021-11-09 23:01:04 -05:00
Родитель 7008ea24bd
Коммит 7aec227803
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -2,6 +2,7 @@
title: go.dev
---
{{$canShare := not googleCN}}
<section class="Hero bluebg">
<div class="Hero-gridContainer">
<div class="Hero-blurb">
@ -175,8 +176,10 @@ func main() {
<div class="Playground-buttons">
<button class="Button Button--primary js-playgroundRunEl" title="Run this code [shift-enter]">Run</button>
<div class="Playground-secondaryButtons">
{{- if $canShare}}
<button class="Button js-playgroundShareEl" title="Share this code">Share</button>
<a class="Button tour" href="https://tour.golang.org/" title="Playground Go from your browser">Tour</a>
{{- end}}
</div>
</div>
</div>