package main import ( "net/http" "strings" ) func HomePage(w http.ResponseWriter, r *http.Request) { cfg := LoadConfig() var items strings.Builder for _, n := range visibleNavItems(cfg.BetaToolsEnabled) { if n.Path == "/" { continue } badge := "" if n.Beta { badge = ` Beta` } items.WriteString(`` + n.Label + badge + `` + n.Description + ``) } body := `

HPL Toolbox

Standalone build. Pick a tool to open.

` + items.String() + `
` w.Header().Set("Content-Type", "text/html; charset=utf-8") _, _ = w.Write([]byte(Page("/", "Home", body))) }