all repos — flounder @ 7bf99a4569fc0fd2695cf1f7c2b493efb1123cff

A small site builder for the Gemini protocol

Add reference to gemini text guide
alex wennerberg alex@alexwennerberg.com
Wed, 06 Jan 2021 22:08:43 -0800
commit

7bf99a4569fc0fd2695cf1f7c2b493efb1123cff

parent

cd39b4e60d52866ec16cde24c9b17d75287336d9

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

jump to
M http.gohttp.go

@@ -183,9 +183,10 @@ PageTitle string

AuthUser AuthUser Host string IsText bool + IsGemini bool Alert string Warnings []string - }{fileName, string(fileBytes), c.SiteTitle, user, c.Host, isText, alert, warnings} + }{fileName, string(fileBytes), c.SiteTitle, user, c.Host, isText, isGemini(fileName), alert, warnings} err = t.ExecuteTemplate(w, "edit_file.html", data) if err != nil { panic(err)
M templates/edit_file.htmltemplates/edit_file.html

@@ -11,6 +11,9 @@ {{ . }}

{{ end }} </div> {{ if .IsText }} + {{ if .IsGemini }} + <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> + {{ end }} <textarea rows="27" name="file_text" id="editor">{{.FileText}}</textarea> {{ end }} <br>