diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-07-07 20:28:42 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-07-07 21:44:29 +0200 |
commit | 44bc8e4078a09857ad86691a83e7ba7d4e3a69c4 (patch) | |
tree | 6788cafeaac286d381cc69e1917dab6ae58d1f85 /templates/tags.qtpl | |
parent | 8dff852753a1c4a708fd87e3cbb0f4844803aa95 (diff) | |
download | cerrado-44bc8e4078a09857ad86691a83e7ba7d4e3a69c4.tar.gz cerrado-44bc8e4078a09857ad86691a83e7ba7d4e3a69c4.tar.bz2 cerrado-44bc8e4078a09857ad86691a83e7ba7d4e3a69c4.zip |
ref: Simplify path builder code
Diffstat (limited to 'templates/tags.qtpl')
-rw-r--r-- | templates/tags.qtpl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/templates/tags.qtpl b/templates/tags.qtpl new file mode 100644 index 0000000..5cd617f --- /dev/null +++ b/templates/tags.qtpl @@ -0,0 +1,31 @@ +{% import "git.gabrielgio.me/cerrado/pkg/git" %} + +{% func ListTags(name string, tags []*git.TagReference) %} +{% if len(tags) > 0 %} +<div class="event-list"> + {% for _, t := range tags %} + <div class="event me-md-2"> + <div class="row "> + <div class="col-4"> + <a title="{%s t.HashString() %}" href="/{%s name %}/commit/{%s t.HashString() %}">{%s t.ShortName() %}</a> + </div> + <div class="col-8"> + <div class="float-end"> + <a href="/{%s name %}/archive/{%s t.ShortName() %}.tar.gz">tar.gz</a> + <a href="/{%s name %}/tree/{%s t.ShortName() %}/">tree</a> + <a href="/{%s name %}/log/{%s t.ShortName() %}/">log</a> + </div> + </div> + </div> + {% if t.Message() != "" %} + <div class="code-view"> + <pre>{%s t.Message() %}</pre> + </div> + {% endif %} + </div> + {% endfor %} +</div> +{% else %} + <p> No tags </p> +{% endif %} +{% endfunc %} |