flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 733e1efda10eabb94a821981d75c1acaf47ca1da
parent 2dba5119bb2fc790b6efdb5983d1f3d5c3926229
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Thu,  7 Jan 2021 18:38:34 -0800

Add gemlog note

Diffstat:
Mhttp.go | 3++-
Mtemplates/edit_file.html | 7+++++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/http.go b/http.go @@ -184,9 +184,10 @@ func editFileHandler(w http.ResponseWriter, r *http.Request) { 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) diff --git a/templates/edit_file.html b/templates/edit_file.html @@ -12,7 +12,14 @@ </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 }}