add svg, new repos

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-11 19:26:44 -06:00
parent 24c2b897f0
commit 6127ce156f
4 changed files with 24 additions and 0 deletions

1
files/goReference.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

4
files/install.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash -x
#
echo "TODO: make this work"

View File

@ -10,11 +10,13 @@ go.wit.com/apps/basicwindow git.wit.org/jcarr/basicwindow A bit more of a Demo
go.wit.com/apps/gadgetwindow git.wit.org/jcarr/gadgetwindow A more complicated Demo used for debugging the toolkits go.wit.com/apps/gadgetwindow git.wit.org/jcarr/gadgetwindow A more complicated Demo used for debugging the toolkits
go.wit.com/apps/autotypist git.wit.org/jcarr/autotypist Wrapper around 'git' and 'go' for these repos go.wit.com/apps/autotypist git.wit.org/jcarr/autotypist Wrapper around 'git' and 'go' for these repos
go.wit.com/apps/guireleaser git.wit.org/jcarr/guireleaser go.wit.com/apps/guireleaser git.wit.org/jcarr/guireleaser
go.wit.com/apps/go-deb git.wit.org/jcarr/go-deb Turn a GO package into a .deb package
go.wit.com/apps/control-panel-digitalocean git.wit.org/wit/control-panel-digitalocean A simple Digital Ocean Control Panel go.wit.com/apps/control-panel-digitalocean git.wit.org/wit/control-panel-digitalocean A simple Digital Ocean Control Panel
go.wit.com/apps/control-panel-dns git.wit.org/jcarr/control-panel-dns A DNS Control Panel go.wit.com/apps/control-panel-dns git.wit.org/jcarr/control-panel-dns A DNS Control Panel
go.wit.com/apps/control-panel-cloudflare git.wit.org/wit/control-panel-cloudflare go.wit.com/apps/control-panel-cloudflare git.wit.org/wit/control-panel-cloudflare
go.wit.com/apps/control-panel-vpn git.wit.org/jcarr/control-panel-vpn go.wit.com/apps/control-panel-vpn git.wit.org/jcarr/control-panel-vpn
go.wit.com/apps/go.wit.com git.wit.org/jcarr/go.wit.com go.wit.com/apps/go.wit.com git.wit.org/jcarr/go.wit.com
go.wit.com/apps/clone-gitea git.wit.org/jcarr/clone-gitea
# gui toolkit packages # gui toolkit packages
go.wit.com/toolkits/tree git.wit.org/toolkits/tree Common plugin code to talk to the GUI go.wit.com/toolkits/tree git.wit.org/toolkits/tree Common plugin code to talk to the GUI

17
main.go
View File

@ -55,6 +55,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
findFile(w, "files/index.html") findFile(w, "files/index.html")
return return
} }
if tmp == "/install.sh" {
findFile(w, "files/install.sh")
return
}
if tmp == "/me" { if tmp == "/me" {
j, err := dumpJsonClient(r) j, err := dumpJsonClient(r)
if err != nil { if err != nil {
@ -75,6 +79,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
findFile(w, "files/test.html") findFile(w, "files/test.html")
return return
} }
if tmp == "/goReference.svg" {
findFile(w, "files/goReference.svg")
return
}
if tmp == "/skeleton.v2.css" { if tmp == "/skeleton.v2.css" {
findFile(w, "files/skeleton.v2.css") findFile(w, "files/skeleton.v2.css")
return return
@ -95,6 +103,9 @@ func findFile(w http.ResponseWriter, filename string) {
var repohtml string var repohtml string
repohtml = string(pfile) repohtml = string(pfile)
if filename == "files/goReference.svg" {
w.Header().Set("Content-Type", "image/svg+xml")
}
fmt.Fprintln(w, repohtml) fmt.Fprintln(w, repohtml)
log.Println("findFile() found internal file:", filename) log.Println("findFile() found internal file:", filename)
// w.Close() // w.Close()
@ -112,6 +123,12 @@ func main() {
readconfigfile() readconfigfile()
readVersionFile() readVersionFile()
// make the instructions to install be:
// curl -sSL https://go.wit.com/install.sh | bash
// build instruction:
// go install go.wit.com/apps/getgui@latest
// for i, s := range versionMap { // for i, s := range versionMap {
// log.Println("found i =", i, "with", "s =", s) // log.Println("found i =", i, "with", "s =", s)
// } // }