summaryrefslogtreecommitdiff
path: root/cgithub/views/layout.eta
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-07-21 17:46:58 -0400
committerJoe Mou <dev@mou.fo>2026-07-22 23:25:26 -0400
commit6240cf1c6b73b7ed34ff5816b53333382c229f5c (patch)
tree4e8a8e379aa466c8a0d1d298266700a589b1a445 /cgithub/views/layout.eta
parent9b556ffe6c0c0528697e15f7f4f35107de212ce1 (diff)
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 <dialog>, 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.
Diffstat (limited to 'cgithub/views/layout.eta')
-rw-r--r--cgithub/views/layout.eta1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta
index dd523d1..a80bd1d 100644
--- a/cgithub/views/layout.eta
+++ b/cgithub/views/layout.eta
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= it.repo.owner %>/<%= it.repo.name %> - <%= it.path || '/' %></title>
<link rel="stylesheet" href="/static/style.css">
+ <script src="/static/refs.js" defer></script>
</head>
<body>
<div class="box">