aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemlog.qtpl
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 17:20:59 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 17:20:59 +0200
commit4ea63e98cc999ab05d1ac98b64875d7413e86972 (patch)
tree0edf4f1a65fd53d0e2d6e5bcbbafb5a71faa6cc7 /templates/gititemlog.qtpl
parent8f5f9ff24b0327f7640e3619de109e1f19cfba1d (diff)
downloadcerrado-4ea63e98cc999ab05d1ac98b64875d7413e86972.tar.gz
cerrado-4ea63e98cc999ab05d1ac98b64875d7413e86972.tar.bz2
cerrado-4ea63e98cc999ab05d1ac98b64875d7413e86972.zip
feat: Add initial log
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 %}