blob: 9c755dbe7a9c75a0a1a6f414daaef81a3e371a1f [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_pre_content"}}
<link href="/static/legacy/css/unit_details.css?version={{.AppVersionLabel}}" rel="stylesheet">
{{end}}
{{define "unit_content"}}
<div class="UnitDetails" data-test-id="UnitDetails">
{{block "unit_outline_mobile" .Details}}{{end}}
<div class="UnitDetails-outline" role="navigation"
aria-label="{{if eq .PageType "std"}}module
{{else}}{{.PageType}}{{end}}details navigation">
{{block "unit_outline" .Details}}{{end}}
</div>
<div class="UnitDetails-content js-unitDetailsContent" role="main" data-test-id="UnitDetails-content">
{{if .Details.Readme.String}}
{{block "unit_readme" .Details}}{{end}}
{{end}}
{{if .Details.IsPackage}}
{{if .Unit.IsRedistributable}}
{{block "unit_doc" .Details}}{{end}}
{{else}}
<div class="UnitDetails-contentEmpty">
<img src="/static/legacy/img/gopher-airplane.svg" alt="The Go Gopher"/>
<p>Documentation not displayed due to license restrictions.</p>
<p>See our <a href="/license-policy">license policy</a>.</p>
</div>
{{end}}
{{end}}
{{if .Details.SourceFiles}}
{{block "unit_files" .Details}}{{end}}
{{end}}
{{if .Details.Directories}}
{{block "unit_directories" .Details}}{{end}}
{{end}}
</div>
<div class="UnitDetails-meta" role="complementary" aria-label="links">
{{block "unit_meta" .}}{{end}}
</div>
</div>
{{end}}
{{define "unit_post_content"}}
<script>
loadScript("/static/legacy/js/jump.js", {type: 'module', async: true, defer: true});
</script>
<script>
loadScript("/static/legacy/js/playground.js", {type: 'module', async: true, defer: true});
</script>
<script>
loadScript('/static/legacy/js/sidenav.js', {type: 'module', async: true, defer: true})
</script>
{{end}}