diff --git a/cmd/cover/html.go b/cmd/cover/html.go index 6f4c3c1e..58a07e9a 100644 --- a/cmd/cover/html.go +++ b/cmd/cover/html.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// TODO(adg): floating nav bar + legend // TODO(adg): set-specific legend package main @@ -329,34 +328,46 @@ const tmplHTML = ` background: black; color: rgb(80, 80, 80); } - #legend { - margin: 20px 0; + body, pre, #legend span { + font-family: Menlo, monospace; + font-weight: bold; } - #legend .box { - display: inline; - padding: 10px; - border: 1px solid white; + #topbar { + background: black; + position: fixed; + top: 0; left: 0; right: 0; + height: 42px; + border-bottom: 1px solid rgb(80, 80, 80); + } + #content { + margin-top: 50px; + } + #nav, #legend { + float: left; + margin-left: 10px; + } + #legend { + margin-top: 12px; + } + #nav { + margin-top: 10px; } #legend span { margin: 0 5px; } - pre, #legend span { - font-family: Menlo, monospace; - font-weight: bold; - } {{colors}} - -
-
+
+ +
not tracked no coverage low coverage @@ -371,9 +382,11 @@ const tmplHTML = ` high coverage
+
{{range $i, $f := .Files}}
{{$f.Body}}
{{end}} +