Add note about proxy on the bottom of each page
alex wennerberg alex@alexwennerberg.com
Sun, 13 Dec 2020 16:43:38 -0800
3 files changed,
12 insertions(+),
1 deletions(-)
M
http.go
→
http.go
@@ -540,11 +540,14 @@ if !raw && !acceptsGemini && (extension == ".gmi" || extension == ".gemini") {
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)
M
templates/static/style.css
→
templates/static/style.css
@@ -13,6 +13,12 @@ margin-top:0;
margin-bottom:.2em; } +.footer { + font-style: italic; + color: grey; + font-size: .9em; +} + body { }
M
templates/user_page.html
→
templates/user_page.html
@@ -10,6 +10,8 @@ </head>
<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>