cerrado @ 75d3ee252e7d966055bb76258d3e0da28488d261

ref: Redo commit cell
diff --git a/templates/commit.qtpl b/templates/commit.qtpl
new file mode 100644
index 0000000000000000000000000000000000000000..307017214fafd55d950c5c810bc0e8ac60e7a74b
--- /dev/null
+++ b/templates/commit.qtpl
@@ -0,0 +1,17 @@
+{% import "github.com/go-git/go-git/v5/plumbing/object" %}
+
+{% func Commit(name string, c *object.Commit) %}
+  <div class="row event">
+    <div class="row">
+      <div class="col-md">
+       <a title="{%s c.Hash.String() %}" href="/{%s name %}/commit/{%s c.Hash.String() %}">{%s c.Hash.String()[0:8] %}</a>
+      </div>
+      <div class="col-md text-md-end">
+       <a title="{%s c.Committer.Email %}" href="mailto:{%s c.Committer.Email %}">{%s c.Committer.Name %}</a>
+      </div>
+    </div>
+    <div class="code-view">
+     <pre>{%s c.Message %}</pre>
+    </div>
+  </div>
+{% endfunc %}
diff --git a/templates/commit.qtpl.go b/templates/commit.qtpl.go
new file mode 100644
index 0000000000000000000000000000000000000000..7f4649928a5d7a7c49f91dadb008170a30dc8d12
--- /dev/null
+++ b/templates/commit.qtpl.go
@@ -0,0 +1,100 @@
+// Code generated by qtc from "commit.qtpl". DO NOT EDIT.
+// See https://github.com/valyala/quicktemplate for details.
+
+//line commit.qtpl:1
+package templates
+
+//line commit.qtpl:1
+import "github.com/go-git/go-git/v5/plumbing/object"
+
+//line commit.qtpl:3
+import (
+	qtio422016 "io"
+
+	qt422016 "github.com/valyala/quicktemplate"
+)
+
+//line commit.qtpl:3
+var (
+	_ = qtio422016.Copy
+	_ = qt422016.AcquireByteBuffer
+)
+
+//line commit.qtpl:3
+func StreamCommit(qw422016 *qt422016.Writer, name string, c *object.Commit) {
+//line commit.qtpl:3
+	qw422016.N().S(`
+  <div class="row event">
+    <div class="row">
+      <div class="col-md">
+       <a title="`)
+//line commit.qtpl:7
+	qw422016.E().S(c.Hash.String())
+//line commit.qtpl:7
+	qw422016.N().S(`" href="/`)
+//line commit.qtpl:7
+	qw422016.E().S(name)
+//line commit.qtpl:7
+	qw422016.N().S(`/commit/`)
+//line commit.qtpl:7
+	qw422016.E().S(c.Hash.String())
+//line commit.qtpl:7
+	qw422016.N().S(`">`)
+//line commit.qtpl:7
+	qw422016.E().S(c.Hash.String()[0:8])
+//line commit.qtpl:7
+	qw422016.N().S(`</a>
+      </div>
+      <div class="col-md text-md-end">
+       <a title="`)
+//line commit.qtpl:10
+	qw422016.E().S(c.Committer.Email)
+//line commit.qtpl:10
+	qw422016.N().S(`" href="mailto:`)
+//line commit.qtpl:10
+	qw422016.E().S(c.Committer.Email)
+//line commit.qtpl:10
+	qw422016.N().S(`">`)
+//line commit.qtpl:10
+	qw422016.E().S(c.Committer.Name)
+//line commit.qtpl:10
+	qw422016.N().S(`</a>
+      </div>
+    </div>
+    <div class="code-view">
+     <pre>`)
+//line commit.qtpl:14
+	qw422016.E().S(c.Message)
+//line commit.qtpl:14
+	qw422016.N().S(`</pre>
+    </div>
+  </div>
+`)
+//line commit.qtpl:17
+}
+
+//line commit.qtpl:17
+func WriteCommit(qq422016 qtio422016.Writer, name string, c *object.Commit) {
+//line commit.qtpl:17
+	qw422016 := qt422016.AcquireWriter(qq422016)
+//line commit.qtpl:17
+	StreamCommit(qw422016, name, c)
+//line commit.qtpl:17
+	qt422016.ReleaseWriter(qw422016)
+//line commit.qtpl:17
+}
+
+//line commit.qtpl:17
+func Commit(name string, c *object.Commit) string {
+//line commit.qtpl:17
+	qb422016 := qt422016.AcquireByteBuffer()
+//line commit.qtpl:17
+	WriteCommit(qb422016, name, c)
+//line commit.qtpl:17
+	qs422016 := string(qb422016.B)
+//line commit.qtpl:17
+	qt422016.ReleaseByteBuffer(qb422016)
+//line commit.qtpl:17
+	return qs422016
+//line commit.qtpl:17
+}
diff --git a/templates/gititemlog.qtpl b/templates/gititemlog.qtpl
index 3588d32403566a2b260c68d8d50c2b176671ad22..ee3841c25c6d12058955b1e3054f64cf2801837a 100644
--- a/templates/gititemlog.qtpl
+++ b/templates/gititemlog.qtpl
@@ -11,18 +11,7 @@
 {% func (g *GitItemLogPage) GitContent(name, ref string) %}
 <div class="event-list">
   {% for _, c := range g.Commits %}
