cerrado @ v0.0.18

 1{% import "git.gabrielgio.me/cerrado/pkg/service" %}
 2{% import "context" %}
 3
 4{% code
 5type GitListPage struct {
 6    Respositories []*service.Repository
 7    About []byte
 8}
 9%}
10
11{% func (p *GitListPage) Title(ctx context.Context) %}Git | List{% endfunc %}
12
13{% func (p *GitListPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Git) %}{% endfunc %}
14
15{% func (p *GitListPage) Content(ctx context.Context) %}
16<div class="row">
17  <div class="col-md-6 order-last order-md-first">
18    <div class="event-list">
19      {% for _, r := range p.Respositories %}
20      <div class="event">
21        <div class="row">
22          <div class="col-md">
23              <a href="/{%s r.Name %}/">{%s r.Name %}</a>
24          </div>
25          <div class="col-md text-md-end">
26            <small>{% if !r.Public %}private{% endif %}</small>
27          </div>
28        </div>
29        </hr>
30        <p>{%s r.Description %}</p>
31        <p>
32          <a href="/{%s r.Name %}/log/{%s r.Ref %}/">log</a>
33          <a href="/{%s r.Name %}/tree/{%s r.Ref %}/">tree</a>
34          <a href="/{%s r.Name %}/refs/">refs</a>
35        </p>
36      </div>
37      {% endfor %}
38    </div>
39  </div>
40  <div id="about" class="col-md-4 order-first order-md-last">
41    {%z= p.About %}
42    <div class="alert alert-warning text-center" role="alert">
43        This project is under development, things may be broken or incomplete.
44    </div>
45  </div>
46</div>
47{% endfunc %}
48
49{% func (p *GitListPage) Script(ctx context.Context) %}
50{% endfunc %}