summaryrefslogtreecommitdiff
path: root/cgithub/views
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-01-27 15:05:36 -0500
committerJoe Mou <dev@mou.fo>2026-01-27 17:21:45 -0500
commitd29bdad2f5c8326d111901373f0a56b3a09a2cd8 (patch)
treea34128312316849e257bde7750c2e01180a77f3c /cgithub/views
parent64c397e256b01a2e542e84529e947e237c07edd6 (diff)
List issues
Diffstat (limited to 'cgithub/views')
-rw-r--r--cgithub/views/issues.eta20
-rw-r--r--cgithub/views/layout.eta4
-rw-r--r--cgithub/views/repo.eta2
3 files changed, 25 insertions, 1 deletions
diff --git a/cgithub/views/issues.eta b/cgithub/views/issues.eta
new file mode 100644
index 0000000..6e4c9ba
--- /dev/null
+++ b/cgithub/views/issues.eta
@@ -0,0 +1,20 @@
+<% layout("./layout") %>
+
+<table>
+ <% for (const issue of it.issues) { %>
+ <tr>
+ <td>#<%= issue.number %></td>
+ <td>
+ <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/issues/<%= issue.number %>">
+ <%= issue.title %>
+ </a>
+ </td>
+ <td>
+ <% if (issue.commentCount > 0) { %>
+ <img src="/static/icons/link.svg" alt="comments" class="icon"> <%= issue.commentCount %>
+ <% } %>
+ </td>
+ <td class="timestamp"><time title="<%= issue.createdAt %>"><%= issue.createdAt.split("T")[0] %></time></td>
+ </tr>
+ <% } %>
+</table>
diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta
index f053b84..f4535df 100644
--- a/cgithub/views/layout.eta
+++ b/cgithub/views/layout.eta
@@ -10,6 +10,10 @@
<div class="repo"><%= it.repo.owner %>/<%= it.repo.name %></div>
<pre><code>git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pre>
+ <nav>
+ <a href="/<%= it.repo.owner %>/<%= it.repo.name %>">Code</a>
+ <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/issues">Issues</a>
+ </nav>
</div>
<%~ it.body %>
diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta
index 9122775..fbca299 100644
--- a/cgithub/views/repo.eta
+++ b/cgithub/views/repo.eta
@@ -18,7 +18,7 @@
<span class="count"><img src="/static/icons/git-fork.svg" alt="forks" class="icon"> <%= it.info.forks %></span>
<% } %>
<% if (it.info.numReleases) { %>
- <div><a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases" rel="noreferrer"><%= it.info.numReleases %> releases</a></div>
+ <div><a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases"><%= it.info.numReleases %> releases</a></div>
<% } %>
</div>
<% } %>