aboutsummaryrefslogtreecommitdiff
path: root/views/tree.eta
blob: 911b7eefba73c2ce139329d9ef093c7f7753ec98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<% layout("./layout") %>

<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>