blob: 3469bc7063bc33e047028294544c24351924bb1b [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/css/unit_details.css?version={{.AppVersionLabel}}" rel="stylesheet">
{{end}}
{{define "unit_content"}}
<div class="UnitDetails">
{{if.MobileOutline}}
{{.MobileOutline}}
{{end}}
<div class="UnitDetails-outline">
{{block "unit_outline" .}}{{end}}
</div>
<div class="UnitDetails-content">
{{if .CanShowDetails}}
{{block "unit_readme" .}}{{end}}
{{block "unit_doc" .}}{{end}}
{{block "unit_directories" .}}{{end}}
{{else}}
<h2>“{{.UnitContentName}}” not displayed due to license restrictions.</h2>
See our <a href="/license-policy">license policy</a>.
{{end}}
</div>
<div class="UnitDetails-meta">
{{block "unit_meta" .}}{{end}}
</div>
</div>
<dialog class="JumpDialog Dialog">
<h2 class="Dialog-title">Jump to identifier</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 identifier</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', {async: true, defer: true});
</script>
{{end}}