aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
blob: fa470089e9f4fd64c066822ec1c849628ddd4f1e (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
{% 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">
        <h4>
          <a href="/{%s r.Name %}/">{%s r.Name %}</a>
        </h4>
        </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 %}