internal/web/templates/commit.html

19 lines · 1279 bytes

 1{{define "width"}}wide{{end}}
 2{{define "title"}}{{.ShortSHA}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<div class="commithead setcard">
 5  <div class="pagehead">
 6    <h1>Commit <code>{{.ShortSHA}}</code></h1>
 7    <span class="grow"></span>
 8    <button type="button" class="btn" data-copy="{{.SHA}}">Copy SHA</button>
 9  </div>
10  <p class="meta"><code class="fullsha">{{.SHA}}</code></p>
11  {{if .Parents}}<p class="meta">parent{{if gt (len .Parents) 1}}s{{end}}:{{range .Parents}} <code><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.}}">{{short .}}</a></code>{{end}}</p>{{end}}
12  <p>{{template "sigbadge" .Sig}}{{range .Checks}} <span class="badge check-{{.State}}">{{.Context}}: {{.State}}</span>{{end}}</p>
13  <p class="meta">{{template "authorname" dict "Name" .AuthorName "User" .AuthorUser "Email" .AuthorEmail}} &lt;{{.AuthorEmail}}&gt; · {{when .Date}}
14  {{if .CommitterEmail}}<br>committer: &lt;{{.CommitterEmail}}&gt;{{end}}</p>
15  <pre class="message" tabindex="0">{{.Message}}</pre>
16</div>
17{{if .DiffTruncated}}<p class="error" role="alert">This patch is larger than 4 MiB and is cut off below. Clone the repository to see all of it.</p>{{end}}
18{{template "difffiles" dict "Files" .DiffFiles "Base" "" "Viewer" "" "L" .Layout}}
19{{end}}