| 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"> |
| 10 | @include 'layout/repo_menu.html' |
| 11 | |
| 12 | <div class="commit-page"> |
| 13 | <div class="commit-page__header"> |
| 14 | <h1 class="commit-page__title">@commit.message</h1> |
| 15 | <div class="commit-page__meta"> |
| 16 | <span class="commit-page__author">@commit.author</span> |
| 17 | <span class="commit-page__time">%commit_committed @commit.relative()</span> |
| 18 | <span class="commit-page__sep">·</span> |
| 19 | <code class="commit-page__hash">@commit.hash</code> |
| 20 | <a class="commit-page__browse" href="/@repo.user_name/@repo.name/tree/@commit.hash" title="%browse_repo_at_point" aria-label="%browse_repo_at_point"> |
| 21 | <svg aria-hidden="true" focusable="false" viewBox="0 0 16 16"><path fill="currentColor" d="M4.72 3.22a.75.75 0 0 1 1.06 1.06L2.06 8l3.72 3.72a.75.75 0 1 1-1.06 1.06L.47 8.53a.75.75 0 0 1 0-1.06Zm6.56 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.94 8l-3.72-3.72a.75.75 0 0 1 0-1.06Z"/></svg> |
| 22 | </a> |
| 23 | <a class="commit-page__patch" href="@patch_url">%commit_view_patch</a> |
| 24 | </div> |
| 25 | <div class="commit-page__stats"> |
| 26 | <span class="commit-page__files">@file_diffs.len %commit_files_changed</span> |
| 27 | <span class="commit-page__adds">+@all_adds</span> |
| 28 | <span class="commit-page__dels">-@all_dels</span> |
| 29 | </div> |
| 30 | </div> |
| 31 | |
| 32 | @if file_diffs.len == 0 |
| 33 | <div class="commit-page__empty">%commit_no_changes</div> |
| 34 | @else |
| 35 | @for fd in file_diffs |
| 36 | <div class="pr-diff" id="[email protected]"> |
| 37 | <div class="pr-diff__header"> |
| 38 | <span class="pr-diff__path"> |
| 39 | @if fd.is_renamed && fd.old_path != fd.path |
| 40 | <span class="pr-diff__tag">%commit_file_renamed</span> |
| 41 | <span class="pr-diff__oldpath">@fd.old_path →</span> |
| 42 | @end |
| 43 | @fd.path |
| 44 | @if fd.is_new |
| 45 | <span class="pr-diff__tag pr-diff__tag--new">%commit_file_new</span> |
| 46 | @end |
| 47 | @if fd.is_deleted |
| 48 | <span class="pr-diff__tag pr-diff__tag--deleted">%commit_file_deleted</span> |
| 49 | @end |
| 50 | </span> |
| 51 | <span class="pr-diff__counts"> |
| 52 | <span class="pr-diff__add">[email protected]</span> |
| 53 | <span class="pr-diff__del">[email protected]</span> |
| 54 | </span> |
| 55 | </div> |
| 56 | @if fd.is_binary |
| 57 | <div class="pr-diff__binary">%commit_binary_file</div> |
| 58 | @else |
| 59 | <table class="pr-diff__table"> |
| 60 | @for hunk in fd.hunks |
| 61 | <tr class="pr-diff__hunk-header"> |
| 62 | <td colspan="4"><code>@hunk.header</code></td> |
| 63 | </tr> |
| 64 | @for dline in hunk.lines |
| 65 | <tr class="pr-diff__row [email protected]"> |
| 66 | <td class="pr-diff__lineno">@{dline.old_line_str()}</td> |
| 67 | <td class="pr-diff__lineno">@{dline.new_line_str()}</td> |
| 68 | <td class="pr-diff__sign">@{dline.sign()}</td> |
| 69 | <td class="pr-diff__content"><pre>@{render_diff_line(dline.content, fd.path)}</pre></td> |
| 70 | </tr> |
| 71 | @end |
| 72 | @end |
| 73 | </table> |
| 74 | @end |
| 75 | </div> |
| 76 | @end |
| 77 | @end |
| 78 | </div> |
| 79 | </div> |
| 80 | |
| 81 | @include 'layout/footer.html' |
| 82 | </body> |
| 83 | </html> |
| 84 | |