aboutsummaryrefslogtreecommitdiff
path: root/templates/commit.qtpl
blob: dc6eae466e552b01fe1c0bb2f113a5b904281c72 (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.Author.Email %}">{%s c.Author.Name %}</a>
      </div>
    </div>
    <div class="code-view">
     <pre>{%s c.Message %}</pre>
    </div>
  </div>
{% endfunc %}