1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:18:32 -06:00
Commit Graph

22 Commits

Author SHA1 Message Date
Chris Broadfoot
1a60337c22 godoc/static: clean up the expandos code that handles the hash
Change-Id: I14e6777f781253a574f76c7d8a345d248b5a4306
Reviewed-on: https://go-review.googlesource.com/36320
Reviewed-by: Russ Cox <rsc@golang.org>
2017-02-04 03:29:34 +00:00
Chris Broadfoot
add1aac04e static: don't use the jQuery func for looking up based on hash
$.find is safer.

Change-Id: I51893b64ce804ac5a70f780a1255af2c91413110
Reviewed-on: https://go-review.googlesource.com/35430
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-18 20:16:46 +00:00
Chris Broadfoot
5d76f8ce4f static: detect platform to hide/show unix/windows instructions
Currently both "testUnix" and "testWindows" elements are shown simultaneously.
This change detects the correct platform to hide/show the appropriate
elements based on the viewer's browser.

Change-Id: I3afee7507d61b2d756127166caede85adcd531b8
Reviewed-on: https://go-review.googlesource.com/35103
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-10 22:41:44 +00:00
Chris Broadfoot
8b89e95de3 godoc/dl: change "All versions" to "Archived versions"
This change makes each release show only once on the whole page.
The current stable releases are not shown under the archive.

This change also fixes expandos to work correctly on IDs that are not
valid CSS selectors (i.e., "#go1.7.4") to ensure that the file listing
for a given version is expanded.

Updates golang/go#17574.

Change-Id: I7ff1041be3e0072286772ffa545a124764f81945
Reviewed-on: https://go-review.googlesource.com/34911
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-06 18:41:26 +00:00
Chris Broadfoot
2d7295cc9f godoc: allow nested toggles and toggles with <a name>
Toggles can now be nested within one another. They can also be
referenced using an <a> element with the name attribute, rather than
an element with the "id" attribute.

Updates golang/go#17574.

Change-Id: I43c17499a6879e983a79a74e14c99128296288e1
Reviewed-on: https://go-review.googlesource.com/34825
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-06 03:58:25 +00:00
Chris Broadfoot
c97d1a2623 godoc: add on-hover permalink anchors across the site
We already have anchors for godoc types and functions. Add them for
every heading (and "dl") on every other page on the site.

Change-Id: Ibad77f04442e48dd5a41de759010625f89b48604
Reviewed-on: https://go-review.googlesource.com/33641
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-29 00:47:29 +00:00
Andrew Gerrand
3868f57059 godoc/static: replace version strings with actual versions
This will allow the source installation instructions to
always show the current version, but only when that version
is a release version.

Fixes golang/go#14371

Change-Id: Ibfad8054f3c75d9320ca94ba5149ab9bf052157e
Reviewed-on: https://go-review.googlesource.com/22056
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-14 23:46:28 +00:00
Andrew Gerrand
791f468ced godoc/static: show relevant test instructions on install page
Fixes golang/go#12490

Change-Id: Ifb408f225a84b3c5daf739e1e0afc4f5540e4ebd
Reviewed-on: https://go-review.googlesource.com/18278
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-07 01:41:21 +00:00
Nathan Youngman
6c9aff3429 website: fix JavaScript error on website and blog in non-ES6 browsers
In Safari a JavaScript error in personalizeInstallInstructions prevents
the featured articles from displaying. startsWith is an ES6-only feature.

Fixes golang/go#12283

Change-Id: I9f471362cdac0243758e482ed3a21b0d6aa48c8b
Reviewed-on: https://go-review.googlesource.com/13841
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-24 08:00:06 +00:00
Andrew Gerrand
7e0ad01d16 godoc/static: tweak regular expression to match source builds
(This time for sure!)

Change-Id: Ic9b7dbfb527af9aa029365f7a91bd3b949985431
Reviewed-on: https://go-review.googlesource.com/13220
Reviewed-by: Chris Broadfoot <cbro@google.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 07:07:08 +00:00
Andrew Gerrand
18635ec5c3 godoc/static: tweak regular expression to match old darwin builds
Change-Id: I74020ece0cf8b4aceb60d75475500569d08416ee
Reviewed-on: https://go-review.googlesource.com/13211
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 06:32:32 +00:00
Andrew Gerrand
a29e96e3bf godoc/static: redirect to download from installation instructions page
Change-Id: If29d04ced7404d6ba8761f734b4a16fe96959635
Reviewed-on: https://go-review.googlesource.com/13200
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-08-05 05:57:28 +00:00
Andrew Gerrand
46829bf9ce godoc/static: dynamically adjust install instructions for a given download
This change allows the download page to redirect the user to
/doc/install?download=filename so the user can see installation
instructions specific to the file they are downloading.

