diff options
| author | Joe Mou <dev@mou.fo> | 2026-02-21 21:53:32 +1100 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-02-21 21:53:55 +1100 |
| commit | 0d95c588319e6f25f4b24612e730f662e209b5dc (patch) | |
| tree | 2a388ad18db916a00f7c878507cda388e745b3ea /cgithub/views | |
| parent | 8319c4867da25739ee220128e050f0f965f6ed0b (diff) | |
Release assets
Also fix release content parsing.
Diffstat (limited to 'cgithub/views')
| -rw-r--r-- | cgithub/views/_release.eta | 13 | ||||
| -rw-r--r-- | cgithub/views/layout.eta | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/cgithub/views/_release.eta b/cgithub/views/_release.eta index 4769f9b..a8838fb 100644 --- a/cgithub/views/_release.eta +++ b/cgithub/views/_release.eta @@ -16,4 +16,17 @@ <% if (it.release.bodyHtml) { %> <%~ it.release.bodyHtml %> <% } %> + <% if (it.release.assets && it.release.assets.length > 0) { %> + <footer> + <h3>Assets</h3> + <% for (const asset of it.release.assets) { %> + <div> + <a href="<%= asset.url %>"><%= asset.name %></a> + <% if (asset.publishedAt) { %> + <time class="timestamp" title="<%= asset.publishedAt %>"><%= asset.publishedAt.split("T")[0] %></time> + <% } %> + </div> + <% } %> + </footer> + <% } %> </div> diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta index 3910d4b..c42d593 100644 --- a/cgithub/views/layout.eta +++ b/cgithub/views/layout.eta @@ -13,10 +13,10 @@ git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pr <nav> <a href="/<%= it.repo.owner %>/<%= it.repo.name %>">Code</a> <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/issues">Issues</a> + <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases">Releases</a> <% if (it.branch) { %> <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/commits/<%= it.branch %><%= it.path && it.path !== '/' ? '/' + it.path : '' %>">Commits</a> <% } %> - <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases">Releases</a> </nav> </div> |
