aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemlog.qtpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/gititemlog.qtpl')
-rw-r--r--templates/gititemlog.qtpl19
1 files changed, 18 insertions, 1 deletions
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() %}
-<h4>Log</h4>
+<div class="logs">
+ {% for _, c := range g.Commits %}
+ <div class="row">
+ <div class="col-sm-2">
+ {%s TimeFormat(c.Committer.When) %}
+ </div>
+ <div class="col-sm-7">
+ <pre>{%s c.Message %}</pre>
+ </div>
+ <div class="col-sm-3">
+ {%s c.Committer.Name %}
+ </div>
+ </div>
+ {% endfor %}
+</div>
{% endfunc %}