| <!-- |
| 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/css/unit_details.css?version={{.AppVersionLabel}}" rel="stylesheet"> |
| {{end}} |
| |
| {{define "unit_content"}} |
| <div class="UnitDetails" data-test-id="UnitDetails"> |
| {{.Details.MobileOutline}} |
| <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/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 (.Experiments.IsActive "directory-tree")}} |
| {{if .Details.Directories}} |
| {{block "unit_directories" .Details}}{{end}} |
| {{end}} |
| {{else}} |
| {{if (or .Details.Subdirectories .Details.NestedModules)}} |
| {{block "legacy_unit_directories" .Details}}{{end}} |
| {{end}} |
| {{end}} |
| </div> |
| <div class="UnitDetails-meta" role="complementary" aria-label="links"> |
| {{block "unit_meta" .}}{{end}} |
| </div> |
| </div> |
| |
| <dialog class="JumpDialog Dialog"> |
| <h2 class="Dialog-title">Jump to</h2> |
| <form method="dialog"> |
| <div class="JumpDialog-filter"> |
| <input class="JumpDialog-input" autocomplete="off" type="text"> |
| </div> |
| <div class="JumpDialog-body"> |
| <div class="JumpDialog-list"></div> |
| </div> |
| <div class="Dialog-actions"> |
| <button class="Dialog-button">Close</button> |
| </div> |
| </form> |
| </dialog> |
| |
| <dialog class="ShortcutsDialog Dialog"> |
| <h2 class="Dialog-title">Keyboard shortcuts</h2> |
| <table> |
| <tbody> |
| <tr><td class="ShortcutsDialog-key"><b>?</b></td><td> : This menu</td></tr> |
| <tr><td class="ShortcutsDialog-key"><b>/</b></td><td> : Search site</td></tr> |
| <tr><td class="ShortcutsDialog-key"><b>f</b> or <b>F</b></td><td> : Jump to</td></tr> |
| </tbody> |
| </table> |
| <form method="dialog"> |
| <div class="Dialog-actions"> |
| <button class="Dialog-button">Close</button> |
| </div> |
| </form> |
| </dialog> |
| {{end}} |
| |
| {{define "unit_post_content"}} |
| <script> |
| loadScript("/static/js/jump.min.js", {async: true, defer: true}); |
| </script> |
| <script> |
| loadScript("/static/js/playground.min.js", {async: true, defer: true}); |
| </script> |
| <script> |
| loadScript('/static/js/sidenav.js', {type: 'module', async: true, defer: true}) |
| </script> |
| {{end}} |