| <!-- |
| 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_fixed_header"}} |
| <div class="UnitFixedHeader js-fixedHeader" aria-hidden="true"> |
| <div class="UnitFixedHeader-container"> |
| <a href="https://go.dev/" class="UnitFixedHeader-logoLink" tabindex="-1"> |
| <img class="UnitFixedHeader-logo" src="/static/img/go-logo-blue.svg" alt="Go"> |
| </a> |
| <div class="UnitFixedHeader-moduleInfo"> |
| <span class="UnitFixedHeader-title"> |
| {{if ne .PageType "std"}} |
| <span class="UnitFixedHeader-titleName">{{.Title}}</span> |
| {{else}} |
| <span class="UnitFixedHeader-titleType">Standard library</span> |
| <span class="UnitFixedHeader-titleType UnitFixedHeader-titleType--small">StdLib</span> |
| {{end}} |
| </span> |
| {{with .Breadcrumb}} |
| {{if .CopyData}} |
| <button class="CopyToClipboardButton js-copyToClipboard" |
| title="Copy path to clipboard" |
| data-to-copy="{{.CopyData}}" |
| tabindex="-1"> |
| <img class="CopyToClipboardButton-image" src="/static/img/copy-click.svg" alt=""> |
| </button> |
| {{end}} |
| {{end}} |
| </div> |
| <div class="UnitFixedHeader-overflowingTabList"> |
| <div class="UnitHeaderFixed-detail"> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg"> |
| <a href="?tab=versions" tabindex="-1">Version {{.DisplayVersion}}</a> |
| <!-- Do not reformat the data attributes of the following div: the server uses a regexp to extract them. --> |
| <div class="DetailsHeader-badge $$GODISCOVERY_LATESTMINORCLASS$$" |
| data-version="{{.LinkVersion}}" data-mpath="{{.Unit.ModulePath}}" data-ppath="{{.Unit.Path}}" data-pagetype="{{.PageType}}"> |
| <span>Latest</span> |
| <a href="{{.LatestURL}}">Go to latest</a> |
| </div> |
| </span> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-circularArrows_16x16.svg"> |
| {{.LastCommitTime}} |
| </span> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg"> |
| {{range $i, $e := .Licenses}} |
| {{if $i}}, {{end}} |
| <a href="{{$.CanonicalURLPath}}?tab=licenses#{{.Anchor}}" tabindex="-1">{{$e.Type}}</a> |
| {{else}} |
| <span>None detected</span> |
| <a href="/license-policy" class="Disclaimer-link" tabindex="-1"> |
| <em>not legal advice</em> |
| </a> |
| {{end}} |
| </span> |
| {{if .Unit.IsPackage}} |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--lg"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg"> |
| <a href="{{$.CanonicalURLPath}}?tab=imports" tabindex="-1"> |
| {{len .Unit.Imports}} <span>Imports</span> |
| </a> |
| </span> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--lg"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg"> |
| <a href="{{$.CanonicalURLPath}}?tab=importedby" tabindex="-1"> |
| {{len .Unit.Imports}} <span>Imported by</span> |
| </a> |
| </span> |
| {{end}} |
| </div> |
| <div class="UnitFixedHeader-overflowContainer"> |
| <svg class="UnitFixedHeader-overflowImage" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> |
| <path d="M0 0h24v24H0z" fill="none"/> |
| <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> |
| </svg> |
| <select class="UnitFixedHeader-overflowSelect" onchange="location=this.value" tabindex="-1"> |
| {{range .Tabs}} |
| <option |
| value="{{$.CanonicalURLPath}}?tab={{.Name}}" |
| {{if .Disabled}} |
| disabled |
| data-always-disabled="true" |
| {{end}} |
| {{if eq .Name $.SelectedTab.Name}}selected{{end}} |
| >{{.DisplayName}}</option> |
| {{end}} |
| </select> |
| </div> |
| </div> |
| </div> |
| </div> |
| {{end}} |