diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-05-26 00:05:31 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-05-26 14:41:21 +0200 |
commit | 349a3d1ff36a436261b1b65b870f8f262f06584f (patch) | |
tree | 25c4d6933c49f818e520ce662ffa15e040877f4d /templates/gitlist.qtpl | |
parent | c06945c189c1d8ef3cedeb51e416ba0fec36368f (diff) | |
download | cerrado-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.qtpl | 34 |
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 %} |