diff options
Diffstat (limited to 'cgithub/views/owner.eta')
| -rw-r--r-- | cgithub/views/owner.eta | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/cgithub/views/owner.eta b/cgithub/views/owner.eta new file mode 100644 index 0000000..b3304fb --- /dev/null +++ b/cgithub/views/owner.eta @@ -0,0 +1,54 @@ +<% 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> +<% } %> |
