aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-05-26 00:05:31 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-05-26 14:41:21 +0200
commit349a3d1ff36a436261b1b65b870f8f262f06584f (patch)
tree25c4d6933c49f818e520ce662ffa15e040877f4d /templates/gitlist.qtpl
parentc06945c189c1d8ef3cedeb51e416ba0fec36368f (diff)
downloadcerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.tar.gz
cerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.tar.bz2
cerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.zip
feat: Add bare bones project list
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 %}