D3vugu-components/scripts/dev-server/devserver.go
David Vogel 0dda9f7767 Several changes
- Remove license headers
- Update example pages
- Move ButtonNav into navigation package as SidebarEntry
- Add sidebar collapse and hide functionality
- Add click event
- Add click handler to button
- Add ButtonFullscreen to navigation package
- Fix resulting suffix space in CodeInline
- Fix CSS class of Code
- Update icon sketches.cdr
2023-05-12 12:57:42 +02:00

29 lines
812 B
Go

package main
import (
"log"
"net/http"
"os"
"path/filepath"
"github.com/vugu/vugu/simplehttp"
)
func main() {
// A hackish way to insert metadata and other stuff into the head tag.
simplehttp.DefaultStaticData["MetaTags"] = map[string]string{"viewport": "width=device-width, initial-scale=1"}
simplehttp.DefaultStaticData["Title"] = "D3vugu-components examples"
//simplehttp.DefaultStaticData["CSSFiles"] = []string{"/static/css/w3.css", "/static/font-awesome/css/all.min.css"}
wd, _ := os.Getwd()
uiDir := filepath.Join(wd)
l := ":8875"
log.Printf("Starting HTTP Server at %q", l)
h := simplehttp.New(uiDir, true)
http.Handle("/", h)
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(filepath.Join(uiDir, "static")))))
log.Fatal(http.ListenAndServe(l, nil))
}