blob: aea5f8528b20c9d0d3f8db0c31791f0a456d301a [file] [log] [blame]
<!--
Copyright 2020 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 "unit_outline"}}
<div class="UnitOutline js-accordion">
<div class="UnitOutline-jumpTo">
<button class="UnitOutline-jumpToInput js-jumpToInput"{{if (not .DocOutline.String)}} disabled{{end}}>
Jump to
</button>
</div>
{{if .Readme.String}}
<a href="?readme=expanded#section-readme" class="UnitOutline-accordion js-accordionTrigger js-readmeExpand"
role="button" aria-expanded="false" aria-controls="readme-panel" id="readme-accordion">
README
</a>
<div class="UnitOutline-panel js-accordionPanel"
id="readme-panel" role="region" aria-labelledby="readme-accordion" aria-hidden="true"></div>
{{end}}
{{if .IsPackage}}
<a class="UnitOutline-accordion js-accordionTrigger" href="#section-documentation"
role="button" aria-expanded="false" aria-controls="outline-panel" id="outline-accordion">
Documentation
</a>
<div class="UnitOutline-panel js-accordionPanel"
id="outline-panel" role="region" aria-labelledby="outline-accordion" aria-hidden="true">
<div class="Documentation">
{{.DocOutline}}
</div>
</div>
{{end}}
{{if .SourceFiles}}
<a class="UnitOutline-accordion js-accordionTrigger" href="#section-sourcefiles"
role="button" aria-expanded="false" aria-controls="files-panel" id="files-accordion">
Source Files
</a>
<div class="UnitOutline-panel js-accordionPanel"
id="files-panel" role="region" aria-labelledby="files-accordion" aria-hidden="true"></div>
{{end}}
{{if (or .Subdirectories .NestedModules)}}
<a class="UnitOutline-accordion js-accordionTrigger" href="#section-directories"
role="button" aria-expanded="false" aria-controls="directories-panel" id="directories-accordion">
Directories
</a>
<div class="UnitOutline-panel js-accordionPanel"
id="directories-panel" role="region" aria-labelledby="directories-accordion" aria-hidden="true"></div>
{{end}}
</div>
{{end}}