~gitpocket/gitpocket

1

fix(basin): file bar spacing on tree root

commit
33b7f018a321a357df511b3634d80bc98f89b99e browse tree
parent
8c270b8d3efb51f755ffd8db53b9b77352ab41f1
author
obscurejames <354576047+obscurejames@users.noreply.github.com>
signature
none
date
2026-09-29 19:11 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 }