all repos — flounder @ 6c6efc0d1936efc22f9116e7510f614523885a96

A small site builder for the Gemini protocol

Revert "Add pre word wrap css"

This reverts commit 239150b9876056a44d5c442b28059adb169bf4b7.
alex wennerberg alex@alexwennerberg.com
Tue, 24 Nov 2020 18:28:06 -0800
commit

6c6efc0d1936efc22f9116e7510f614523885a96

parent

5a1f407a0b10e1b634855573fff2df16d88fb952

3 files changed, 8 insertions(+), 13 deletions(-)

jump to
M gmi2html.gogmi2html.go

@@ -30,7 +30,7 @@ name := html.EscapeString(link.Name)

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 @@ text := string(l.(gemini.LinePreformattedText))

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

@@ -13,9 +13,6 @@ margin-top:0;

margin-bottom:.2em; } -.gemini { -white-space: pre-wrap; -} body { }
M templates/user_page.htmltemplates/user_page.html

@@ -9,9 +9,7 @@ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{.Favicon}}</text></svg>">

</head> <body> <main> - <div class="gemini"> {{.SiteBody}} - </div> </main> </body> </html>