diff options
Diffstat (limited to 'templates/gititemsummary.qtpl')
-rw-r--r-- | templates/gititemsummary.qtpl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/gititemsummary.qtpl b/templates/gititemsummary.qtpl index f39a613..7f56837 100644 --- a/templates/gititemsummary.qtpl +++ b/templates/gititemsummary.qtpl @@ -1,3 +1,4 @@ +{% import "net/url" %} {% import "github.com/go-git/go-git/v5/plumbing" %} {% import "git.gabrielgio.me/cerrado/pkg/git" %} @@ -6,12 +7,26 @@ type GitItemSummaryPage struct { Tags []*git.TagReference Branches []*plumbing.Reference Commits []*git.CommitReference + Hostname string } %} +{% code + +func mergeURL(hostname, name string) string { + s, _ := url.JoinPath(hostname, name) + return s +} + +%} + {% func (g *GitItemSummaryPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Summary) %}{% endfunc %} {% func (g *GitItemSummaryPage) GitContent(name, ref string) %} +<div class="row event"> + <div class="col-auto">clone: </div> + <div class="col-md">{%s mergeURL(g.Hostname, name) %}</div> +</div> <div class="row"> <div class="col-md-8"> {%= ListTags(name, g.Tags) %} |