profileShare

rasmusjy / profileshare

Read-only snapshot

No repository description.

main default branch 54 files Expires Sep 13, 2026, 9:06 AM
diff-file.ejs 2,325 bytes
1 <details class="diff-file" id="diff-<%= diffIndex %>" open>
2 <summary class="diff-file-header">
3 <svg class="diff-chevron" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="M4 2.2 7.8 6 4 9.8Z"/></svg>
4 <span class="diff-status diff-status-<%= changed.status %>"><%= changed.status %></span>
5 <span class="diff-file-name">
6 <% if (changed.previousFilename) { %><span class="diff-rename-from"><%= changed.previousFilename %></span><span class="diff-rename-arrow" aria-hidden="true">&rarr;</span><% } %>
7 <span class="diff-file-path"><%= changed.filename %></span>
8 </span>
9 <span class="diff-file-stat">
10 <span class="diff-added">+<%= changed.additions %></span>
11 <span class="diff-removed">&minus;<%= changed.deletions %></span>
12 <span class="diff-blocks" aria-hidden="true"><% diffBlocks(changed.additions, changed.deletions).forEach((block) => { %><i class="<%= block %>"></i><% }) %></span>
13 </span>
14 <button class="diff-copy" type="button" data-copy-text="<%= changed.filename %>">Copy path</button>
15 </summary>
16 <% if (!changed.patch) { %>
17 <p class="empty-state">Line changes are not available for this file.</p>
18 <% } else { %>
19 <div class="diff-body">
20 <table class="diff-table" aria-label="Changed lines in <%= changed.filename %>">
21 <colgroup><col class="diff-col-num"><col class="diff-col-num"><col></colgroup>
22 <tbody>
23 <% parseDiff(changed.patch).forEach((hunk) => { %>
24 <% if (hunk.range) { %>
25 <tr class="diff-row diff-row-hunk">
26 <td class="diff-gutter"></td>
27 <td class="diff-gutter"></td>
28 <td class="diff-code"><span class="hunk-range"><%= hunk.range %></span><% if (hunk.heading) { %><span class="hunk-heading"><%= hunk.heading %></span><% } %></td>
29 </tr>
30 <% } %>
31 <% hunk.lines.forEach((line) => { %>
32 <tr class="diff-row diff-row-<%= line.type %>">
33 <td class="diff-gutter"><%= line.oldNumber || "" %></td>
34 <td class="diff-gutter"><%= line.newNumber || "" %></td>
35 <td class="diff-code"><%= line.text %></td>
36 </tr>
37 <% }) %>
38 <% }) %>
39 </tbody>
40 </table>
41 </div>
42 <% } %>
43 </details>
44