blob: 8141edefd1ad15d32b55dc28a9a2bc611e66fc4b [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 "module_list"}}
{{range $major := .}}
<h2>
{{.Major}}
{{if not (eq $major.ModulePath "std")}}
<span class="Versions-modulePath"> &ndash; {{$major.ModulePath}}</span>
{{end}}
</h2>
<ul class="Versions-list">
{{range $v := $major.Versions}}
<li class="Versions-item">
<a href="{{$v.Link}}">{{$v.Version}}</a>
<span class="Versions-commitTime"> &ndash; {{$v.CommitTime}}</span>
</li>
{{end}}
</ul>
{{end}}
{{end}}
{{define "versions"}}
<div class="Versions">
{{if or .OtherModules .ThisModule}}
{{if .OtherModules}}
<h2>Versions in this module</h2>
{{end}}
{{if .ThisModule}}
{{template "module_list" .ThisModule}}
{{else}}
<p class="Versions-message">There are no tagged versions of this module.</p>
{{end}}
{{if .OtherModules}}
<h2>Other modules containing this package</h2>
{{template "module_list" .OtherModules}}
{{end}}
{{else}}
{{template "empty_content" "No other known versions of this package!"}}
{{end}}
</div>
{{end}}