summaryrefslogtreecommitdiff
path: root/cgithub/views/repo.eta
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-08-11 17:41:01 -0400
committerJoe Mou <dev@mou.fo>2026-08-11 18:25:26 -0400
commit21310d0366c0f21e73c1f4f78d38370edfb59445 (patch)
treeb65c6bb2bfea1036266e29c308bf1132277bb993 /cgithub/views/repo.eta
parent866f99c414cb3d102483ce21c68a0e62b394baaa (diff)
Read the About box and latest release from JSON
GitHub rebuilt the repository sidebar, so the selectors parseRepoInfo used matched nothing and the About box rendered empty. Everything but the latest release is in the page's embedded payload as sidebarAbout; the latest release is only in the _sidebar JSON already fetched for languages, so it arrives with that fragment and is moved beside the release count.
Diffstat (limited to 'cgithub/views/repo.eta')
-rw-r--r--cgithub/views/repo.eta10
1 files changed, 2 insertions, 8 deletions
diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta
index 1bff97f..5dc6beb 100644
--- a/cgithub/views/repo.eta
+++ b/cgithub/views/repo.eta
@@ -17,19 +17,13 @@
<% if (it.info.numReleases) { %>
<div class="detail">
<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases"><%= it.info.numReleases %> releases</a>
- <% if (it.info.latestReleaseTag) { %>
- (<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/releases/tag/<%= it.info.latestReleaseTag %>"><%= it.info.latestReleaseTag %></a>
- <% if (it.info.latestReleaseDate) { %>
- <time class="timestamp" title="<%= it.info.latestReleaseDate %>"><%= it.info.latestReleaseDate.split("T")[0] %></time>
- <% } %>
- )
- <% } %>
+ <span id="latest-release"></span>
</div>
<% } %>
</div>
<% } %>
-<div class="placeholder languages box" data-src="/api/<%= it.repo.owner %>/<%= it.repo.name %>/languages">
+<div class="placeholder languages box" data-src="/api/<%= it.repo.owner %>/<%= it.repo.name %>/sidebar">
<div class="language-bar"><span style="width: 100%; background: #ededed"></span></div>
<ul class="language-list"><li>…</li></ul>
</div>