~gitpocket/gitpocket

fix(basin): file bar spacing on tree root

commit
fc89e5827a1a73df5e1e0e8f13221711d50cbf8d browse tree
parent
cf8bba6cd2cc9418ff80a39d8ddac8bde7936722
author
james <j@cpl0.zip>
signature
none
date
2026-11-11 20:10 UTC

2 files changed, +2 −2

templates/layout.html modified

@@ -38,7 +38,7 @@
3838 </nav></div>
3939 </div>
4040 {{end}}{{end}}
41-<main{{with .Data}}{{if index . "Entry"}} class="file"{{else if index . "Crumbs"}} class="file"{{end}}{{end}}>
41+<main{{with .Data}}{{if index . "File"}} class="file"{{end}}{{end}}>
4242 {{if .Error}}<p class="error">{{.Error}}</p>{{end}}
4343 {{template "content" .}}
4444 </main>

web.go modified

@@ -736,7 +736,7 @@ func (s *Server) tree(w http.ResponseWriter, r *http.Request, repo Repo, spec st
736736 if filePath == "" {
737737 crumbs = nil
738738 }
739- data := map[string]any{"Page": rp, "Path": filePath, "Crumbs": crumbs}
739+ data := map[string]any{"Page": rp, "Path": filePath, "Crumbs": crumbs, "File": true}
740740 if last, _ := g.Log(rp.Commit, 1, filePath); len(last) > 0 {
741741 data["LastCommit"] = last[0]
742742 }