From 32f84de36c9da1da47b718cb942afa36d1b23922 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 23 Sep 2023 13:10:27 -0600 Subject: use .gmi, .gmi.txt, .gph, .gph.txt everywhere for templates --- templates/repo_home.gph | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 templates/repo_home.gph (limited to 'templates/repo_home.gph') diff --git a/templates/repo_home.gph b/templates/repo_home.gph new file mode 100644 index 0000000..2ab17c2 --- /dev/null +++ b/templates/repo_home.gph @@ -0,0 +1,24 @@ +i{{.Repo.Name}} {{.Selector}} {{.Host}} {{.Port}} +i{{ range .Repo.NameBytes }}-{{ end }} {{.Selector}} {{.Host}} {{.Port}} +i {{.Selector}} {{.Host}} {{.Port}} +i{{.Repo.Description}} {{.Selector}} {{.Host}} {{.Port}} +i {{.Selector}} {{.Host}} {{.Port}} +1⌥ Branches {{.Selector}}/branches {{.Host}} {{.Port}} +1🏷️ Tags {{.Selector}}/tags {{.Host}} {{.Port}} +1📄 Files {{.Selector}}/refs/HEAD/tree {{.Host}} {{.Port}} +i {{.Selector}} {{.Host}} {{.Port}} +iLatest Commits: {{.Selector}} {{.Host}} {{.Port}} +i {{.Selector}} {{.Host}} {{.Port}} +{{ with .Repo.Commits .Ctx "HEAD" 5 -}} +{{ range . -}} +1{{.ShortMessage}} {{$.Selector}}/refs/{{.Hash}} {{$.Host}} {{$.Port}} +{{ end -}} +{{ if len . | eq 0 -}} +i(no commits to show) {{$.Selector}} {{$.Host}} {{$.Port}} +{{ end -}} +{{ end -}} +i {{.Selector}} {{.Host}} {{.Port}} +{{ with .Repo.Readme .Ctx "HEAD" -}} +{{ .GopherEscapedContents $.Selector $.Host $.Port }} +{{ end -}} +. -- cgit v1.2.3