| <!-- |
| 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 eq .PageType "std"}} |
| <span class="UnitFixedHeader-titleType">Standard library</span> |
| <span class="UnitFixedHeader-titleType UnitFixedHeader-titleType--small">StdLib</span> |
| {{else}} |
| <span class="UnitFixedHeader-titleName">{{.Title}}</span> |
| {{end}} |
| </span> |
| {{with .Breadcrumb}} |
| {{if .CopyData}} |
| <button class="CopyToClipboardButton js-copyToClipboard" |
| title="Copy path to clipboard. {{.CopyData}}" |
| 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"> |
| {{if (eq .SelectedTab.Name "")}} |
| <div class="UnitHeaderFixed-detail"> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg" alt=""> |
| <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" alt=""> |
| {{.Details.CommitTime}} |
| </span> |
| <span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg" alt=""> |
| {{- if .Unit.IsRedistributable -}} |
| <a href="{{$.URLPath}}?tab=licenses" tabindex="-1"> |
| {{- range $i, $e := .Details.Licenses -}} |
| {{if $i}}, {{end}}{{$e.Type}} |
| {{- end -}} |
| </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" alt=""> |
| <a href="{{$.URLPath}}?tab=imports" tabindex="-1"> |
| {{.Details.NumImports}} <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" alt=""> |
| <a href="{{$.URLPath}}?tab=importedby" tabindex="-1"> |
| {{.Details.ImportedByCount}} <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 js-overflowSelect" tabindex="-1"> |
| <option>Main</option> |
| <option value="{{$.URLPath}}?tab=versions"> |
| Versions |
| </option> |
| <option value="{{$.URLPath}}?tab=licenses"> |
| Licenses |
| </option> |
| {{if .Unit.IsPackage}} |
| <option value="{{$.URLPath}}?tab=imports"> |
| Imports |
| </option> |
| <option value="{{$.URLPath}}?tab=importedby"> |
| Imported By |
| </option> |
| {{end}} |
| </select> |
| </div> |
| {{else}} |
| <a class="UnitFixedHeader-backLink" href="{{.URLPath}}"> |
| <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg" alt=""> Go to main page |
| </a> |
| {{end}} |
| </div> |
| </div> |
| </div> |
| {{end}} |