2016-03-16 22:23:16 +00:00
|
|
|
// Generated by egon.
|
|
|
|
// 🚫Edit at your own risk.
|
|
|
|
|
|
|
|
package server
|
|
|
|
import (
|
|
|
|
"io"
|
2018-05-25 21:54:36 +00:00
|
|
|
"github.com/mailru/easyjson"
|
2016-03-16 22:23:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func IndexTemplate(w io.Writer, data *indexData, cssPath, jsPath string) error {
|
2018-09-18 20:09:08 +00:00
|
|
|
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 rel=\"preload\" href=\"/font/fontello.woff2?48901973\" as=\"font\" type=\"font/woff2\" crossorigin=\"anonymous\"><link rel=\"preload\" href=\"/font/RobotoMono-Regular.woff2\" as=\"font\" type=\"font/woff2\" crossorigin=\"anonymous\"><link rel=\"preload\" href=\"/font/Montserrat-Regular.woff2\" as=\"font\" type=\"font/woff2\" crossorigin=\"anonymous\"><link rel=\"preload\" href=\"/font/Montserrat-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin=\"anonymous\"><link rel=\"preload\" href=\"/font/RobotoMono-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin=\"anonymous\"><link href=\"/")
|
2016-03-16 22:23:16 +00:00
|
|
|
io.WriteString(w, cssPath )
|
2017-03-23 19:55:34 +00:00
|
|
|
io.WriteString(w, "\" rel=\"stylesheet\"><link rel=\"icon\" href=\"data:;base64,=\"></head><body><div id=\"root\"></div><script id=\"env\" type=\"application/json\">")
|
2018-05-25 21:54:36 +00:00
|
|
|
easyjson.MarshalToWriter(data, w)
|
2016-03-16 22:23:16 +00:00
|
|
|
io.WriteString(w, "</script><script src=\"/")
|
|
|
|
io.WriteString(w, jsPath )
|
|
|
|
io.WriteString(w, "\"></script></body></html>")
|
|
|
|
return nil
|
|
|
|
}
|