From f261ca0ecee06a113da2bb71345e3847ec901dd6 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 10 Dec 2017 13:25:34 +1300 Subject: [PATCH] pretty up the generated HTML --- ArchiveState.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ArchiveState.go b/ArchiveState.go index 2032371..2ed3660 100644 --- a/ArchiveState.go +++ b/ArchiveState.go @@ -217,7 +217,7 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) { - `)) +`)) // Generate month dropdown options @@ -253,18 +253,18 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) { for ympair := this.log.EarliestDate(); !ympair.Equals(limit); ympair = ympair.Next() { if ympair.Year != lastY { if lastY != -1 { - w.Write([]byte(``)) + w.Write([]byte("\t\t\t\t\n")) } - w.Write([]byte(``)) + w.Write([]byte(fmt.Sprintf("\t\t\t\t\n", ympair.Year))) lastY = ympair.Year } targetUri := fmt.Sprintf(`/%s/%d/%d`, this.logBestSlug, ympair.Year, ympair.Month) - w.Write([]byte(fmt.Sprintf(``, html.EscapeString(targetUri), attr(ympair.Equals(this.ym), "selected"), html.EscapeString(ympair.Month.String())))) + w.Write([]byte(fmt.Sprintf("\t\t\t\t\t\n", html.EscapeString(targetUri), attr(ympair.Equals(this.ym), " selected"), html.EscapeString(ympair.Month.String())))) } if lastY != -1 { - w.Write([]byte(``)) + w.Write([]byte("\t\t\t\t\n")) } w.Write([]byte(`