flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit f97798806466ad41104f9a09757226b553b137e7
parent 803bb266d991ee8ddb1b7d977c7caa5bb361d399
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 24 Oct 2020 00:08:13 -0700

rough draft of new style

Diffstat:
Mhttp.go | 4++--
Mtemplates/index.html | 2+-
Mtemplates/static/style.css | 27++++++++++++---------------
3 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/http.go b/http.go @@ -23,7 +23,7 @@ func renderError(w http.ResponseWriter, errorMsg string, statusCode int) { // TO } } -func indexHandler(w http.ResponseWriter, r *http.Request) { +func rootHandler(w http.ResponseWriter, r *http.Request) { // serve everything inside static directory if r.URL.Path != "/" { fileName := path.Join(c.TemplatesDirectory, "static", r.URL.Path) @@ -185,7 +185,7 @@ func runHTTPServer() { if err != nil { log.Fatal(err) } - http.HandleFunc(c.RootDomain+"/", indexHandler) + http.HandleFunc(c.RootDomain+"/", rootHandler) http.HandleFunc(c.RootDomain+"/my_site", mySiteHandler) http.HandleFunc(c.RootDomain+"/edit/", editFileHandler) http.HandleFunc(c.RootDomain+"/login", loginHandler) diff --git a/templates/index.html b/templates/index.html @@ -1,6 +1,6 @@ {{$domain := .Domain}} {{template "header" .}} -<h1>{{.PageTitle}}</h1> +<h1>{{.PageTitle}}!</h1> {{template "nav.html" .}} <h2>All users:</h2> {{ range .Users}} diff --git a/templates/static/style.css b/templates/static/style.css @@ -2,8 +2,14 @@ main { max-width: 70ch; padding: 2ch; margin: auto; - font-family: Helvetica, Arial, monospace; + font-family: monospace; word-wrap: break-word; + border: 1px solid black; + background-color: white; +} + +body { + background-color: lightgray; } .inline { @@ -23,18 +29,6 @@ img { resize: none; } -.status { - border: 1px solid black; - margin-top: 3px; - margin-bottom: 3px; - padding-left: 0.5ch; -} - -.status-text { - font-family: monospace; - padding: 0.5ch; -} - .button { background-color: white; /* Green */ border: 1px solid black; @@ -54,13 +48,16 @@ img { color: red; } +a:visited { + color: blue; +} + a { - color: black; transition-duration: 0.2s; font-weight: bold; } a:hover { - background-color: black; + background-color: blue; color: white; }