Add gemlog note
alex wennerberg alex@alexwennerberg.com
Thu, 07 Jan 2021 18:38:34 -0800
2 files changed,
9 insertions(+),
1 deletions(-)
M
http.go
→
http.go
@@ -184,9 +184,10 @@ AuthUser AuthUser
Host string IsText bool IsGemini bool + IsGemlog bool Alert string Warnings []string - }{fileName, string(fileBytes), c.SiteTitle, user, c.Host, isText, isGemini(fileName), alert, warnings} + }{fileName, string(fileBytes), c.SiteTitle, user, c.Host, isText, isGemini(fileName), strings.HasPrefix(fileName, "gemlog"), alert, warnings} err = t.ExecuteTemplate(w, "edit_file.html", data) if err != nil { panic(err)
M
templates/edit_file.html
→
templates/edit_file.html
@@ -12,7 +12,14 @@ {{ end }}
</div> {{ if .IsText }} {{ if .IsGemini }} + <p> <em>For help with the Gemini markup format, see the <a href="https://admin.flounder.online/gemini_text_guide.gmi">Gemini Text Guide</a></em> + </p> + {{ end }} + {{ if .IsGemlog }} + <p> + <em>For information about writing a Gemlog, see <a href="https://admin.flounder.online/gemfeed.gmi">Gemini Logs and Feeds</a></em> + </p> {{ end }} <textarea rows="27" name="file_text" id="editor">{{.FileText}}</textarea> {{ end }}