aboutsummaryrefslogtreecommitdiff
path: root/views/layout.eta
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-01-27 16:58:56 -0500
committerJoe Mou <dev@mou.fo>2026-01-27 17:21:42 -0500
commit8fec0b99fbe193326d25fc107e0c625dcf05fd12 (patch)
treeb37629a1f2e77408b82f5d1a5691906a3dfe9cad /views/layout.eta
parent70534dacebc69e05d2674a08b4b75b352b8a8913 (diff)
Split branch and path bread crumbs into separate section
Diffstat (limited to 'views/layout.eta')
-rw-r--r--views/layout.eta22
1 files changed, 2 insertions, 20 deletions
diff --git a/views/layout.eta b/views/layout.eta
index bfcd370..f053b84 100644
--- a/views/layout.eta
+++ b/views/layout.eta
@@ -6,29 +6,11 @@
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
- <header>
+ <div class="box">
<div class="repo"><%= it.repo.owner %>/<%= it.repo.name %></div>
- <div class="branch"><img src="/static/icons/git-branch.svg" alt="branch" class="icon"> <%= it.branch %></div>
- <% if (it.path) { %>
- <span>
- <a href="/<%= it.repo.owner %>/<%= it.repo.name %>/tree/<%= it.branch %>">(top)</a><%
- const pathParts = it.path.split('/').filter(p => p);
- let currentPath = '';
- for (let i = 0; i < pathParts.length; i++) {
- const part = pathParts[i];
- currentPath += (currentPath ? '/' : '') + part;
- const isLast = i === pathParts.length - 1;
- if (isLast) {
- %>/<%= part %><%
- } else {
- %>/<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/tree/<%= it.branch %>/<%= currentPath %>"><%= part %></a><%
- }
- } %>
- </span>
- <% } %>
<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>
- </header>
+ </div>
<%~ it.body %>