aboutsummaryrefslogtreecommitdiff
path: root/views/_tree.eta
blob: ac7b2b1baf20c7050ef389ee1863bf4132f6610f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>