diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-07-02 20:45:16 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-07-02 20:45:16 +0200 |
commit | d1638198df3a65fe89bfb28f6e1dd285877b55bc (patch) | |
tree | d7532d4f346e3ad8cf36ae95e365e79f8aa334e5 /templates/gititemsummary.qtpl | |
parent | cb6060a60d71ce1be1591bb10f499916155160de (diff) | |
download | cerrado-1a318c35745e1f75629aeb3e106a1842116facdc.tar.gz cerrado-1a318c35745e1f75629aeb3e106a1842116facdc.tar.bz2 cerrado-1a318c35745e1f75629aeb3e106a1842116facdc.zip |
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) %} |