From 4ea63e98cc999ab05d1ac98b64875d7413e86972 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sat, 1 Jun 2024 17:20:59 +0200 Subject: feat: Add initial log --- templates/gititemlog.qtpl | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'templates/gititemlog.qtpl') diff --git a/templates/gititemlog.qtpl b/templates/gititemlog.qtpl index ae88a52..a39fb77 100644 --- a/templates/gititemlog.qtpl +++ b/templates/gititemlog.qtpl @@ -1,10 +1,27 @@ +{% import "github.com/go-git/go-git/v5/plumbing/object" %} + {% code type GitItemLogPage struct { + Commits []*object.Commit } %} {% func (g *GitItemLogPage) Nav(name string) %}{%= GitItemNav(name, Log) %}{% endfunc %} {% func (g *GitItemLogPage) GitContent() %} -

Log

+
+ {% for _, c := range g.Commits %} +
+
+ {%s TimeFormat(c.Committer.When) %} +
+
+
{%s c.Message %}
+
+
+ {%s c.Committer.Name %} +
+
+ {% endfor %} +
{% endfunc %} -- cgit v1.2.3