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>
diff --git a/godoc/godoc.go b/godoc/godoc.go
index e77a81f..6b176c6 100644
--- a/godoc/godoc.go
+++ b/godoc/godoc.go
@@ -98,6 +98,9 @@
// formatting of Notes
"noteTitle": noteTitle,
+
+ // Number operation
+ "multiply": multiply,
}
if p.URLForSrc != nil {
p.funcMap["srcLink"] = p.URLForSrc
@@ -110,6 +113,8 @@
}
}
+func multiply(a, b int) int { return a * b }
+
func filenameFunc(path string) string {
_, localname := pathpkg.Split(path)
return localname