diff options
| author | Joe Mou <dev@mou.fo> | 2026-01-25 16:27:48 -0500 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-01-25 17:46:15 -0500 |
| commit | 7132094f28ca2dc08c32f207ade9c63a28952115 (patch) | |
| tree | 103f64b974ea709e810832dcce5c0625ff55bc1c /views/_tree.eta | |
| parent | 27588cba68a2594da8a41d8d3ebaecaadb3ab2f2 (diff) | |
Repository page with info
Diffstat (limited to 'views/_tree.eta')
| -rw-r--r-- | views/_tree.eta | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/views/_tree.eta b/views/_tree.eta new file mode 100644 index 0000000..ac7b2b1 --- /dev/null +++ b/views/_tree.eta @@ -0,0 +1,14 @@ +<table> + <% for (const item of it.items) { %> + <tr> + <td> + <span class="icon"><%= item.contentType === 'directory' ? '📁' : '📄' %></span> + <% if (item.contentType === 'directory') { %> + <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/tree/<%= it.branch %>/<%= item.path %>"><%= item.name %></a> + <% } else { %> + <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/blob/<%= it.branch %>/<%= item.path %>"><%= item.name %></a> + <% } %> + </td> + </tr> + <% } %> +</table> |
