blob: fc047ebf4a7f8946462124d017d6d9def0c9f76c (
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
|
{% import "git.gabrielgio.me/cerrado/pkg/service" %}
{% import "context" %}
{% code
type GitListPage struct {
Respositories []*service.Repository
About []byte
}
%}
{% func (p *GitListPage) Title(ctx context.Context) %}Git | List{% endfunc %}
{% func (p *GitListPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Git) %}{% endfunc %}
{% func (p *GitListPage) Content(ctx context.Context) %}
<div class="row">
<div class="col-md-6 order-last order-md-first">
<div class="event-list">
{% for _, r := range p.Respositories %}
<div class="event">
<div class="row">
<div class="col-md">
<a href="/{%s r.Name %}/">{%s r.Name %}</a>
</div>
<div class="col-md text-md-end">
<small>{% if !r.Public %}private{% endif %}</small>
</div>
</div>
</hr>
<p>{%s r.Description %}</p>
<p>
<a href="/{%s r.Name %}/log/{%s r.Ref %}/">log</a>
<a href="/{%s r.Name %}/tree/{%s r.Ref %}/">tree</a>
<a href="/{%s r.Name %}/refs/">refs</a>
</p>
</div>
{% endfor %}
</div>
</div>
<div id="about" class="col-md-4 order-first order-md-last">
{%z= p.About %}
<div class="alert alert-warning text-center" role="alert">
This project is under development, things may be broken or incomplete.
</div>
</div>
</div>
{% endfunc %}
{% func (p *GitListPage) Script(ctx context.Context) %}
{% endfunc %}
|