diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-10 10:58:32 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-10 11:01:03 +0800 |
commit | a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916 (patch) | |
tree | 01581abe5895e75ba30b39d3ae22dab609bc06c4 /templates | |
parent | repo_tree: Display files too (diff) | |
download | forge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.tar.gz forge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.tar.zst forge-a3d2daf4636cae1d21ac8d3c28b3fe0db25a4916.zip |
repo_tree: Add anchors to entries
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo_tree_dir.html | 4 |
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 }} |