Personal Git forge.
{{define "repo_dir_view"}}<div class="file-list"> {{if eq .Path ""}} <div class="title"><strong>/ (root)</strong></div> {{else}} <div class="title">{{.Path}}</div> <span class="dir"><a href="{{RepoRoot $.Meta}}/tree/{{$.Branch}}/{{.Parent}}">..</a></span> {{end}} {{range .Files}} {{if .IsDir}} <span class="dir"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path fill="currentColor" d="M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.825a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3m-8.322.12q.322-.119.684-.12h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981z"/> </svg> <a href="{{RepoRoot $.Meta}}/tree/{{$.Branch}}{{$.Path}}/{{.Name}}">{{.Name}}/</a> </span> {{else}} <span class="file"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path fill="currentColor" d="M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0M9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1M4.5 9a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1zM4 10.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m.5 2.5a.5.5 0 0 1 0-1h4a.5.5 0 0 1 0 1z"/> </svg> <a href="{{RepoRoot $.Meta}}/blob/{{$.Branch}}{{$.Path}}/{{.Name}}">{{.Name}}</a> <div class="right"> <span>#{{.ShortHash}}</span> <a href="{{RepoRoot $.Meta}}/raw/{{$.Branch}}{{$.Path}}/{{.Name}}">Raw</a> </div> </span> {{end}} {{else}} <p class="empty">Empty dir.</p> {{end}}</div>{{end}}