Migration
This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs.
Contact me
templates/views/commit.html
3a50036d96eb14462e96598fd169d1c79264ac4b
· 922 B · 20 lines
raw
| 1 | {{ define "commit.html" }}{{ template "base" . }}{{ end }} |
| 2 | {{ define "main" }} |
| 3 | {{ $c := mod "commit" }}{{ $d := mod "diff" }}{{ $slug := print "/" .Info.Slug }} |
| 4 | <header class="page-head"> |
| 5 | <h1 class="subject">{{ $c.Subject }}</h1> |
| 6 | <p class="sub">{{ $c.Author }} committed <time datetime="{{ rfc3339 $c.When }}">{{ date $c.When }}</time></p> |
| 7 | </header> |
| 8 | <dl class="facts"> |
| 9 | <dt>commit</dt><dd><code class="full-sha">{{ $c.SHA }}</code></dd> |
| 10 | {{ with $c.Parents }}<dt>parent{{ if gt (len .) 1 }}s{{ end }}</dt><dd> |
| 11 | {{ range . }}<a href="{{ $slug }}/commit/{{ . }}"><code>{{ trunc 12 . }}</code></a> |
| 12 | <a class="ghost" href="{{ $slug }}/compare/{{ . }}..{{ $c.SHA }}">diff</a>{{ end }} |
| 13 | </dd>{{ end }} |
| 14 | </dl> |
| 15 | {{ with $c.Body }}<pre class="message">{{ . }}</pre>{{ end }} |
| 16 | |
| 17 | <h2>Changed files</h2> |
| 18 | {{ template "diffstat" (dict "Base" $slug "Ref" $c.SHA "Diff" $d) }} |
| 19 | {{ with $d.Patch }}{{ patch . }}{{ end }} |
| 20 | {{ end }} |