all repos — flounder @ 1d6c815b88efb0faae7dfbdcda6167e593e8c3cf

A small site builder for the Gemini protocol

style changes
alex wennerberg alex@alexwennerberg.com
Mon, 26 Oct 2020 11:29:37 -0700
commit

1d6c815b88efb0faae7dfbdcda6167e593e8c3cf

parent

f0c9825c7f9d849227a13046ebac95084ad390e8

3 files changed, 9 insertions(+), 6 deletions(-)

jump to
M gemini.gogemini.go

@@ -54,9 +54,7 @@ func runGeminiServer() {

log.Println("Starting gemini server") var server gmi.Server - if err := server.CertificateStore.Load("./tmpcerts"); err != nil { - log.Fatal(err) - } + hostname := strings.SplitN(c.Host, ":", 1)[0] // is this necc? server.GetCertificate = func(hostname string, store *gmi.CertificateStore) *tls.Certificate { cert, err := tls.LoadX509KeyPair(c.TLSCertFile, c.TLSKeyFile)

@@ -67,7 +65,6 @@ return &cert

} // replace with wildcard cert - hostname := strings.SplitN(c.Host, ":", 1)[0] server.HandleFunc(hostname, gmiIndex) server.HandleFunc("*."+hostname, gmiPage)
M templates/my_site.htmltemplates/my_site.html

@@ -15,7 +15,7 @@ {{ .Name }}</a>

<a href="/edit/{{.Name}}">edit</a> <form action="/delete/{{.Name}}" method="POST" class="inline"> <input - class="button" + class="button delete" type="submit" onclick="return confirm('Are you sure you want to delete this file?');" value="delete"
M templates/static/style.csstemplates/static/style.css

@@ -9,7 +9,8 @@ line-height: 1.5;

} p { - margin-bottom: 0px; + margin-bottom: .2em; + line-height: 1.5; margin-top: 0px; }

@@ -42,6 +43,11 @@ }

.button:hover { background-color: black; + color: white; +} + +.delete:hover { + background-color: red; color: white; }