gunk-dev/the-valley

tree.tmpl

source818bd30431eamain's published tip history
1.2 KiB
1{{define "content"}}
2{{template "project-head" .Head}}
3<h1>{{.Project}}</h1>
4{{template "source-head" .}}
5<div class="card">
6 <table class="listing">
7 <tbody>
8 {{- range .Entries}}
9 <tr><td class="name">{{if .URL}}<a href="{{.URL}}">{{.Name}}{{if eq .Kind "directory"}}/{{end}}</a>{{else}}{{.Name}}{{end}}</td><td class="kind">{{.Kind}}</td><td class="size">{{.Size}}</td></tr>
10 {{- else}}
11 <tr><td class="muted">This directory is empty.</td></tr>
12 {{- end}}
13 </tbody>
14 </table>
15 {{- if .Partial}}
16 <p class="notice">This directory is larger than a page reads, so only part of it is listed.</p>
17 {{- else if .Omitted}}
18 <p class="notice">{{.Omitted}} more entries are not listed.</p>
19 {{- end}}
20</div>
21{{- with .Readme}}
22<section class="panel" aria-labelledby="README">
23 <h2 id="README"><a href="{{.URL}}">{{.Name}}</a></h2>
24 <div class="card">{{if .Notice}}<p class="notice">{{.Notice}}</p>{{else}}{{if .Partial}}<p class="notice">This README is longer than a page shows, and only its start is shown.</p>{{end}}{{with .Doc}}{{template "document" .}}{{else}}<pre class="text">{{.Text}}</pre>{{end}}{{end}}</div>
25</section>
26{{- end}}
27{{end}}
28{{define "source-download"}}
29 <a href="{{.ArchiveURL}}">Download .tar.gz</a>
30{{- end}}