diff options
| author | Joe Mou <dev@mou.fo> | 2026-09-18 07:27:21 +0100 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-09-18 07:27:21 +0100 |
| commit | 9659525bf2387af6deab9d401784b94b1f44d395 (patch) | |
| tree | c67dc1dd05bf2a8fa48dc123d6353d255a658ef1 /cgithub/views/commits.eta | |
| parent | 9819d8e5504d6f03d27ec6b8786eec8fe5a752a5 (diff) | |
| parent | 01494e6fa1345a509560e5e19a7f08cb2aac5cc8 (diff) | |
Diffstat (limited to 'cgithub/views/commits.eta')
| -rw-r--r-- | cgithub/views/commits.eta | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cgithub/views/commits.eta b/cgithub/views/commits.eta new file mode 100644 index 0000000..a80ef07 --- /dev/null +++ b/cgithub/views/commits.eta @@ -0,0 +1,33 @@ +<% layout("/layouts/repo.eta") %> + +<%~ include("./_nav.eta", {...it, view: "commits"}) %> + +<% const pathSuffix = it.path && it.path !== "/" ? "/" + it.path : "" %> + +<% if (it.commitGroups.length === 0) { %> + <div class="box">No commits found.</div> +<% } %> + +<% for (const group of it.commitGroups) { %> + <h3><%= group.title %></h3> + <% for (const commit of group.commits) { %> + <div class="commit"> + <div> + <div> + <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/commit/<%= commit.oid %>"><%= commit.shortMessage %></a> + </div> + <div class="commit-author"> + by + <% for (const author of commit.authors) { %> + <a href="/<%= author.login %>"><%= author.login %></a> + <% } %> + </div> + </div> + <div class="commit-sha"> + <code><%= commit.oid.substring(0, 7) %></code> + <% /* Like GitHub, blindly link to blob and redirect for trees */ %> + <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/blob/<%= commit.oid %><%= pathSuffix %>">Browse</a> + </div> + </div> + <% } %> +<% } %> |
