aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/gitlist.qtpl')
-rw-r--r--templates/gitlist.qtpl34
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl
new file mode 100644
index 0000000..10a89da
--- /dev/null
+++ b/templates/gitlist.qtpl
@@ -0,0 +1,34 @@
+{% 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-4 g-0">
+ <div class="card">
+ <div class="card-header">
+ {%s r.Title %}
+ </div>
+ <div class="card-body">
+ <p class="card-text">{%s r.Description %}</p>
+ <a href="/{%s r.Name %}" class="btn btn-primary">go to repository</a>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+</div>
+{% endfor %}
+{% endfunc %}
+
+{% func (p *GitListPage) Script() %}
+{% endfunc %}