all but todo is at least semi functional

This commit is contained in:
Bel LaPointe
2022-02-15 16:19:50 -07:00
parent dd7dafa1b2
commit 0cb929731f
4 changed files with 4 additions and 5 deletions

View File

@@ -260,18 +260,18 @@ func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) err
if len(id) > 1 && parent.Title == "" {
return err
}
leaf.Title = "My New File"
}
data := map[string]interface{}{
"This": map[string]string{
"Title": leaf.Title,
"Content": leaf.Content,
"ID": r.URL.Path,
"PID": path.Dir(r.URL.Path),
"PID": strings.TrimPrefix(path.Dir(r.URL.Path), "/"),
"PTitle": parent.Title,
},
"Tree": string(branchesJSON),
}
log.Printf("%v => %+v", id, data)
return t.Lookup("files").Execute(w, data)
}