summaryrefslogtreecommitdiff
path: root/cgithub/views/repo.eta
blob: 1bff97f2335834e48d1260155d8e951c8e68c304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<% layout("./layout.eta") %>

<% if (it.info) { %>
  <div class="box repo-info">
    <% if (it.info.description) { %>
      <div class="description"><%= it.info.description %></div>
    <% } %>
    <% if (it.info.website) { %>
      <div class="detail"><img src="/static/icons/link.svg" alt="" class="icon"> <a href="<%= it.info.website %>" rel="noopener noreferrer"><%= it.info.website %></a></div>
    <% } %>
    <% if (it.info.stars) { %>
      <span class="detail"><img src="/static/icons/star.svg" alt="stars" class="icon"> <%= it.info.stars %></span>
    <% } %>
    <% if (it.info.forks) { %>
      <span class="detail"><img src="/static/icons/git-fork.svg" alt="forks" class="icon"> <%= it.info.forks %></span>
    <% } %>
    <% if (it.info.numReleases) { %>
      <div class="detail">
        <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases"><%= it.info.numReleases %> releases</a>
        <% if (it.info.latestReleaseTag) { %>
          (<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases/tag/<%= it.info.latestReleaseTag %>"><%= it.info.latestReleaseTag %></a>
          <% if (it.info.latestReleaseDate) { %>
            <time class="timestamp" title="<%= it.info.latestReleaseDate %>"><%= it.info.latestReleaseDate.split("T")[0] %></time>
          <% } %>
          )
        <% } %>
      </div>
    <% } %>
  </div>
<% } %>

<div class="placeholder languages box" data-src="/api/<%= it.repo.owner %>/<%= it.repo.name %>/languages">
    <div class="language-bar"><span style="width: 100%; background: #ededed"></span></div>
    <ul class="language-list"><li>…</li></ul>
</div>

<%~ include("./_tree", it) %>