Migration
This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs.
Contact me
templates/views/compare.html
3a50036d96eb14462e96598fd169d1c79264ac4b
· 1.0 KB · 28 lines
raw
| 1 | {{ define "compare.html" }}{{ template "base" . }}{{ end }} |
| 2 | {{ define "main" }} |
| 3 | {{ $c := mod "compare" }} |
| 4 | <header class="page-head"> |
| 5 | <h1>Compare</h1> |
| 6 | <p class="sub"> |
| 7 | <code>{{ $c.Base }}</code> |
| 8 | <span class="dots">{{ if $c.ThreeDot }}…{{ else }}‥{{ end }}</span> |
| 9 | <code>{{ $c.Head }}</code> |
| 10 | </p> |
| 11 | </header> |
| 12 | |
| 13 | <dl class="facts"> |
| 14 | <dt>base</dt><dd><a href="{{ print "/" .Info.Slug }}/commit/{{ $c.BaseSHA }}"><code>{{ trunc 12 $c.BaseSHA }}</code></a></dd> |
| 15 | <dt>head</dt><dd><a href="{{ print "/" .Info.Slug }}/commit/{{ $c.HeadSHA }}"><code>{{ trunc 12 $c.HeadSHA }}</code></a></dd> |
| 16 | {{ with $c.MergeBase }}<dt>merge base</dt><dd><code>{{ trunc 12 . }}</code></dd>{{ end }} |
| 17 | <dt>commits</dt><dd>{{ len $c.Commits }}</dd> |
| 18 | </dl> |
| 19 | |
| 20 | {{ template "diffstat" (dict "Base" (print "/" .Info.Slug) "Ref" $c.HeadSHA "Diff" $c.Diff) }} |
| 21 | |
| 22 | {{ with $c.Commits }} |
| 23 | <h2>Commits</h2> |
| 24 | {{ template "commit-table" (dict "Base" (print "/" $.Info.Slug) "Commits" .) }} |
| 25 | {{ end }} |
| 26 | |
| 27 | {{ with $c.Diff.Patch }}<h2>Patch</h2>{{ patch . }}{{ end }} |
| 28 | {{ end }} |