jmou/cgithub
git clone https://github.com/jmou/cgithub.git
git clone git@github.com:jmou/cgithub.git
Loading…
(top)/views/owner.eta
1.73 KB / 54 lines / 50 loc
History
View raw
<% layout("/layouts/base.eta", { title: it.name ? `${it.name} (${it.login})` : it.login }) %>

<div class="box">
  <% if (it.avatarUrl) { %>
    <img class="avatar" src="<%= it.avatarUrl %>" alt="" width="64" height="64">
  <% } %>
  <div class="repo"><%= it.name || it.login %></div>
  <div><%= it.login %><%= it.type === "organization" ? " (organization)" : "" %></div>
  <% if (it.location) { %>
    <div><%= it.location %></div>
  <% } %>
  <% if (it.nav.length > 0) { %>
    <nav>
      <% for (const item of it.nav) { %>
        <a href="<%= item.href %>"><%= item.text %></a>
      <% } %>
    </nav>
  <% } %>
</div>

<% if (it.bio || it.links.length > 0 || it.followers || it.company) { %>
  <div class="box repo-info">
    <% if (it.bio) { %>
      <div class="description"><%= it.bio %></div>
    <% } %>
    <% for (const link of it.links) { %>
      <div class="detail"><img src="/static/icons/link.svg" alt="" class="icon"> <a href="<%= link.href %>" rel="noopener noreferrer"><%= link.text %></a></div>
    <% } %>
    <% if (it.followers) { %>
      <div class="detail"><img src="/static/icons/eye.svg" alt="" class="icon"> <%= it.followers %> followers<%= it.following ? ` · ${it.following} following` : "" %></div>
    <% } %>
    <% if (it.company) { %>
      <div class="detail"><%= it.company %></div>
    <% } %>
  </div>
<% } %>

<% if (it.pinned.length > 0) { %>
  <section>
    <h2>Pinned</h2>
    <% for (const repo of it.pinned) { %>
      <%~ include("./_ownerRepo", { repo, login: it.login }) %>
    <% } %>
  </section>
<% } %>

<% if (it.repos.length > 0) { %>
  <section>
    <h2>Repositories</h2>
    <% for (const repo of it.repos) { %>
      <%~ include("./_ownerRepo", { repo, login: it.login }) %>
    <% } %>
  </section>
<% } %>