all repos — flounder @ 72096c39454189134dd579352bb123f0ffaa1cec

A small site builder for the Gemini protocol

Change edit file UI
alex wennerberg alex@alexwennerberg.com
Fri, 27 Nov 2020 09:19:01 -0800
commit

72096c39454189134dd579352bb123f0ffaa1cec

parent

1dff307d9086d5015da568e89a51ffcc07d44a42

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M http.gohttp.go

@@ -155,7 +155,7 @@ newPath := path.Join(c.FilesDirectory, authUser, newName)

os.MkdirAll(path.Dir(newPath), os.ModePerm) os.Rename(filePath, newPath) } - http.Redirect(w, r, "/my_site", 303) + http.Redirect(w, r, path.Join("/edit", fileName), 303) } }
M templates/edit_file.htmltemplates/edit_file.html

@@ -6,5 +6,6 @@ <input type="text" value="{{.FileName}}" id="rename" name="rename">

<textarea rows="25" name="file_text" id="editor">{{.FileText}}</textarea> <br> <input type="submit" value="Save file" class="button"> + <a href="/my_site">Back</a> </form> {{template "footer" .}}