From ecd01c4617ec0a6af05cfc4388bdc82986f25961 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 21 Jul 2026 17:46:58 -0400 Subject: Add async branch/tag dropdown and latest-commit bar Adds two lazily-fetched UI pieces to match vanilla GitHub while keeping initial page loads plain server-rendered HTML: a branch/tag selector (native , CSS anchor-positioned to its button, light-dismissed via closedby="any") and a latest-commit bar above the file listing. Both are populated by new /api/:owner/:repo/refs/:type and /api/:owner/:repo/latest-commit/:branch/:path routes; the latter calls GitHub's own /latest-commit JSON endpoint (the same one the React UI uses) rather than scraping the full commit history page. --- views/_latestCommit.eta | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 views/_latestCommit.eta (limited to 'views/_latestCommit.eta') diff --git a/views/_latestCommit.eta b/views/_latestCommit.eta new file mode 100644 index 0000000..18d22a1 --- /dev/null +++ b/views/_latestCommit.eta @@ -0,0 +1,16 @@ +
+
+
+ <%~ it.commit.shortMessageHtml %> +
+
+ <% for (const author of it.commit.authors) { %> + <%= author.login %> + <% } %> + +
+
+
+ <%= it.commit.oid.substring(0, 7) %> +
+
-- cgit v1.3.1