summaryrefslogtreecommitdiff
path: root/templates/tree.gph
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-23 13:10:27 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-23 13:10:27 -0600
commit32f84de36c9da1da47b718cb942afa36d1b23922 (patch)
treeb2b57235f867ab33279a3f7d9987501461360681 /templates/tree.gph
parentd59ed1060d354ce911da1e7fb19f651feeafa2c1 (diff)
use .gmi, .gmi.txt, .gph, .gph.txt everywhere for templates
Diffstat (limited to 'templates/tree.gph')
-rw-r--r--templates/tree.gph9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/tree.gph b/templates/tree.gph
new file mode 100644
index 0000000..ed9c1e7
--- /dev/null
+++ b/templates/tree.gph
@@ -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 -}}
+.