1{% import "github.com/go-git/go-git/v5/plumbing" %}
2
3{% code
4type GitItemRefsPage struct {
5 Tags []*plumbing.Reference
6 Branches []*plumbing.Reference
7}
8%}
9
10{% func (g *GitItemRefsPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Refs) %}{% endfunc %}
11
12{% func (g *GitItemRefsPage) GitContent(name, ref string) %}
13<div class="row">
14 <div class="col-md-8">
15 {% if len(g.Tags) > 0 %}
16 <div class="event-list">
17 {% for _, t := range g.Tags %}
18 <div class="row event me-md-2">
19 <div class="col-4">
20 {%s t.Name().Short() %}
21 </div>
22 <div class="col-8">
23 <div class="float-end">
24 <a href="/{%s name %}/tree/{%s t.Name().Short() %}/">tree</a>
25 <a href="/{%s name %}/log/{%s t.Name().Short() %}/">log</a>
26 </div>
27 </div>
28 </div>
29 {% endfor %}
30 </div>
31 {% else %}
32 <p> No tags </p>
33 {% endif %}
34 </div>
35 <div class="col-md-4">
36 <div class="event-list">
37 {% for _, b := range g.Branches %}
38 <div class="row event">
39 <div class="col-4">
40 {%s b.Name().Short() %}
41 </div>
42 <div class="col-8">
43 <div class="float-end">
44 <a href="/{%s name %}/tree/{%s b.Name().Short() %}/">tree</a>
45 <a href="/{%s name %}/log/{%s b.Name().Short() %}/">log</a>
46 </div>
47 </div>
48 </div>
49 {% endfor %}
50 </div>
51 </div>
52</div>
53{% endfunc %}