might work

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-12 14:33:30 -06:00
parent e6e9b548cb
commit 012eacafd9
2 changed files with 14 additions and 10 deletions

View File

@ -76,7 +76,7 @@ func indexBodyStart(w http.ResponseWriter) {
func insertHTMLnote(w http.ResponseWriter, i int, parts []string) {
log.Info("comment # line:", i, strings.Join(parts, " "))
fmt.Fprintln(w, " <tr> <td><h5>", strings.Join(parts, " "), "</h5></td> <td></td> <td></td> <td></td> <td></td> </tr>")
fmt.Fprintln(w, " <tr> <td><h3>", strings.Join(parts, " "), "</h3></td> <td></td> <td></td> <td></td> <td></td> </tr>")
}
func indexBodyScanConfig(w http.ResponseWriter) {
@ -107,11 +107,15 @@ func indexBodyScanConfig(w http.ResponseWriter) {
func indexBodyRepo(w http.ResponseWriter, gourl string, giturl string, github string) {
// fmt.Fprintln(w, " <tr> <td><h5>log/ (needed for the gui)</h5></td> <td></td> <td></td> <td></td> <td></td> </tr>")
fmt.Fprintln(w, " <tr>")
fmt.Fprintln(w, " <td>", gourl, "</td>")
fmt.Fprintln(w, " <td> <a href=\"//", gourl, "\">", gourl, "</a></td>")
fmt.Fprintln(w, " <td> <a href=\"//git.wit.org/wit/log\">git.wit.org/wit/log</a></td>")
fmt.Fprintln(w, " <td>" + gourl + "</td>")
fmt.Fprintln(w, " <td> <a href=\"//" + gourl + "\">" + gourl + "</a></td>")
fmt.Fprintln(w, " <td> <a href=\"//" + gourl + "\">" + giturl + "</a></td>")
if github == "" {
fmt.Fprintln(w, " <td></td>")
} else {
fmt.Fprintln(w, " <td> <a href=\"//github.com/wit-go/log\">github.com/wit-go/log</a></td>")
fmt.Fprintln(w, " <td> <a href=\"//pkg.go.dev/go.wit.com/log\"> <img src=\"goReference.svg\" alt=\"Go Reference\" /> </a> </td>")
}
fmt.Fprintln(w, " <td> <a href=\"//pkg.go.dev/" + gourl + "\"> <img src=\"goReference.svg\" alt=\"pkg.go.dev docs\" /> </a> </td>")
fmt.Fprintln(w, " </tr>")
fmt.Fprintln(w, "")
}

View File

@ -21,10 +21,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
if tmp == "/" {
findFile(w, "files/index.html")
return
}
if tmp == "/new" {
indexHeader(w)
indexBodyStart(w)
indexBodyScanConfig(w)
@ -32,6 +28,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
indexBodyEnd(w)
return
}
if tmp == "/old" {
findFile(w, "files/index.html")
return
}
if tmp == "/test" {
findFile(w, "files/repo.html")
return