dmitri.shuralyov.com/website/gido/...

Improve alignment of some HTML tags.

These are minor changes, but they make the generated HTML look more
pretty and balanced.
dmitshur committed 4 years ago commit 3338e6b706266c6d90d3313dd28e6e99e8fae31f
main.go
@@ -200,11 +200,11 @@ func (h *handler) ServeIndex(w http.ResponseWriter, req *http.Request) error {
			</ul>

			<p>Import paths of 3rd party packages (e.g., <code>github.com/...</code>) are not supported at this time.</p>

			<p>It's a simple website with a narrow scope. Enjoy. ʕ◔ϖ◔ʔ</p>
		`)
			`)
	if err != nil {
		return err
	}

	_, err = io.WriteString(w, `<h3 style="margin-top: 30px;">Popular Packages</h3>`)
@@ -305,15 +305,15 @@ func (h *handler) ServePackages(w http.ResponseWriter, req *http.Request) error
	}

	// Write note about other issues.
	_, err = io.WriteString(w, `<h3 id="other" style="margin-top: 30px;">Other Issues</h3>

		<p>
			Issues from the <a href="https://golang.org/issues">Go issue tracker</a>
			that don't fit into any existing Go package
			can be seen under <a href="/other">other</a>.
		</p>`)
			<p>
				Issues from the <a href="https://golang.org/issues">Go issue tracker</a>
				that don't fit into any existing Go package
				can be seen under <a href="/other">other</a>.
			</p>`)
	if err != nil {
		return err
	}

	_, err = io.WriteString(w, htmlPart3)
@@ -324,18 +324,19 @@ type pkg struct {
	Path string `json:"ImportPath"`
	Open int    `json:"OpenIssues"`
}

func renderTable(w io.Writer, pkgs []pkg) error {
	_, err := io.WriteString(w, `<table class="table table-sm">
		<thead>
			<tr>
				<th>Path</th>
				<th>Open Issues</th>
			</tr>
		</thead>
		<tbody>`)
	_, err := io.WriteString(w, `
			<table class="table table-sm">
				<thead>
					<tr>
						<th>Path</th>
						<th>Open Issues</th>
					</tr>
				</thead>
				<tbody>`)
	if err != nil {
		return err
	}
	for _, p := range pkgs {
		err := html.Render(w, htmlg.TR(
@@ -344,11 +345,12 @@ func renderTable(w io.Writer, pkgs []pkg) error {
		))
		if err != nil {
			return err
		}
	}
	_, err = io.WriteString(w, `</tbody></table>`)
	_, err = io.WriteString(w, `</tbody>
			</table>`)
	return err
}

// ServeIssues serves a list of issues for the package with import path pkg.
func (h *handler) ServeIssues(w http.ResponseWriter, req *http.Request, pkg string) error {