all repos — flounder @ b1fa8cb01f71328091f20fe0acc1c8fb2ca9483f

A small site builder for the Gemini protocol

Fix proxy navigation bug
alex wennerberg alex@alexwennerberg.com
Mon, 01 Feb 2021 18:32:12 -0800
commit

b1fa8cb01f71328091f20fe0acc1c8fb2ca9483f

parent

f63edd7303f49c0919c3009b93c93e6009f4e873

3 files changed, 5 insertions(+), 3 deletions(-)

jump to
M http.gohttp.go

@@ -594,8 +594,9 @@ SiteBody template.HTML

Favicon string PageTitle string URI *url.URL + GeminiURI *url.URL Config Config - }{template.HTML(htmlString), favicon, userName + p, &uri, c} + }{template.HTML(htmlString), favicon, userName + p, &uri, &uri, c} err = t.ExecuteTemplate(w, "user_page.html", data) if err != nil { panic(err)
M proxy.goproxy.go

@@ -120,9 +120,10 @@ data := struct {

SiteBody template.HTML Favicon string PageTitle string + GeminiURI *url.URL URI *url.URL Config Config - }{template.HTML(htmlString), "", r.URL.String(), req.URL, c} + }{template.HTML(htmlString), "", r.URL.String(), req.URL, r.URL, c} err = t.ExecuteTemplate(w, "user_page.html", data) if err != nil {
M templates/user_page.htmltemplates/user_page.html

@@ -25,7 +25,7 @@ {{ end }}

<div class="footer"> <details> <summary>Proxy</summary> - Proxied from the original at <a href="{{safeGeminiURL .URI.String}}">{{.URI.String}}</a> + Proxied from the original at <a href="{{safeGeminiURL .GeminiURI.String}}">{{.GeminiURI.String}}</a> <br> <a href="https://admin.flounder.online/gemini.gmi">About Gemini</a> <br>