| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | @include 'layout/head.html' |
| 5 | </head> |
| 6 | <body> |
| 7 | @include 'layout/header.html' |
| 8 | |
| 9 | <div class="content blob-page"> |
| 10 | <div class="blob-breadcrumb"> |
| 11 | @for i, p in ctx.path_split |
| 12 | <a class="blob-breadcrumb__link" href="/@repo.user_name/@{ctx.make_path(branch_name, i)}">@p</a> |
| 13 | <span class="blob-breadcrumb__sep">/</span> |
| 14 | @end |
| 15 | <strong class="blob-breadcrumb__file">@file.name</strong> |
| 16 | </div> |
| 17 | |
| 18 | <div class="blob-toolbar"> |
| 19 | <div class="blob-toolbar__stats"> |
| 20 | <span class="blob-stat"><b>${loc}</b> lines</span> |
| 21 | <span class="blob-toolbar__dot">·</span> |
| 22 | <span class="blob-stat"><b>${sloc}</b> sloc</span> |
| 23 | <span class="blob-toolbar__dot">·</span> |
| 24 | <span class="blob-stat">${file.pretty_size()}</span> |
| 25 | @if file.last_hash != '' |
| 26 | <span class="blob-toolbar__dot">·</span> |
| 27 | <a class="blob-stat blob-stat--hash" href="/@repo.user_name/@repo.name/commit/@file.last_hash">@file.last_hash</a> |
| 28 | @end |
| 29 | </div> |
| 30 | <div class="blob-toolbar__actions"> |
| 31 | <a class="blob-action" href="@raw_url" target="_blank">Raw</a> |
| 32 | @if repo.user_id == ctx.user.id |
| 33 | <a class="blob-action" href="/@username/@repo_name/edit/@branch_name/@path">Edit</a> |
| 34 | @end |
| 35 | </div> |
| 36 | </div> |
| 37 | |
| 38 | @if is_markdown |
| 39 | <div class="blob-content blob-content__markdown"> |
| 40 | @source |
| 41 | </div> |
| 42 | @else |
| 43 | <pre class="blob-content blob-content__code">@source</pre> |
| 44 | @end |
| 45 | </div> |
| 46 | |
| 47 | @include 'layout/footer.html' |
| 48 | </body> |
| 49 | </html> |
| 50 | |