blob: 10a89da1a91734e006f2ef7e191ae51bc269ec01 (
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
|
{% import "git.gabrielgio.me/cerrado/pkg/service" %}
{% import "git.gabrielgio.me/cerrado/pkg/u" %}
{% code
type GitListPage struct {
Respositories []*service.Repository
}
%}
{% func (p *GitListPage) Title() %}Git | List{% endfunc %}
{% func (p *GitListPage) Content() %}
{% for _, c := range u.ChunkBy(p.Respositories, 3) %}
<div class="row">
{% for _, r := range c %}
<div class="col-md-4 g-0">
<div class="card">
<div class="card-header">
{%s r.Title %}
</div>
<div class="card-body">
<p class="card-text">{%s r.Description %}</p>
<a href="/{%s r.Name %}" class="btn btn-primary">go to repository</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
{% endfunc %}
{% func (p *GitListPage) Script() %}
{% endfunc %}
|