all repos — flounder @ 6408dd4400ca0299e96b7e5460584ea57b17a8a3

A small site builder for the Gemini protocol

Fix styles a bit
alex wennerberg alex@alexwennerberg.com
Tue, 24 Nov 2020 11:24:49 -0800
commit

6408dd4400ca0299e96b7e5460584ea57b17a8a3

parent

239150b9876056a44d5c442b28059adb169bf4b7

2 files changed, 9 insertions(+), 7 deletions(-)

jump to
M gmi2html.gogmi2html.go

@@ -16,11 +16,11 @@ for _, l := range text {

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 @@ if pre {

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 @@ }

} } 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() }
M templates/static/style.csstemplates/static/style.css

@@ -14,8 +14,10 @@ margin-bottom:.2em;

} .gemini { -white-space: pre-wrap; + white-space: pre-wrap; + line-height: 1.5; } + body { }