cerrado @ 92c57a05fab452c1de83131498552424c9c5b598

 1{% import "github.com/go-git/go-git/v5/plumbing" %}
 2{% import "github.com/go-git/go-git/v5/plumbing/object" %}
 3{% import "git.gabrielgio.me/cerrado/pkg/git" %}
 4
 5{% code
 6type GitItemSummaryPage struct {
 7    Tags []*git.TagReference
 8    Branches []*plumbing.Reference
 9    Commits []*object.Commit
10}
11%}
12
13{% func (g *GitItemSummaryPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Summary) %}{% endfunc %}
14
15{% func (g *GitItemSummaryPage) GitContent(name, ref string) %}
16<div class="row">
17  <div class="col-md-8">
18    {%= ListTags(name, g.Tags) %}
19  </div>
20  <div class="col-md-4">
21    <div class="event-list">
22      {% for _, b := range g.Branches %}
23      <div class="row event">
24          <div class="col-4">
25           {%s b.Name().Short() %}
26          </div>
27          <div class="col-8">
28            <div class="float-end">
29              <a href="/{%s name %}/archive/{%s b.Name().Short() %}.tar.gz">tar.gz</a>
30              <a href="/{%s name %}/tree/{%s b.Name().Short() %}/">tree</a>
31              <a href="/{%s name %}/log/{%s b.Name().Short() %}/">log</a>
32            </div>
33          </div>
34      </div>
35      {% endfor %}
36    </div>
37  </div>
38</div>
39<div class="row">
40  <div class="event-list">
41    {% for _, c := range g.Commits %}
42    {%= Commit(name, c, false) %}
43    {% endfor %}
44  </div>
45</div>
46{% endfunc %}