aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
blob: 84a42f944fbfbd91ab43d14fc93c03a35a3092aa (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
{% 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 g-1">
    <div class="card">
      <div class="card-header">
        <a href="/{%s r.Name %}" class="btn btn-primary">{%s r.Title %}</a>
      </div>
      <div class="card-body">
        <p class="card-text lead">{%s r.LastCommitMessage %}</p> 
        <p class="card-text"><small>{%s r.LastCommitDate %}</small></p> 
        <a href="#" class="card-link">summary</a>
        <a href="#" class="card-link">log</a>
        <a href="#" class="card-link">tree</a>
      </div>
    </div>
  </div>
  {% endfor %}
</div>
{% endfor %}
{% endfunc %}

{% func (p *GitListPage) Script() %}
{% endfunc %}