summaryrefslogtreecommitdiff
path: root/cgithub/views/owner.eta
blob: 4426400c0c296b73605576ae6c57d0447ffb801c (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
<!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 repo-info">
    <% if (it.avatarUrl) { %>
      <img class="avatar" src="<%= it.avatarUrl %>" alt="" width="64" height="64">
    <% } %>
    <div class="repo"><%= it.name || it.login %></div>
    <div class="detail"><%= it.login %><%= it.type === "organization" ? " (organization)" : "" %></div>
    <% if (it.bio) { %>
      <div class="description"><%= it.bio %></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>
    <% } %>
    <% if (it.location) { %>
      <div class="detail"><%= it.location %></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>
    <% } %>
  </div>

  <% if (it.pinned.length > 0) { %>
    <section>
      <h2>Pinned</h2>
      <% for (const repo of it.pinned) { %>
        <div class="box repo-info">
          <div><a href="/<%= repo.owner %>/<%= repo.name %>"><%= repo.owner === it.login ? repo.name : `${repo.owner}/${repo.name}` %></a></div>
          <% if (repo.description) { %>
            <div class="description"><%= repo.description %></div>
          <% } %>
          <% if (repo.language) { %>
            <span class="detail"><%= repo.language %></span>
          <% } %>
          <% if (repo.stars) { %>
            <span class="detail"><img src="/static/icons/star.svg" alt="stars" class="icon"> <%= repo.stars %></span>
          <% } %>
          <% if (repo.forks) { %>
            <span class="detail"><img src="/static/icons/git-fork.svg" alt="forks" class="icon"> <%= repo.forks %></span>
          <% } %>
        </div>
      <% } %>
    </section>
  <% } %>

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