tree.page.tmpl
1{{template "base" .}}
2
3{{define "title"}}files - {{.Repo.RepoName}}@{{.RevData.Name}}{{end}}
4{{define "meta"}}{{end}}
5
6{{define "content"}}
7 <div>
8 <div class="breadcrumb">
9 {{range .Tree.Crumbs}}
10 {{if .IsLast}}
11 <span class="breadcrumb__current">{{.Text}}</span>
12 {{else}}
13 <a href="{{.URL}}">{{.Text}}</a> {{if .IsLast}}{{else}}/{{end}}
14 {{end}}
15 {{end}}
16 </div>
17
18 {{range .Tree.Items}}
19 <div class="file-list__row">
20 <div class="file-list__path">
21 {{if .IsDir}}
22 <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="16" width="16" viewBox="0 0 512 512">
23 <path d="M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"/>
24 </svg>
25 {{else}}
26 <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="16" width="16" viewBox="0 0 384 512">
27 <path d="M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"/>
28 </svg>
29 {{end}}
30
31 <a href="{{.URL}}">{{.Name}}</a>
32 </div>
33
34 <div class="file-list__meta">
35 {{if $.Repo.HideTreeLastCommit}}
36 {{else}}
37 <div class="file-list__commit">
38 <a href="{{.CommitURL}}" title="{{.Summary}}">
39 <span class="human-time" data-time="{{.WhenISO}}">{{.WhenDisplay}}</span>
40 </a>
41 </div>
42 {{end}}
43 <div class="file-list__size">
44 {{if .IsDir}}
45 {{else}}
46 {{if .IsTextFile}}{{.NumLines}} L{{else}}{{.Size}}{{end}}
47 {{end}}
48 </div>
49 </div>
50 </div>
51 {{end}}
52 </div>
53{{end}}