aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
blob: 3d7ef822b9bae8b6debebe51796799f2417513ed (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
{% import "git.gabrielgio.me/cerrado/pkg/service" %}

{% code
type GitListPage struct {
    Respositories []*service.Repository
}
%}

{% func (p *GitListPage) Title() %}Git | List{% endfunc %}

{% func (p *GitListPage) Navbar() %}{%= Navbar(Git) %}{% endfunc %}

{% func (p *GitListPage) Content() %}
<div class="row">
  <div class="col-md-8 offset-md-2">
    <div class="event-list">
      {% for _, r := range p.Respositories %}
      <div class="event">
        <h4>
          <a href="/{%s r.Name %}">{%s r.Name %}</a>
        </h4>
        </hr>
        <p>{%s r.LastCommitMessage %}</p>
        <p><small>{%s r.LastCommitDate %}</small></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>
  {% endfunc %}
  </div>
</div>

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