-  <div class="row event">
-
-      <div class="col-xxl-2">
-       {%s TimeFormat(c.Committer.When) %}
-      </div>
-      <div class="col-xxl-7 code-view">
-       <pre>{%s c.Message %}</pre>
-      </div>
-      <div class="col-xxl-3">
-       <small>{%s c.Committer.Name %} &lt;{%s c.Committer.Email %}&gt;</small>
-      </div>
-  </div>
+  {%= Commit(name, c) %}
   {% endfor %}
 </div>
 {% endfunc %}
diff --git a/templates/gititemlog.qtpl.go b/templates/gititemlog.qtpl.go
index b950d1550a22169e8ca085849ca1ddad5dfb4aea..da8167aaed77dad2b6c6ea84a38e77ea9415f284 100644
--- a/templates/gititemlog.qtpl.go
+++ b/templates/gititemlog.qtpl.go
@@ -68,66 +68,43 @@ //line gititemlog.qtpl:13
 	for _, c := range g.Commits {
 //line gititemlog.qtpl:13
 		qw422016.N().S(`
-  <div class="row event">
-
-      <div class="col-xxl-2">
-       `)
-//line gititemlog.qtpl:17
-		qw422016.E().S(TimeFormat(c.Committer.When))
-//line gititemlog.qtpl:17
+  `)
+//line gititemlog.qtpl:14
+		StreamCommit(qw422016, name, c)
+//line gititemlog.qtpl:14
 		qw422016.N().S(`
-      </div>
-      <div class="col-xxl-7 code-view">
-       <pre>`)
-//line gititemlog.qtpl:20
-		qw422016.E().S(c.Message)
-//line gititemlog.qtpl:20
-		qw422016.N().S(`</pre>
-      </div>
-      <div class="col-xxl-3">
-       <small>`)
-//line gititemlog.qtpl:23
-		qw422016.E().S(c.Committer.Name)
-//line gititemlog.qtpl:23
-		qw422016.N().S(` &lt;`)
-//line gititemlog.qtpl:23
-		qw422016.E().S(c.Committer.Email)
-//line gititemlog.qtpl:23
-		qw422016.N().S(`&gt;</small>
-      </div>
-  </div>
   `)
-//line gititemlog.qtpl:26
+//line gititemlog.qtpl:15
 	}
-//line gititemlog.qtpl:26
+//line gititemlog.qtpl:15
 	qw422016.N().S(`
 </div>
 `)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 }
 
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 func (g *GitItemLogPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	qw422016 := qt422016.AcquireWriter(qq422016)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	g.StreamGitContent(qw422016, name, ref)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	qt422016.ReleaseWriter(qw422016)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 }
 
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 func (g *GitItemLogPage) GitContent(name, ref string) string {
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	qb422016 := qt422016.AcquireByteBuffer()
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	g.WriteGitContent(qb422016, name, ref)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	qs422016 := string(qb422016.B)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	qt422016.ReleaseByteBuffer(qb422016)
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 	return qs422016
-//line gititemlog.qtpl:28
+//line gititemlog.qtpl:17
 }
diff --git a/templates/gititemsummary.qtpl b/templates/gititemsummary.qtpl
index 06a785ad74913ce89927a32daff49b18529e9159..ef2c534df5b1d5ab85760c7de436b83d5f041e7c 100644
--- a/templates/gititemsummary.qtpl
+++ b/templates/gititemsummary.qtpl
@@ -44,6 +44,7 @@            {%s b.Name().Short() %}
           </div>
           <div class="col-8">
             <div class="float-end">
+              <a href="/{%s name %}/archive/{%s b.Name().Short() %}.tar.gz">tar.gz</a>
               <a href="/{%s name %}/tree/{%s b.Name().Short() %}/">tree</a>
               <a href="/{%s name %}/log/{%s b.Name().Short() %}/">log</a>
             </div>
@@ -56,17 +57,7 @@ </div>
 <div class="row">
   <div class="event-list">
     {% for _, c := range g.Commits %}
-    <div class="row event">
-        <div class="col-xxl-2">
-         {%s TimeFormat(c.Committer.When) %}
-        </div>
-        <div class="col-xxl-7 code-view">
-         <pre>{%s c.Message %}</pre>
-        </div>
-        <div class="col-xxl-3">
-         <small>{%s c.Committer.Name %} &lt;{%s c.Committer.Email %}&gt;</small>
-        </div>
-    </div>
+    {%= Commit(name, c) %}
     {% endfor %}
   </div>
 </div>
diff --git a/templates/gititemsummary.qtpl.go b/templates/gititemsummary.qtpl.go
index 4e48efd0da70a6301114cfd65ef9929f96804953..570a95501376383761ed6eeaf38d4e7d25c765ad 100644
--- a/templates/gititemsummary.qtpl.go
+++ b/templates/gititemsummary.qtpl.go
@@ -159,27 +159,36 @@               <a href="/`)
 //line gititemsummary.qtpl:47
 		qw422016.E().S(name)
 //line gititemsummary.qtpl:47
