diff options
Diffstat (limited to 'templates/gititemrefs.qtpl')
-rw-r--r-- | templates/gititemrefs.qtpl | 38 |
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 %} |