1{{define "content"}}
2<nav aria-label="breadcrumb">
3 <ul>
4 <li><a href="/{{.Repo.Name}}">{{.Repo.Name}}</a></li>
5 <li aria-current="page">{{.Commit.ID | shortHash}}</li>
6 </ul>
7</nav>
8
9<header>
10 <h2 id="commit-heading">{{.Commit.Message | commitSubject}}</h2>
11 {{$body := .Commit.Message | commitBody}}
12 {{if $body}}
13 <pre><code>{{$body}}</code></pre>
14 {{end}}
15 <dl aria-label="Commit metadata">
16 <dt>Author</dt>
17 <dd>{{.Commit.Author.Name}} <{{.Commit.Author.Email}}></dd>
18
19 <dt>Date</dt>
20 <dd><time datetime="{{.Commit.Author.When | rfc3339}}">{{.Commit.Author.When | formatDate}}</time></dd>
21
22 <dt>Commit</dt>
23 <dd><code>{{.Commit.ID}}</code></dd>
24
25 {{if .ParentIDs}}
26 <dt>Parent{{if gt (len .ParentIDs) 1}}s{{end}}</dt>
27 <dd>
28 {{range $i, $parent := .ParentIDs}}{{if $i}}, {{end}}<code><a href="/{{$.Repo.Name}}/commit/{{$parent}}">{{$parent | shortHash}}</a></code>{{end}}
29 </dd>
30 {{end}}
31 </dl>
32
33 <nav aria-label="Commit actions">
34 <ul>
35 <li><a href="/{{.Repo.Name}}/tree/{{.Commit.ID}}">Browse file tree</a></li>
36 </ul>
37 </nav>
38</header>
39
40<section aria-labelledby="changes-heading">
41 <h3 id="changes-heading">Change summary</h3>
42 <pre aria-label="Diff statistics"><code>{{.Diff.Stats}}</code></pre>
43</section>
44
45<section aria-labelledby="diff-heading">
46 <h3 id="diff-heading">Detailed changes</h3>
47 {{range .Diff.Files}}
48 <article aria-labelledby="file-{{.Name}}">
49 <h4 id="file-{{.Name}}">
50 {{if ne .OldName .Name}}
51 {{.OldName}} → <a href="/{{$.Repo.Name}}/blob/{{$.Commit.ID}}/{{.Name}}">{{.Name}}</a>
52 {{else}}
53 <a href="/{{$.Repo.Name}}/blob/{{$.Commit.ID}}/{{.Name}}">{{.Name}}</a>
54 {{end}}
55 <small><a href="#file-{{.Name}}" class="secondary" title="Link to heading for {{.Name}}">🔗</a></small>
56 </h4>
57 <pre aria-label="Diff for {{.Name}}"><code>{{range .Sections}}{{range .Lines}}{{if eq .Type 2}}<ins>{{.Content}}</ins>{{else if eq .Type 3}}<del>{{.Content}}</del>{{else}}{{.Content}}{{end}}
58{{end}}{{end}}</code></pre>
59 </article>
60 {{end}}
61</section>
62{{end}}