diff options
| author | Joe Mou <dev@mou.fo> | 2026-01-27 15:05:36 -0500 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-01-27 17:21:45 -0500 |
| commit | 200defaa5c769b4603f9256e943821344cadbe82 (patch) | |
| tree | c66bc43948d8accf8cd2d5462c6115c8cc238ca7 /views | |
| parent | 8fec0b99fbe193326d25fc107e0c625dcf05fd12 (diff) | |
List issues
Diffstat (limited to 'views')
| -rw-r--r-- | views/issues.eta | 20 | ||||
| -rw-r--r-- | views/layout.eta | 4 | ||||
| -rw-r--r-- | views/repo.eta | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/views/issues.eta b/views/issues.eta new file mode 100644 index 0000000..6e4c9ba --- /dev/null +++ b/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/views/layout.eta b/views/layout.eta index f053b84..f4535df 100644 --- a/views/layout.eta +++ b/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/views/repo.eta b/views/repo.eta index 9122775..fbca299 100644 --- a/views/repo.eta +++ b/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> <% } %> |
