all repos — flounder @ 1795602c78ccfa1a222d1bf706bc6dd0256fe274

A small site builder for the Gemini protocol

Remove hard-coded references to flounder

Use Config.SiteTitle instead
alex wennerberg alex@alexwennerberg.com
Sun, 31 Jan 2021 12:15:02 -0800
commit

1795602c78ccfa1a222d1bf706bc6dd0256fe274

parent

19eb717f9e8a139b7d093c95ef9c4aab7a2c5428

7 files changed, 14 insertions(+), 22 deletions(-)

jump to
M admin.goadmin.go

@@ -93,12 +93,12 @@ // TODO verify 1 row updated

return err } log.Println("Activated user", username) - baseIndex := `# Welcome to Flounder! -## About -Welcome to an ultra-lightweight platform for making and sharing small websites. You can get started by editing this page -- remove this content and replace it with whatever you like! It will be live at <your-name>.flounder.online. You can go there right now to see what this page currently looks like. Here is a link to a page which will give you more information about using Flounder: + baseIndex := fmt.Sprintf("# Welcome to %s!\n\n", c.SiteTitle) + + `## About +Welcome to an ultra-lightweight platform for making and sharing small websites. You can get started by editing this page -- remove this content and replace it with whatever you like! It will be live at <your-name>.` + c.Host + ` -- You can go there right now to see what this page currently looks like. Here is a link to a page which will give you more information about using this site: => //admin.flounder.online -And here's a guide to the text format that Flounder uses to create pages. These pages are converted into HTML so they can be displayed in a web browser. +And here's a guide to the text format that this site uses to create pages. These pages are converted into HTML so they can be displayed in a web browser. => //admin.flounder.online/gemini_text_guide.gmi Have fun!`

@@ -109,12 +109,12 @@ ioutil.WriteFile(path.Join(c.FilesDirectory, username, "index.gmi"), []byte(baseIndex), 0644)

os.Mkdir(path.Join(c.FilesDirectory, username), os.ModePerm) if c.SMTPUsername != "" { // TODO move into work queue - SendEmail(email, "Welcome to Flounder!", fmt.Sprintf(` -Hi %s, Welcome to Flounder! You can now log into your account at -https://flounder.online/login -- For more information about -Flounder, check out https://admin.flounder.online/ + SendEmail(email, fmt.Sprintf("Welcome to %s!", c.SiteTitle), fmt.Sprintf(` +Hi %s, Welcome to %s! You can now log into your account at +https://%s/login -- For more information about +using this site, check out https://admin.flounder.online/ -Let me know if you have any questions, and have fun!`, username)) +Let me know if you have any questions, and have fun!`, c.SiteTitle, c.Host, username)) } return nil }
M http.gohttp.go

@@ -102,7 +102,7 @@ return

} sfl := getSchemedFlounderLinkLines(strings.NewReader(fileText)) if len(sfl) > 0 { - warnings = append(warnings, "Warning! Some of your links to flounder pages use schemas. This means that they may break when viewed in Gemini or over HTTPS. Plase remove gemini: or https: from the start of these links:\n") + warnings = append(warnings, "Warning! Some of your links to pages use schemas. This means that they may break when viewed in Gemini or over HTTPS. Plase remove gemini: or https: from the start of these links:\n") for _, l := range sfl { warnings = append(warnings, l) }
D templates/head.html

@@ -1,9 +0,0 @@

-{{ define "head"}} - <head> - <meta charset="utf-8" /> - <title>{{.SiteTitle }}<title> - <meta name="viewport" content="width=device-width" /> - <meta name="description" content="Flounder is a simple site and log builder for the Gemini network"> - <link rel="stylesheet" type="text/css" href="/static/style.css" /> - </head> -{{ end }}
M templates/header.htmltemplates/header.html

@@ -7,6 +7,7 @@ <title>{{.Config.SiteTitle}}</title>

<meta name="viewport" content="width=device-width" /> <link rel="stylesheet" type="text/css" href="//{{.Config.Host}}/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>🐟</text></svg>"> + <meta name="description" content="{{.Config.SiteTitle}} is a simple site and log builder for the Gemini network"> </head> <body> <main>
M templates/index.gmitemplates/index.gmi

@@ -1,7 +1,7 @@

{{$host := .Host}} # {{.SiteTitle}}! -Welcome to flounder, a home for Gemini sites. Flounder hosts small Gemini web pages over https and Gemini. Right now, the only way to make an account is via the https portal, but I'm working on adding alternatives. Feel free to make an account and join if you'd like! +Welcome to {{.SiteTitle}}, a home for Gemini sites. {{.SiteTitle}} hosts small Gemini web pages over https and Gemini. Right now, the only way to make an account is via the https portal. Feel free to make an account and join if you'd like! => gemini://admin.{{$host}} Admin page => https://{{$host}} View on HTTPS
M templates/index.htmltemplates/index.html

@@ -3,7 +3,7 @@ <h1>🐟{{.Config.SiteTitle}}!</h1>

{{template "nav.html" .}} <br> <p> -Welcome to flounder! For more information and site updates, check out the <a href="//admin.{{$.Config.Host}}">admin page</a></p> +Welcome to {{.Config.SiteTitle}}! For more information and site updates, check out the <a href="//admin.{{$.Config.Host}}">admin page</a></p> <h2>Recently updated files:</h2> {{ range .Files }} <div>
M templates/register.htmltemplates/register.html

@@ -24,7 +24,7 @@ <div>

<label for="password2">Repeat Password</label> <br> <input id="password2" name="password2" size="27" type="password" required value="" /> </div> - <label for="reference">How did you find Flounder? Did an existing user invite you, if so, whom? Could you provide a link to your website or social media?</label> + <label for="reference">How did you find {{.Config.SiteTitle}}? Did an existing user invite you, if so, whom? Could you provide a link to your website or social media?</label> <textarea id="reference" name="reference" class="textform" rows=4 required></textarea> <div class="error">{{ range .Errors}}{{.}}<br>{{end}} </div> <div>