aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_dir.html
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 10:58:32 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 11:01:03 +0800
commita3d2daf4636cae1d21ac8d3c28b3fe0db25a4916 (patch)
tree01581abe5895e75ba30b39d3ae22dab609bc06c4 /templates/repo_tree_dir.html
parentrepo_tree: Display files too (diff)
downloadforge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.tar.gz
forge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.tar.zst
forge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.zip
repo_tree: Add anchors to entries
Diffstat (limited to 'templates/repo_tree_dir.html')
-rw-r--r--templates/repo_tree_dir.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo_tree_dir.html b/templates/repo_tree_dir.html
index ed893fd..14dc15a 100644
--- a/templates/repo_tree_dir.html
+++ b/templates/repo_tree_dir.html
@@ -19,10 +19,12 @@
</tr>
</thead>
<tbody>
+{{- $ref := .ref }}
+{{- $path_spec := .path_spec }}
{{- range .files }}
<tr>
<td class="file-mode">{{ .Mode }}</td>
-<td class="file-name">{{ .Name }}</td>
+<td class="file-name"><a href="{{ $path_spec }}/{{ .Name }}">{{ .Name }}</a>{{ if not .Is_file }}/{{ end }}</td>
<td class="file-size">{{ .Size }}</td>
</tr>
{{- end }}