aboutsummaryrefslogtreecommitdiff
path: root/views/_tree.eta
blob: 2549bb882c87289e156a434b71482943ff8001a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<table>
  <% for (const item of it.items) { %>
    <tr>
      <td>
        <% if (item.contentType === 'directory') { %>
          <img src="/static/icons/folder-simple.svg" alt="tree" class="icon">
          <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/tree/<%= it.branch %>/<%= item.path %>"><%= item.name %></a>
        <% } else { %>
          <img src="/static/icons/file.svg" alt="blob" class="icon">
          <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/blob/<%= it.branch %>/<%= item.path %>"><%= item.name %></a>
        <% } %>
      </td>
    </tr>
  <% } %>
</table>