flounder

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

commit 7bf99a4569fc0fd2695cf1f7c2b493efb1123cff
parent cd39b4e60d52866ec16cde24c9b17d75287336d9
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Wed,  6 Jan 2021 22:08:43 -0800

Add reference to gemini text guide

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

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