flounder

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

commit 6408dd4400ca0299e96b7e5460584ea57b17a8a3
parent 239150b9876056a44d5c442b28059adb169bf4b7
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 24 Nov 2020 11:24:49 -0800

Fix styles a bit

Diffstat:
Mgmi2html.go | 12++++++------
Mtemplates/static/style.css | 4+++-
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/gmi2html.go b/gmi2html.go @@ -16,11 +16,11 @@ func textToHTML(text gemini.Text) string { if _, ok := l.(gemini.LineListItem); ok { if !list { list = true - fmt.Fprint(&b, "<ul>\n") + fmt.Fprint(&b, "<ul>") } } else if list { list = false - fmt.Fprint(&b, "</ul>\n") + fmt.Fprint(&b, "</ul>") } switch l.(type) { case gemini.LineLink: @@ -37,12 +37,12 @@ func textToHTML(text gemini.Text) string { altText := string(l.(gemini.LinePreformattingToggle)) if altText != "" { altText = html.EscapeString(altText) - fmt.Fprintf(&b, "<pre title='%s'>\n", altText) + fmt.Fprintf(&b, "<pre title='%s'>", altText) } else { fmt.Fprint(&b, "<pre>\n") } } else { - fmt.Fprint(&b, "</pre>\n") + fmt.Fprint(&b, "</pre>") } case gemini.LinePreformattedText: text := string(l.(gemini.LinePreformattedText)) @@ -72,10 +72,10 @@ func textToHTML(text gemini.Text) string { } } if pre { - fmt.Fprint(&b, "</pre>\n") + fmt.Fprint(&b, "</pre>") } if list { - fmt.Fprint(&b, "</ul>\n") + fmt.Fprint(&b, "</ul>") } return b.String() } diff --git a/templates/static/style.css b/templates/static/style.css @@ -14,8 +14,10 @@ h1, h2, h3, h4, h5, h6{ } .gemini { -white-space: pre-wrap; + white-space: pre-wrap; + line-height: 1.5; } + body { }