apps/kepler/templates/tree.html 960 B raw
1
{{define "tree.html"}}{{template "base.html" .}}{{end}}
2
{{define "title"}}{{.Repo.Name}} / {{.Path}} — {{.SiteName}}{{end}}
3
{{define "tabs"}}
4
<a href="/{{.Repo.Name}}" class="tab">home</a>
5
<a href="/{{.Repo.Name}}/log/{{.Ref}}" class="tab">log</a>
6
<a href="/{{.Repo.Name}}/refs" class="tab">refs</a>
7
{{end}}
8
{{define "content"}}
9
<nav class="breadcrumbs">
10
    {{range $i, $b := .Breadcrumbs}}{{if $i}} / {{end}}<a href="{{$b.Href}}">{{$b.Name}}</a>{{end}}
11
</nav>
12
13
<table class="tree-list">
14
    <tbody>
15
        {{range .Entries}}
16
        <tr>
17
            <td>
18
                {{if .IsDir}}
19
                <a href="/{{$.Repo.Name}}/tree/{{$.Ref}}/{{.Path}}">{{.Name}}/</a>
20
                {{else}}
21
                <a href="/{{$.Repo.Name}}/blob/{{$.Ref}}/{{.Path}}">{{.Name}}</a>
22
                {{end}}
23
            </td>
24
            <td class="size">{{if not .IsDir}}{{humanSize .Size}}{{end}}</td>
25
        </tr>
26
        {{end}}
27
    </tbody>
28
</table>
29
{{end}}