Skip to content

Commit d85a217

Browse files
amine7536gopherbot
authored andcommitted
static/frontend: fix homepage link when running in LocalMode
Change the homepage link based on whether we are running in LocalMode. If pkgsite or frontend are running in LocalMode, set the href link to "/", otherwise keep "https://go.dev". Fixes golang/go#60916 Change-Id: I363edef5195fd613392f64f26d0bc732fdf90dbf GitHub-Last-Rev: 364ac96 GitHub-Pull-Request: #67 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/504795 Reviewed-by: Robert Findley <[email protected]> Reviewed-by: Peter Weinberger <[email protected]> TryBot-Result: kokoro <[email protected]> Auto-Submit: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]>
1 parent 764733a commit d85a217

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/frontend/styleguide/styleguide.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</nav>
4343
<div class="go-Main-headerContent">
4444
<div class="go-Main-headerTitle">
45-
<a class="go-Main-headerLogo" href="https://go.dev/" aria-hidden="true" tabindex="-1" data-gtmc="header link"
45+
<a class="go-Main-headerLogo" href="{{if .LocalMode}}/{{else}}https://go.dev/{{end}}" aria-hidden="true" tabindex="-1" data-gtmc="header link"
4646
aria-label="Link to Go Homepage">
4747
<img height="78" width="207" src="/static/shared/logo/go-blue.svg" alt="Go">
4848
</a>

static/frontend/unit/_header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
{{define "unit-header-title"}}
5555
<div class="go-Main-headerTitle js-stickyHeader">
56-
<a class="go-Main-headerLogo" href="https://go.dev/" aria-hidden="true" tabindex="-1" data-gtmc="header link" aria-label="Link to Go Homepage">
56+
<a class="go-Main-headerLogo" href="{{if .LocalMode}}/{{else}}https://go.dev/{{end}}" aria-hidden="true" tabindex="-1" data-gtmc="header link" aria-label="Link to Go Homepage">
5757
<img height="78" width="207" src="/static/shared/logo/go-blue.svg" alt="Go">
5858
</a>
5959
<h1 class="UnitHeader-titleHeading" data-test-id="UnitHeader-title">{{.Title}}</h1>

0 commit comments

Comments
 (0)