This is related to this change to the core repo:
https://golang.org/cl/13151

Change-Id: Ia81344ed913aea1d1a4deed021c0e07f7360ff68
Reviewed-on: https://go-review.googlesource.com/13180
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-08-05 04:18:54 +00:00
Matthew Holt
9febd36660 tools/godoc: Fix indentation in doc contents
Mobile-friendly design overlooked indentation in table of contents
for article table of contents; this change restores indentation.

Change-Id: I9a3013497e1659ebfb657a8fb9374b8ad9b04b16
Reviewed-on: https://go-review.googlesource.com/11582
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-28 23:35:27 +00:00
Matthew Holt
f671283c22 tools/godoc: Mobile-friendly site design
This change makes golang.org responsive, including a top
bar menu and appropriate font sizing. The result is a
website that looks pleasing and is functional both on
mobile and on desktop. Also added a few print styles so
the site looks great on paper or PDF.

Change-Id: I16ee25ef4afde2002f240aec0804414bfb172a24
Reviewed-on: https://go-review.googlesource.com/9062
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-06-24 07:57:00 +00:00
Alan Donovan
ebc87c5c5e godoc: fix bug in "internal call graph" tree widget.
Today I learned that getElementByClass returns an
HTMLContainer, not an array, so the for loop was iterating its
properties, which include:
- the methods of the type, which were filtered out by the condition;
- the array-like integer indices of the elements, which we want;
- the ids of the same elements (!), which we weren't expecting.
The net result is that various functions were called twice,
causing the tree to be double-populated and clicks to cause
and expand+collapse.

It's a miracle to me that any JS program even approximately works.

Fixes golang/go#8237

LGTM=bradfitz
R=gri, bradfitz
CC=golang-codereviews
https://golang.org/cl/141540043
2014-09-15 13:00:40 -04:00
Andrew Gerrand
96adaa5618 go.tools/godoc: remove Google+ buttons
LGTM=bradfitz
R=golang-codereviews, bradfitz, dsymonds
CC=golang-codereviews
https://golang.org/cl/138180043
2014-09-08 10:05:20 +10:00
Andrew Gerrand
8aabc9a084 go.tools/godoc: drop scheme from links
golang.org now serves HTTPS,
so the scripts should work
with either HTTP ot HTTPS.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/111640043
2014-07-25 10:27:31 +10:00
Alan Donovan
f35b5691f3 go.tools/godoc: fix two regressions caused by -analysis CL.
- Add missing methodset.html template file.
- Suppress initial display of package callgraph.
  Client-side JS will make it visible if there is data.

LGTM=bgarcia
R=crawshaw, bgarcia
CC=golang-codereviews
https://golang.org/cl/81550043
2014-03-27 15:30:14 -04:00
Alan Donovan
80c4f06c0f go.tools/godoc: server mode: add support for type and pointer analysis.
See analysis.go for overview of new features.
See README for known bugs and issues.

Much UI polish, testing and optimization work remains, but
this is a starting point.

Flag: we add a new flag -analysis=type,pointer, default "",
for adventurous users only at this stage.
Type analysis takes ~10s for stdlib + go.tools;
Pointer analysis (currently) takes several minutes.

Dependencies: we now include jquery.treeview.js and its GIF
images among the resources.  (bake.go now handles binary.)

LGTM=crawshaw, bgarcia
R=crawshaw, bgarcia
CC=bradfitz, golang-codereviews
https://golang.org/cl/60540044
2014-03-14 18:58:22 -04:00
Andrew Gerrand
99890b82e7 go.tools/godoc/static: use preferred JS for Google+ buttons
R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/19070044
2013-10-30 13:13:42 +11:00
Andrew Gerrand
373fd88c80 go.tools/cmd: move static files into new package 'static'
Fixes golang/go#6200.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12805046
2013-08-21 13:49:05 +10:00