all repos — flounder @ 733e1efda10eabb94a821981d75c1acaf47ca1da

A small site builder for the Gemini protocol

Add gemlog note
alex wennerberg alex@alexwennerberg.com
Thu, 07 Jan 2021 18:38:34 -0800
commit

733e1efda10eabb94a821981d75c1acaf47ca1da

parent

2dba5119bb2fc790b6efdb5983d1f3d5c3926229

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

jump to
M http.gohttp.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.htmltemplates/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 }}