commit | ef1829f24bf8bf2648d2ac4efa85a06e1fbc0e0b | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@google.com> | Mon May 17 12:56:51 2021 -0400 |
committer | Russ Cox <rsc@google.com> | Mon May 24 23:12:15 2021 -0400 |
tree | 6d405ba4c14b8073800229261e9fbaf3dc8ea49f | |
parent | 530546278fa92c85918c027f7f3e58b4e29a7757 [diff] |
[x/go.dev] all: fix mobile nav "Why Go" highlights In the mobile menu the pages in the Google section did not highlight "Why Go" the same way as the pages in the rest of the Solutions section. This is a bug in the current web site which we were mimicking, but it seems worth fixing, which will be better UX and also simplify the code. The root cause of the problem is apparently confusion between Hugo's Section and CurrentSection. Section returns a string, and CurrentSection returns a Page, but that's not the only difference: they also use subtly different meanings of the term “section”. Specifically, Section uses the topmost section (solutions even for solutions/google or solutions/google/chrome), while CurrentSection uses any deeper section if present (solutions/google for those two cases). For the purposes of the menu, we only care about being in the top-level "solutions" section. So use that meaning in CurrentSection, diverging from Hugo but making the site better. The CurrentSection name will go away entirely later. Change-Id: I102907f347f0472527e0f48fe35280e92b9ea0d4 X-GoDev-Commit: 05f65502deea650f0d496622a9608bc212ec33b5
This repository holds the Go Website server code and content.
The easiest way to install is to run go get -u golang.org/x/website
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/website
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/website:” in the subject line, so it is easy to find.