showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
refs.html
1.5 KB · 28 lines
1{{define "content" -}}2{{template "repohead" .}}3{{- $r := .Repo}}{{$kind := .Kind}}4<section class="box">5 <h2 class="box-head">{{if eq $kind "tags"}}{{template "icon" "tag"}}{{else}}{{template "icon" "branch"}}{{end}}{{len .Refs}} {{if eq (len .Refs) 1}}{{slice $kind 0 (len $kind | dec)}}{{else}}{{$kind}}{{end}}</h2>6 {{- if .Refs}}7 <ol class="rows">8 {{- range .Refs}}{{$href := $r.CommitHref .Hash}}9 <li class="row">10 <span class="pkg-icon">{{if eq $kind "tags"}}{{template "icon" "tag"}}{{else}}{{template "icon" "branch"}}{{end}}</span>11 <div class="row-main">12 <span class="row-title">13 {{- if and (eq $kind "branches") (eq .Name $r.DefaultBranch)}}<a href="/{{$r.Name}}/">{{.Name}}</a><span class="badge">default</span>14 {{- else if and (eq $kind "tags") ($r.Release .Name)}}<a href="/{{$r.Name}}/releases/#{{.Name}}">{{.Name}}</a>15 {{- else}}{{.Name}}{{end}}</span>16 <span class="row-sub">{{if $href}}<a href="{{$href}}">{{.Subject}}</a>{{else}}{{.Subject}}{{end}}</span>17 </div>18 <time class="{{fresh .When}}" datetime="{{.When.Format "2006-01-02T15:04:05Z07:00"}}">{{ago .When}}</time>19 {{template "sha" (dict "R" $r "Hash" .Hash "Href" $href)}}20 </li>21 {{- end}}22 </ol>23 {{- else}}24 <p class="box-note empty-inline">{{template "icon" (or (and (eq $kind "tags") "tag") "branch")}}None yet.</p>25 {{- end}}26</section>27{{- if eq $kind "branches"}}<p class="hint">Only the default branch is browsable here. Clone the repository for the others.</p>{{end}}28{{- end}}