internal/web/templates/tree.html

d298215429fa4946ce82afebe7364ad178725e7b
gitbay/internal/web/templates/tree.html

22 lines · 1197 bytes

 1{{define "title"}}{{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3{{template "repoheader" .}}
 4<div class="pathbar">
 5  <span class="refchip">{{template "branchicon"}} {{.Ref}}</span>
 6  <span class="crumbs"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>/{{range .Crumbs}}<a href="{{.URL}}">{{.Name}}</a>/{{end}}</span>
 7  <span class="spacer"></span>
 8  <span class="clone">clone: <code>git clone {{.CloneURL}}</code></span>
 9</div>
10<table class="tree">
11{{range .Entries}}<tr>
12  {{if eq .Type "tree"}}<td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{$.Ref}}/{{$.Prefix}}{{.Name}}">{{.Name}}/</a></td><td class="size"></td>
13  {{else}}<td class="name"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/blob/{{$.Ref}}/{{$.Prefix}}{{.Name}}">{{.Name}}</a></td><td class="size">{{.Size}}</td>{{end}}
14  <td class="mode">{{.Mode}}</td>
15</tr>
16{{else}}<tr><td class="name empty">this repository is empty — push something:<br><code>git remote add origin {{.CloneURL}}</code></td></tr>{{end}}
17</table>
18{{if .ReadmeHTML}}<section class="readme">
19<div class="cardhead">{{.ReadmeName}}</div>
20<div class="rendered">{{.ReadmeHTML}}</div>
21</section>{{end}}
22{{end}}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form