aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemrefs.qtpl
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 18:24:22 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 18:24:22 +0200
commitf1643ffcbd543cacfe9ab5e46eafdd0c39cd47fd (patch)
treea24d3cbb625f642c25cdc14124b8971fa9bfeb04 /templates/gititemrefs.qtpl
parent4ea63e98cc999ab05d1ac98b64875d7413e86972 (diff)
downloadcerrado-f1643ffcbd543cacfe9ab5e46eafdd0c39cd47fd.tar.gz
cerrado-f1643ffcbd543cacfe9ab5e46eafdd0c39cd47fd.tar.bz2
cerrado-f1643ffcbd543cacfe9ab5e46eafdd0c39cd47fd.zip
feat: Add refs page
UI now it is a broken state. I'll all pages working first so I can better style it later.
Diffstat (limited to 'templates/gititemrefs.qtpl')
-rw-r--r--templates/gititemrefs.qtpl38
1 files changed, 37 insertions, 1 deletions
diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl
index 5fed393..9c58863 100644
--- a/templates/gititemrefs.qtpl
+++ b/templates/gititemrefs.qtpl
@@ -1,10 +1,46 @@
+{% import "github.com/go-git/go-git/v5/plumbing" %}
+{% import "github.com/go-git/go-git/v5/plumbing/object" %}
+
{% code
type GitItemRefsPage struct {
+ Tags []*object.Tag
+ Branches []*plumbing.Reference
}
%}
{% func (g *GitItemRefsPage) Nav(name string) %}{%= GitItemNav(name ,Refs) %}{% endfunc %}
{% func (g *GitItemRefsPage) GitContent() %}
-<h4>Refs</h4>
+<div class="row">
+ <div class="col-xxl">
+ <h4>Tags</h4>
+ <div class="logs">
+ {% for _, t := range g.Tags %}
+ <div class="row">
+ <div class="col-xxl-2">
+ {%s TimeFormat(t.Tagger.When) %}
+ </div>
+ <div class="col-xxl-7">
+ <pre>{%s t.Message %}</pre>
+ </div>
+ <div class="col-xxl-3">
+ <small>{%s t.Tagger.Name %}</small>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ <div class="col-xxl">
+ <h4>Branches</h4>
+ <div class="logs">
+ {% for _, b := range g.Branches %}
+ <div class="row">
+ <div class="col-xxl">
+ {%s b.String() %}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+</div>
{% endfunc %}