From 6cb469d0f09abed57004165a79a16156eb09cd2d Mon Sep 17 00:00:00 2001
From: Runxi Yu <me@runxiyu.org>
Date: Mon, 10 Feb 2025 08:00:44 +0800
Subject: repo_index: Add file list

---
 templates/repo_index.html | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

(limited to 'templates')

diff --git a/templates/repo_index.html b/templates/repo_index.html
index 4241356..13bac72 100644
--- a/templates/repo_index.html
+++ b/templates/repo_index.html
@@ -30,6 +30,25 @@
 {{- end }}
 </tbody>
 </table>
+<table id="file-tree">
+<thead>
+<tr>
+<!--th scope="col">Blob/Tree ID</th-->
+<th scope="col">Mode</th>
+<th scope="col">Name</th>
+<th scope="col">Size</th>
+</tr>
+</thead>
+<tbody>
+{{- range .files }}
+<tr>
+<td class="file-mode">{{ .Mode }}</td>
+<td class="file-name">{{ .Name }}</td>
+<td class="file-size">{{ .Size }}</td>
+</tr>
+{{- end }}
+</tbody>
+</table>
 <div id="refs">
 </div>
 <div id="readme">
-- 
cgit v1.2.3