From 68642970541f734f06c33fdceebef6fb10e3a70a Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 23 Jan 2020 00:18:25 +0300 Subject: [PATCH] Trivial style changes --- cmd/sgblog/main.go | 19 +++++++++++-------- common.go | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/sgblog/main.go b/cmd/sgblog/main.go index 667c301..fc99775 100644 --- a/cmd/sgblog/main.go +++ b/cmd/sgblog/main.go @@ -380,12 +380,13 @@ func main() { var table bytes.Buffer table.WriteString( - "\n" + + "
\n" + + "\n" + "" + "" + "" + - "" + - "" + + `` + + `` + "\n") for _, entry := range entries { commentN++ @@ -428,12 +429,12 @@ func main() { href = cfg.URLPrefix + "/" } links = append(links, ``) - refs.WriteString(makeA(href, " [prev]")) + refs.WriteString("\n" + makeA(href, "[prev]")) } if !logEnded { href = cfg.URLPrefix + "/?offset=" + strconv.Itoa(offset+PageEntries) links = append(links, ``) - refs.WriteString(makeA(href, " [next]")) + refs.WriteString("\n" + makeA(href, "[next]")) } os.Stdout.Write([]byte(startHeader(etagHash, gzipWriter != nil))) @@ -549,16 +550,18 @@ func main() { } out.Write([]byte(startHTML(fmt.Sprintf("%s (%s)", title, when), links))) if cfg.AboutURL != "" { - out.Write([]byte(fmt.Sprintf("[%s] ", makeA(cfg.AboutURL, "about")))) + out.Write([]byte(fmt.Sprintf("[%s]\n", makeA(cfg.AboutURL, "about")))) } if parent != "" { out.Write([]byte(fmt.Sprintf( - "[%s] ", + "[%s]\n", makeA(cfg.URLPrefix+"/"+parent, "older"), ))) } out.Write([]byte(fmt.Sprintf( - "[%s] [%s]
\n

%s

\n
\n",
+			"[%s]\n"+
+				"[%s]\n"+
+				"
\n

%s

\n
\n",
 			when, commit.Hash.String(), title,
 		)))
 		for _, line := range lines[2:] {
diff --git a/common.go b/common.go
index 8d92801..e6bc9e5 100644
--- a/common.go
+++ b/common.go
@@ -3,5 +3,5 @@ package sgblog
 
 const (
 	WhenFmt = "2006-01-02 15:04:05Z07:00"
-	Version = "0.3.2"
+	Version = "0.3.3"
 )
-- 
2.44.0

Comments
NWhenTitleLCLCLinked to