aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_dir.html
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 08:57:33 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 08:57:33 +0800
commit6b0a78df8bb6071534848502003446b57ac515f4 (patch)
tree2a473447a26b856acb207a3e7c6452cd657d052c /templates/repo_tree_dir.html
parentrepo_index: Use the first line of the commit message (diff)
downloadforge-6b0a78df8bb6071534848502003446b57ac515f4.tar.gz
forge-6b0a78df8bb6071534848502003446b57ac515f4.tar.zst
forge-6b0a78df8bb6071534848502003446b57ac515f4.zip
repo_tree: Initialize handler (copied over from index)
Diffstat (limited to 'templates/repo_tree_dir.html')
-rw-r--r--templates/repo_tree_dir.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/repo_tree_dir.html b/templates/repo_tree_dir.html
new file mode 100644
index 0000000..6708f0c
--- /dev/null
+++ b/templates/repo_tree_dir.html
@@ -0,0 +1,40 @@
+{{- define "repo_tree_dir" -}}
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="/static/style.css" />
+<title>{{ .project_name }}/repos/{{ .repo_name }}/{{ .path }}</title>
+</head>
+<body class="repo-index">
+<div class="padding-wrapper">
+<table id="file-tree">
+<thead>
+<tr>
+<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>
+<div class="padding-wrapper">
+<div id="refs">
+</div>
+</div>
+<div class="padding-wrapper">
+<div id="readme">
+{{ .readme -}}
+</div>
+</div>
+</body>
+</html>
+{{- end -}}