aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/gitlist.qtpl')
-rw-r--r--templates/gitlist.qtpl15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl
index fc047eb..4f25fc6 100644
--- a/templates/gitlist.qtpl
+++ b/templates/gitlist.qtpl
@@ -1,5 +1,6 @@
{% import "git.gabrielgio.me/cerrado/pkg/service" %}
{% import "context" %}
+{% import "strings" %}
{% code
type GitListPage struct {
@@ -8,6 +9,16 @@ type GitListPage struct {
}
%}
+
+{% code func firstLine(text string) string {
+ lines := strings.Split(text, "\n")
+ if len(lines) > 0 {
+ return lines[0]
+ }
+ return ""
+}
+%}
+
{% func (p *GitListPage) Title(ctx context.Context) %}Git | List{% endfunc %}
{% func (p *GitListPage) Navbar(ctx context.Context) %}{%= Navbar(ctx, Git) %}{% endfunc %}
@@ -28,6 +39,10 @@ type GitListPage struct {
</div>
</hr>
<p>{%s r.Description %}</p>
+ <p style="background: #dadada">
+ <a title="{%s r.LastCommit.Hash.String() %}" href="/{%s r.Name %}/commit/{%s r.LastCommit.Hash.String() %}/">{%s r.LastCommit.Hash.String()[0:8] %}</a> -
+ <a title="{%s r.LastCommit.Author.Email %}">{%s r.LastCommit.Author.Name %}</a> -
+ {%s firstLine(r.LastCommit.Message) %}</p>
<p>
<a href="/{%s r.Name %}/log/{%s r.Ref %}/">log</a>
<a href="/{%s r.Name %}/tree/{%s r.Ref %}/">tree</a>