flounder

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

commit 6c6efc0d1936efc22f9116e7510f614523885a96
parent 5a1f407a0b10e1b634855573fff2df16d88fb952
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 24 Nov 2020 18:28:06 -0800

Revert "Add pre word wrap css"

This reverts commit 239150b9876056a44d5c442b28059adb169bf4b7.

Diffstat:
Mgmi2html.go | 16++++++++--------
Mtemplates/static/style.css | 3---
Mtemplates/user_page.html | 2--
3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/gmi2html.go b/gmi2html.go @@ -30,7 +30,7 @@ func textToHTML(text gemini.Text) string { if name == "" { name = url } - fmt.Fprintf(&b, "<a href='%s'>%s</a>\n", url, name) + fmt.Fprintf(&b, "<p><a href='%s'>%s</a></p>\n", url, name) case gemini.LinePreformattingToggle: pre = !pre if pre { @@ -49,25 +49,25 @@ func textToHTML(text gemini.Text) string { fmt.Fprintf(&b, "%s\n", html.EscapeString(text)) case gemini.LineHeading1: text := string(l.(gemini.LineHeading1)) - fmt.Fprintf(&b, "<h1>%s</h1>", html.EscapeString(text)) + fmt.Fprintf(&b, "<h1>%s</h1>\n", html.EscapeString(text)) case gemini.LineHeading2: text := string(l.(gemini.LineHeading2)) - fmt.Fprintf(&b, "<h2>%s</h2>", html.EscapeString(text)) + fmt.Fprintf(&b, "<h2>%s</h2>\n", html.EscapeString(text)) case gemini.LineHeading3: text := string(l.(gemini.LineHeading3)) - fmt.Fprintf(&b, "<h3>%s</h3>", html.EscapeString(text)) + fmt.Fprintf(&b, "<h3>%s</h3>\n", html.EscapeString(text)) case gemini.LineListItem: text := string(l.(gemini.LineListItem)) - fmt.Fprintf(&b, "<li>%s</li>", html.EscapeString(text)) + fmt.Fprintf(&b, "<li>%s</li>\n", html.EscapeString(text)) case gemini.LineQuote: text := string(l.(gemini.LineQuote)) - fmt.Fprintf(&b, "<blockquote>%s</blockquote>", html.EscapeString(text)) + fmt.Fprintf(&b, "<blockquote>%s</blockquote>\n", html.EscapeString(text)) case gemini.LineText: text := string(l.(gemini.LineText)) if text == "" { - fmt.Fprint(&b, "\n") + fmt.Fprint(&b, "<br>\n") } else { - fmt.Fprintf(&b, "%s\n", html.EscapeString(text)) + fmt.Fprintf(&b, "<p>%s</p>\n", html.EscapeString(text)) } } } diff --git a/templates/static/style.css b/templates/static/style.css @@ -13,9 +13,6 @@ h1, h2, h3, h4, h5, h6{ margin-bottom:.2em; } -.gemini { -white-space: pre-wrap; -} body { } diff --git a/templates/user_page.html b/templates/user_page.html @@ -9,9 +9,7 @@ </head> <body> <main> - <div class="gemini"> {{.SiteBody}} - </div> </main> </body> </html>