1<!DOCTYPE html>
2<html>
3 <head>
4 <title>{{.Repo.Name}} - Files</title>
5 <link rel="stylesheet" href="/static/style.css">
6 <link rel="shortcut icon" href="/static/favicon.png">
7 </head>
8 <body>
9 {{template "nav-main.html" .}}
10
11 <main>
12 {{template "nav-repository.html" .}}
13
14 <div class="breadcrumbs">
15 <span>Path:</span>
16 {{if .Path}}
17 <a href="/r/{{.Repo.Name}}/files/?ref={{.CurrentRef}}">{{.Repo.Name}}</a>
18 {{$parts := split .Path "/"}}
19 {{$path := ""}}
20 {{range $i, $part := $parts}}
21 /
22 {{$path = join $path $part}}
23 {{if eq (add $i 1) (len $parts)}}
24 {{$part}}
25 (<a href="/r/{{$.Repo.Name}}/archive/{{$.Path}}?ref={{$.CurrentRef}}">download</a>)
26 {{else}}
27 <a href="/r/{{$.Repo.Name}}/files/{{$path}}?ref={{$.CurrentRef}}">{{$part}}</a>
28 {{end}}
29 {{end}}
30 {{else}}
31 {{.Repo.Name}}
32 {{end}}
33 </div>
34
35 <table>
36 <thead>
37 <tr>
38 <th width="20"></th>
39 <th>Name</th>
40 <th width="100" class="text-right">Mode</th>
41 <th width="100" class="text-right">Size</th>
42 <th width="50" class="text-center">Raw</th>
43 </tr>
44 </thead>
45 <tbody>
46 {{if .Path}}
47 <tr>
48 <td></td>
49 <td colspan="4"><a href="/r/{{.Repo.Name}}/files/{{parent .Path}}?ref={{.CurrentRef}}">..</a></td>
50 </tr>
51 {{end}}
52 {{range .Entries}}
53 <tr>
54 <td class="filetype text-center">{{if .IsDir}}d{{else}}f{{end}}</td>
55 <td>
56 {{if .IsDir}}
57 <a href="/r/{{$.Repo.Name}}/files/{{.Path}}?ref={{$.CurrentRef}}">{{.Name}}/</a>
58 {{else}}
59 <a href="/r/{{$.Repo.Name}}/blob/{{.Path}}?ref={{$.CurrentRef}}">{{.Name}}</a>
60 {{end}}
61 </td>
62 <td class="text-right"><code>{{.Mode}}</code></td>
63 <td class="text-right">{{if not .IsDir}}<code>{{humanize .Size}}</code>{{end}}</td>
64 <td class="text-center">{{if not .IsDir}}<a href="/r/{{$.Repo.Name}}/raw/{{.Path}}?ref={{$.CurrentRef}}">raw</a>{{end}}</td>
65 </tr>
66 {{end}}
67 </tbody>
68 </table>
69 </main>
70
71 {{template "footer.html" .}}
72 </body>
73</html>