flounder

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

commit b4f33f25296d7486bd118caf9537f96842b15416
parent 3c292c8b767eb438c0de7f6c198514eeced63a7f
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 13 Dec 2020 16:43:38 -0800

Add note about proxy on the bottom of each page

Diffstat:
Mhttp.go | 5++++-
Mtemplates/static/style.css | 6++++++
Mtemplates/user_page.html | 2++
3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/http.go b/http.go @@ -540,11 +540,14 @@ func userFile(w http.ResponseWriter, r *http.Request) { file, _ := os.Open(fileName) htmlString := textToHTML(gmi.ParseText(file)) favicon := getFavicon(userName) + hostname := strings.Split(r.Host, ":")[0] + URI := hostname + r.URL.String() data := struct { SiteBody template.HTML Favicon string PageTitle string - }{template.HTML(htmlString), favicon, userName + p} + URI string + }{template.HTML(htmlString), favicon, userName + p, URI} t.ExecuteTemplate(w, "user_page.html", data) } else { http.ServeFile(w, r, fileName) diff --git a/templates/static/style.css b/templates/static/style.css @@ -13,6 +13,12 @@ h1, h2, h3, h4, h5, h6{ margin-bottom:.2em; } +.footer { + font-style: italic; + color: grey; + font-size: .9em; +} + body { } diff --git a/templates/user_page.html b/templates/user_page.html @@ -10,6 +10,8 @@ <body> <main> {{.SiteBody}} +<div class="footer"> + Proxied from the original at <a href="gemini://{{.URI}}">{{.URI}}</a> (<a href="https://admin.flounder.online/gemini.gmi">about Gemini</a>)</div> </main> </body> </html>