From 4bbc0c19076dc8490c451a1f535f3e018fb8dda3 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Thu, 22 Jan 2026 13:27:36 -0500 Subject: Simple web server for viewing trees --- views/tree.eta | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 views/tree.eta (limited to 'views/tree.eta') diff --git a/views/tree.eta b/views/tree.eta new file mode 100644 index 0000000..4194216 --- /dev/null +++ b/views/tree.eta @@ -0,0 +1,42 @@ + + + + + <%= 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 %><% + } %> +
+ <% } %> +
+ + + <% for (const item of it.items) { %> + + + + <% } %> +
+ <%= item.contentType === 'directory' ? '📁' : '📄' %> + <% if (item.contentType === 'directory') { %> + <%= item.name %> + <% } else { %> + <%= item.name %> + <% } %> +
+ + + + -- cgit v1.3.1