Files

26 lines
536 B
Go

package appui
import (
_ "embed"
"strings"
)
//go:embed index.html
var indexHTML string
//go:embed app.css
var appCSS string
//go:embed app.js
var appJS string
// IndexHTML is the full GUI document (CSS/JS inlined for WebView2 / glaze).
var IndexHTML = buildIndexHTML()
func buildIndexHTML() string {
s := indexHTML
s = strings.Replace(s, `<link rel="stylesheet" href="app.css" />`, "<style>\n"+appCSS+"\n</style>", 1)
s = strings.Replace(s, `<script src="app.js"></script>`, "<script>\n"+appJS+"\n</script>", 1)
return s
}