Merge branch 'main' into proxy
alex wennerberg alex@alexwennerberg.com
Wed, 06 Jan 2021 23:34:10 -0800
4 files changed,
10 insertions(+),
7 deletions(-)
M
http.go
→
http.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)@@ -550,10 +551,6 @@ }
if strings.HasPrefix(p, "/"+HiddenFolder) { renderDefaultError(w, http.StatusForbidden) - return - } - if r.URL.Path == "/style.css" { - http.ServeFile(w, r, path.Join(c.TemplatesDirectory, "static/style.css")) return } if r.URL.Path == "/gemlog/atom.xml" && os.IsNotExist(err) {
M
templates/edit_file.html
→
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>
M
templates/my_site.html
→
templates/my_site.html
@@ -8,6 +8,9 @@ </a>
</h1> {{template "nav.html" .}} <br> +For some help building your site, check out the <a href="https://admin.flounder.online/tips_and_tricks.gmi">Tips and Tricks</a> page. +<br> +<br> <h3>Your files:</h3> {{ define "file" }} <tr>
M
templates/user_page.html
→
templates/user_page.html
@@ -4,7 +4,7 @@ <head>
<meta charset="utf-8" /> <title>{{.PageTitle }}</title> <meta name="viewport" content="width=device-width" /> - <link rel="stylesheet" type="text/css" href="/style.css" /> + <link rel="stylesheet" type="text/css" href="https://flounder.online/style.css" /> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{.Favicon}}</text></svg>"> </head> <body>@@ -12,7 +12,7 @@ <main>
{{.SiteBody}} <br> <div class="footer"> - Proxied from the original at <a href="gemini://{{.URI}}">gemini://{{.URI}}</a> (<a href="https://admin.flounder.online/gemini.gmi">about Gemini</a>)</div> + Proxied from the original at <a href="gemini://{{.URI}}">gemini://{{.URI}}</a> (<a href="https://admin.flounder.online/gemini.gmi">about Gemini</a>) <a href="./?raw=1">raw</a></div> </main> </body> </html>