cerrado @ 75d3ee252e7d966055bb76258d3e0da28488d261

 1{% import "github.com/go-git/go-git/v5/plumbing/object" %}
 2
 3{% code
 4type GitItemTreePage struct {
 5    CurrentPath string
 6    Tree *object.Tree
 7}
 8%}
 9
10{% func (g *GitItemTreePage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %}
11
12{% func (g *GitItemTreePage) GitContent(name, ref string) %}
13<div class="row">
14  <div class="col-md-12">
15    <div class="tree-list">
16      {% for _, e := range g.Tree.Entries %}
17          <div class="mode">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div>
18          {% if e.Mode.IsFile() %}
19          <div class="name blob"><a href="/{%s name %}/blob/{%s ref%}/{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div>
20          {% else %}
21          <div class="name tree"><a href="./{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div>
22          {% endif %}
23          <div class="commit"></div>
24          <div class="date"></div>
25          <div class="size">{%dl Ignore(g.Tree.Size(e.Name))%} KiB</div>
26      {% endfor %}
27    </div>
28  </div>
29</div>
30{% endfunc %}