1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | {{define "body"}}
{{- with .Listing}}
<div class="page">
{{- if .IsRoot}}
<section class="repo-head">
<h1>{{$.Repo}}</h1>
{{- if $.Description}}
<p class="desc">{{$.Description}}</p>
{{- end}}
{{- if $.Tags}}
<ul class="tags" aria-label="Tags">{{range $.Tags}}<li class="tag">{{.}}</li>{{end}}</ul>
{{- end}}
{{- with $.Stats}}
{{- if .Code}}
<div class="langs code" aria-label="Lines of code by language">
<span class="pill total" title="{{.CodeTitle}}">Code <b>{{count .CodeLines}} lines</b></span>
{{- range .Code}}<a class="pill" href="{{.URL}}" title="{{.Title}}">{{.Name}} <b>{{count .Count}}</b></a>{{end}}
</div>
{{- end}}
{{- if .Docs}}
<div class="langs docs" aria-label="Words of documentation by format">
<span class="pill total" title="{{.DocsTitle}}">Docs <b>{{count .DocWords}} words</b></span>
{{- range .Docs}}<a class="pill" href="{{.URL}}" title="{{.Title}}">{{.Name}} <b>{{count .Count}}</b></a>{{end}}
</div>
{{- end}}
{{- if .Binary}}
<div class="langs binary" aria-label="Bytes of binary data by format">
<span class="pill total" title="{{.BinaryTitle}}">Binary data <b>{{bytes .BinaryBytes}}</b></span>
{{- range .Binary}}<a class="pill" href="{{.URL}}" title="{{.Title}}">{{.Name}} <b>{{bytes .Count}}</b></a>{{end}}
</div>
{{- end}}
{{- end}}
</section>
{{- else}}
<h1 class="dir-title pathbar">{{template "path-items" $}}</h1>
{{- end}}
{{- if .More}}
<input type="checkbox" id="more" class="vis" aria-label="Show all entries">
{{- end}}
<table class="files">
<thead><tr><th>Name</th><th class="when">Modified</th><th class="bar lines">Lines</th><th class="bar size">Size</th></tr></thead>
<tbody>
{{- template "entries" .Entries}}
{{- if .More}}
<tr class="more-row"><td colspan="4"><label for="more"><span class="chev" aria-hidden="true">▶</span> {{.More}} more…</label></td></tr>
<tr class="less-row"><td colspan="4"><label for="more"><span class="chev" aria-hidden="true">▶</span> Show fewer</label></td></tr>
{{- end}}
</tbody>
</table>
{{- with .Readme}}
<article class="readme">
<h2 class="readme-title"><a href="{{.URL}}">{{.Name}}</a></h2>
{{- if .Pre}}
<pre class="plain">{{.Text}}</pre>
{{- else}}
<div class="markdown">{{.HTML}}</div>
{{- end}}
</article>
{{- end}}
</div>
{{- end}}
{{end}}
|