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