diff options
Diffstat (limited to 'templates/gititemrefs.qtpl')
-rw-r--r-- | templates/gititemrefs.qtpl | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl index 6244082..9f4f74b 100644 --- a/templates/gititemrefs.qtpl +++ b/templates/gititemrefs.qtpl @@ -1,8 +1,9 @@ {% import "github.com/go-git/go-git/v5/plumbing" %} +{% import "git.gabrielgio.me/cerrado/pkg/git" %} {% code type GitItemRefsPage struct { - Tags []*plumbing.Reference + Tags []*git.TagReference Branches []*plumbing.Reference } %} @@ -12,26 +13,7 @@ type GitItemRefsPage struct { {% func (g *GitItemRefsPage) GitContent(name, ref string) %} <div class="row"> <div class="col-md-8"> - {% if len(g.Tags) > 0 %} - <div class="event-list"> - {% for _, t := range g.Tags %} - <div class="row event me-md-2"> - <div class="col-4"> - {%s t.Name().Short() %} - </div> - <div class="col-8"> - <div class="float-end"> - <a href="/{%s name %}/archive/{%s t.Name().Short() %}.tar.gz">tar.gz</a> - <a href="/{%s name %}/tree/{%s t.Name().Short() %}/">tree</a> - <a href="/{%s name %}/log/{%s t.Name().Short() %}/">log</a> - </div> - </div> - </div> - {% endfor %} - </div> - {% else %} - <p> No tags </p> - {% endif %} + {%= ListTags(name, g.Tags) %} </div> <div class="col-md-4"> <div class="event-list"> |