package main import ( "log" "net/http" "html/template" "time" ) type Person struct { UserName string Time string } func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { log.Printf("new request") t := template.New("page") t, _ = t.Parse(webpage) p := Person{UserName: "David", Time: time.Now().String()} t.Execute(w, p) }) log.Printf("Running on port 9000") http.ListenAndServe(":9000", nil) } var webpage = `<!doctype html><html><body> <style> body { background-color: #000011; margin: 0px; overflow: hidden; color: white; } footer { width: 175px; height: 1.5em; position: fixed; bottom: 0; right: 0; padding: 3px 5px 5px 5px; text-align: left; z-index: 200; background-repeat: no-repeat; background-image: url("https://ds604.neocities.org/DavidSarmaDotOrg_h12.png");} canvas { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); /*width: 100vw; height: 100vh*/ } </style> <canvas id="c"></canvas> <footer></footer> </body></html> <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.23/p5.min.js"></script> <script> function setup() { createCanvas(windowWidth, windowHeight); ellipse(width/2, height/2, 30, 30); textSize(30); fill(255); text("hello {{.UserName}}", 100,100); text("time is {{.Time}}", 100, 150); } function mouseClicked() { ellipse(mouseX, mouseY, 10, 10); } </script>`