aboutsummaryrefslogtreecommitdiff
path: root/views/owner.eta
blob: e5667fb191ebd2ff9dd741907fec06d80dc72b30 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= it.name ? `${it.name} (${it.login})` : it.login %></title>
  <link rel="stylesheet" href="/static/style.css">
</head>
<body>
  <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>
  <% } %>

  <footer>Generated by cgithub</footer>
</body>
</html>