aboutsummaryrefslogtreecommitdiff
path: root/templates/commit.qtpl
blob: 2b58864d816b225ff35e20c1301046d41b7bfca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% import "github.com/go-git/go-git/v5/plumbing/object" %}

{% func Commit(name string, c *object.Commit, showTar bool) %}
  <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>
      {% if showTar %}
      <div class="col-md text-md-center">
       <a title="tar.gz for {%s c.Hash.String() %}" href="/{%s name %}/archive/{%s c.Hash.String() %}.tar.gz">tar.gz</a>
      </div>
      {% endif %}
      <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 %}