-		qw422016.N().S(`/tree/`)
+		qw422016.N().S(`/archive/`)
 //line gititemsummary.qtpl:47
 		qw422016.E().S(b.Name().Short())
 //line gititemsummary.qtpl:47
-		qw422016.N().S(`/">tree</a>
+		qw422016.N().S(`.tar.gz">tar.gz</a>
               <a href="/`)
 //line gititemsummary.qtpl:48
 		qw422016.E().S(name)
 //line gititemsummary.qtpl:48
-		qw422016.N().S(`/log/`)
+		qw422016.N().S(`/tree/`)
 //line gititemsummary.qtpl:48
 		qw422016.E().S(b.Name().Short())
 //line gititemsummary.qtpl:48
+		qw422016.N().S(`/">tree</a>
+              <a href="/`)
+//line gititemsummary.qtpl:49
+		qw422016.E().S(name)
+//line gititemsummary.qtpl:49
+		qw422016.N().S(`/log/`)
+//line gititemsummary.qtpl:49
+		qw422016.E().S(b.Name().Short())
+//line gititemsummary.qtpl:49
 		qw422016.N().S(`/">log</a>
             </div>
           </div>
       </div>
       `)
-//line gititemsummary.qtpl:52
+//line gititemsummary.qtpl:53
 	}
-//line gititemsummary.qtpl:52
+//line gititemsummary.qtpl:53
 	qw422016.N().S(`
     </div>
   </div>
@@ -187,70 +196,48 @@ </div>
 <div class="row">
   <div class="event-list">
     `)
-//line gititemsummary.qtpl:58
+//line gititemsummary.qtpl:59
 	for _, c := range g.Commits {
-//line gititemsummary.qtpl:58
+//line gititemsummary.qtpl:59
 		qw422016.N().S(`
-    <div class="row event">
-        <div class="col-xxl-2">
-         `)
-//line gititemsummary.qtpl:61
-		qw422016.E().S(TimeFormat(c.Committer.When))
-//line gititemsummary.qtpl:61
+    `)
+//line gititemsummary.qtpl:60
+		StreamCommit(qw422016, name, c)
+//line gititemsummary.qtpl:60
 		qw422016.N().S(`
-        </div>
-        <div class="col-xxl-7 code-view">
-         <pre>`)
-//line gititemsummary.qtpl:64
-		qw422016.E().S(c.Message)
-//line gititemsummary.qtpl:64
-		qw422016.N().S(`</pre>
-        </div>
-        <div class="col-xxl-3">
-         <small>`)
-//line gititemsummary.qtpl:67
-		qw422016.E().S(c.Committer.Name)
-//line gititemsummary.qtpl:67
-		qw422016.N().S(` &lt;`)
-//line gititemsummary.qtpl:67
-		qw422016.E().S(c.Committer.Email)
-//line gititemsummary.qtpl:67
-		qw422016.N().S(`&gt;</small>
-        </div>
-    </div>
     `)
-//line gititemsummary.qtpl:70
+//line gititemsummary.qtpl:61
 	}
-//line gititemsummary.qtpl:70
+//line gititemsummary.qtpl:61
 	qw422016.N().S(`
   </div>
 </div>
 `)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 }
 
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 func (g *GitItemSummaryPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	qw422016 := qt422016.AcquireWriter(qq422016)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	g.StreamGitContent(qw422016, name, ref)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	qt422016.ReleaseWriter(qw422016)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 }
 
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 func (g *GitItemSummaryPage) GitContent(name, ref string) string {
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	qb422016 := qt422016.AcquireByteBuffer()
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	g.WriteGitContent(qb422016, name, ref)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	qs422016 := string(qb422016.B)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	qt422016.ReleaseByteBuffer(qb422016)
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 	return qs422016
-//line gititemsummary.qtpl:73
+//line gititemsummary.qtpl:64
 }