summaryrefslogtreecommitdiff
path: root/templates/tree.gophermap
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
commitce0def95f3924a10b0faceb72aa5df18bf813fb1 (patch)
tree2f0300d84738343ea2fb9f13db1af1e649b41917 /templates/tree.gophermap
parentebea6fe755fb052b79cbe05b6280611337e1e5f6 (diff)
GOPHER
Diffstat (limited to 'templates/tree.gophermap')
-rw-r--r--templates/tree.gophermap9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/tree.gophermap b/templates/tree.gophermap
new file mode 100644
index 0000000..ed9c1e7
--- /dev/null
+++ b/templates/tree.gophermap
@@ -0,0 +1,9 @@
+{{ with .Repo.Commit .Ctx .Params.ref -}}
+i{{slice .Hash 0 8}}:{{ if ne $.Params.path "" }}{{$.Params.path}}{{ else }}/{{ end }} {{$.Selector}} {{$.Host}} {{$.Port}}
+i {{$.Selector}} {{$.Host}} {{$.Port}}
+{{ end -}}
+1{{ if ne .Params.path "" }}../{{ else }}Commit{{ end }} {{join $.Selector ".."}} {{$.Host}} {{$.Port}}
+{{ range .Repo.Tree .Ctx $.Params.ref $.Params.path -}}
+{{ if eq .Type "blob" }}0📄 {{ else }}1📂 {{ end }}{{.Path}} {{join $.Selector .Path}} {{$.Host}} {{$.Port}}
+{{ end -}}
+.