1{% import "git.gabrielgio.me/cerrado/pkg/service" %}
2{% import "git.gabrielgio.me/cerrado/pkg/u" %}
3
4
5{% code
6type GitListPage struct {
7 Respositories []*service.Repository
8}
9%}
10
11{% func (p *GitListPage) Title() %}Git | List{% endfunc %}
12
13{% func (p *GitListPage) Content() %}
14{% for _, c := range u.ChunkBy(p.Respositories, 3) %}
15<div class="row">
16 {% for _, r := range c %}
17 <div class="col-md g-1">
18 <div class="card">
19 <div class="card-header">
20 <a href="/{%s r.Name %}" class="btn btn-primary">{%s r.Title %}</a>
21 </div>
22 <div class="card-body">
23 <p class="card-text lead">{%s r.LastCommitMessage %}</p>
24 <p class="card-text"><small>{%s r.LastCommitDate %}</small></p>
25 <a href="#" class="card-link">summary</a>
26 <a href="#" class="card-link">log</a>
27 <a href="#" class="card-link">tree</a>
28 </div>
29 </div>
30 </div>
31 {% endfor %}
32</div>
33{% endfor %}
34{% endfunc %}
35
36{% func (p *GitListPage) Script() %}
37{% endfunc %}