Skip to content

Commit 3096fb3

Browse files
committed
internal/fetch/dochtml: move package files to bottom of page
Package Files are now listed at the bottom of the doc page. Fixes golang/go#40611 Change-Id: I66f229b7d826c5d5c9eede8a3dde3057b8a2eb9b Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250544 Run-TryBot: Julie Qiu <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
1 parent 2deba2b commit 3096fb3

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

internal/fetch/dochtml/template.go

+15-14
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ var htmlPackage = template.Must(template.New("package").Funcs(
7171
<a href="#pkg-examples" role="treeitem" aria-level="1" tabindex="-1">Examples</a>
7272
</li>
7373
{{end}}
74-
{{if .Filenames}}
75-
<li class="DocNav-files" role="none">
76-
<a href="#pkg-files" role="treeitem" aria-level="1" tabindex="-1">Package Files</a>
77-
</li>
78-
{{end}}
7974
{{if .Consts}}
8075
<li class="DocNav-constants" role="none">
8176
<a href="#pkg-constants" role="treeitem" aria-level="1" tabindex="-1">Constants</a>
@@ -144,6 +139,12 @@ var htmlPackage = template.Must(template.New("package").Funcs(
144139
</ul>
145140
</li>
146141
{{end}}
142+
143+
{{if .Filenames}}
144+
<li class="DocNav-files" role="none">
145+
<a href="#pkg-files" role="treeitem" aria-level="1" tabindex="-1">Package Files</a>
146+
</li>
147+
{{end}}
147148
</ul>
148149
</nav>
149150
<nav class="DocNavMobile js-mobileNav">
@@ -257,15 +258,6 @@ var htmlPackage = template.Must(template.New("package").Funcs(
257258
</section>
258259
{{- end -}}
259260
260-
<section class="Documentation-files">
261-
<h3 tabindex="-1" id="pkg-files" class="Documentation-filesHeader">Package Files <a href="#pkg-files">¶</a></h3>
262-
<ul class="Documentation-filesList">
263-
{{- range .Filenames -}}
264-
<li>{{file_link .}}</li>
265-
{{- end -}}
266-
</ul>
267-
</section>
268-
269261
{{- if .Consts -}}
270262
<section class="Documentation-constants">
271263
<h3 tabindex="-1" id="pkg-constants" class="Documentation-constantsHeader">Constants <a href="#pkg-constants">¶</a></h3>{{"\n"}}
@@ -364,6 +356,15 @@ var htmlPackage = template.Must(template.New("package").Funcs(
364356
</div>
365357
{{- end -}}
366358
</section>
359+
360+
<section class="Documentation-files">
361+
<h3 tabindex="-1" id="pkg-files" class="Documentation-filesHeader">Package Files <a href="#pkg-files">¶</a></h3>
362+
<ul class="Documentation-filesList">
363+
{{- range .Filenames -}}
364+
<li>{{file_link .}}</li>
365+
{{- end -}}
366+
</ul>
367+
</section>
367368
{{- end -}}
368369
{{- end -}}
369370

0 commit comments

Comments
 (0)