20 lines
699 B
Go
20 lines
699 B
Go
|
// Generated by egon.
|
||
|
// 🚫Edit at your own risk.
|
||
|
|
||
|
package server
|
||
|
import (
|
||
|
"io"
|
||
|
"encoding/json"
|
||
|
)
|
||
|
|
||
|
func IndexTemplate(w io.Writer, data *indexData, cssPath, jsPath string) error {
|
||
|
io.WriteString(w, "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Dispatch</title><link href=\"/")
|
||
|
io.WriteString(w, cssPath )
|
||
|
io.WriteString(w, "\" rel=\"stylesheet\"></head><body><div id=\"root\"></div><script id=\"env\" type=\"application/json\">")
|
||
|
json.NewEncoder(w).Encode(data)
|
||
|
io.WriteString(w, "</script><script src=\"/")
|
||
|
io.WriteString(w, jsPath )
|
||
|
io.WriteString(w, "\"></script></body></html>")
|
||
|
return nil
|
||
|
}
|