Migration
This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs.
Contact me
templates/views/blob.html
3a50036d96eb14462e96598fd169d1c79264ac4b
· 890 B · 21 lines
raw
| 1 | {{ define "blob.html" }}{{ template "base" . }}{{ end }} |
| 2 | {{ define "main" }} |
| 3 | {{ $b := mod "blob" }}{{ $slug := print "/" .Info.Slug }} |
| 4 | <header class="page-head"> |
| 5 | <nav class="crumbs"> |
| 6 | <a href="{{ $slug }}/tree/{{ .Ref }}">{{ .Info.Title }}</a> |
| 7 | <span class="slash">/</span><span class="here">{{ $b.Path }}</span> |
| 8 | </nav> |
| 9 | <p class="sub"> |
| 10 | <code>{{ .Ref }}</code> · {{ bytes64 $b.Size }}{{ if not $b.Binary }} · {{ len $b.Lines }} lines{{ end }} |
| 11 | · <a class="ghost" href="{{ $slug }}/raw/{{ .Ref }}/{{ $b.Path }}">raw</a> |
| 12 | </p> |
| 13 | </header> |
| 14 | {{ if $b.Binary }} |
| 15 | <p class="notice">Binary file. Fetch it with <code>raw</code>.</p> |
| 16 | {{ else }} |
| 17 | <div class="source"><table><tbody> |
| 18 | {{ range $b.Lines }}<tr id="L{{ .N }}"><td class="ln"><a href="#L{{ .N }}">{{ .N }}</a></td><td class="lc">{{ .Text }}</td></tr> |
| 19 | {{ end }}</tbody></table></div> |
| 20 | {{ end }} |
| 21 | {{ end }} |