From c5cd5837cd194ba58a963258787fe8de8dce7e4b Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Fri, 23 Jan 2026 01:07:48 -0500 Subject: Refactor template layout --- views/tree.eta | 56 +++++++++++++++----------------------------------------- 1 file changed, 15 insertions(+), 41 deletions(-) (limited to 'views/tree.eta') diff --git a/views/tree.eta b/views/tree.eta index b49668d..911b7ee 100644 --- a/views/tree.eta +++ b/views/tree.eta @@ -1,42 +1,16 @@ - - - - - <%= it.repo.owner %>/<%= it.repo.name %> - <%= it.path || 'root' %> - - - -
-

<%= it.repo.owner %>/<%= it.repo.name %>

-
branch: <%= it.branch %>
- <% if (it.path) { %> -
- path: root<% - const pathParts = it.path.split('/').filter(p => p); - let currentPath = ''; - for (const part of pathParts) { - currentPath += (currentPath ? '/' : '') + part; - %>/<%= part %><% - } %> -
- <% } %> -
+<% layout("./layout") %> - - <% for (const item of it.items) { %> - - - - <% } %> -
- <%= item.contentType === 'directory' ? '📁' : '📄' %> - <% if (item.contentType === 'directory') { %> - <%= item.name %> - <% } else { %> - <%= item.name %> - <% } %> -
- - - - + + <% for (const item of it.items) { %> + + + + <% } %> +
+ <%= item.contentType === 'directory' ? '📁' : '📄' %> + <% if (item.contentType === 'directory') { %> + <%= item.name %> + <% } else { %> + <%= item.name %> + <% } %> +
-- cgit v1.3.1