blob: e6fcf059c05dd0f81df6fa61a421d9e8c4e1a311 [file] [log] [blame]
<!--
Copyright 2019 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{define "importedby"}}
<div class="ImportedBy">
{{if .ImportedBy}}
<b>Known {{pluralize .Total "importer"}}:</b> {{.NumImportedByDisplay}}
{{template "sections" .ImportedBy}}
{{else}}
{{template "empty_content" "No known importers for this package!"}}
{{end}}
</div>
{{end}}
{{define "sections"}}
<ul class="ImportedBy-list">
{{range .}}
{{template "section" .}}
{{end}}
</ul>
{{end}}
{{define "section"}}
{{if .Subs}}
<details>
<summary>{{.Prefix}} ({{.NumLines}})</summary>
<div class="ImportedBy-detailsContent">
{{template "sections" .Subs}}
</div>
</details>
{{else}}
<li class="ImportedBy-detailsIndent"><a class="u-breakWord" href="/{{.Prefix}}">{{.Prefix}}</a></li>
{{end}}
{{end}}