diff --git a/cmd/templates/basic/frontend/main.html b/cmd/templates/basic/frontend/main.html new file mode 100644 index 000000000..927697544 --- /dev/null +++ b/cmd/templates/basic/frontend/main.html @@ -0,0 +1,8 @@ +
+ +

Basic Template

+ Welcome to your basic Wails app! +
diff --git a/cmd/templates/basic/main.go.template b/cmd/templates/basic/main.go.template index b1b37b72d..662a546bb 100644 --- a/cmd/templates/basic/main.go.template +++ b/cmd/templates/basic/main.go.template @@ -1,25 +1,21 @@ package main import ( + "github.com/gobuffalo/packr" wails "github.com/wailsapp/wails" ) -var html = ` -
- -

Basic Template

-Welcome to your basic Wails app! -
-` - func main() { + // Assets + assets := packr.NewBox("./frontend") + // Initialise the app app := wails.CreateApp(&wails.AppConfig{ Width: 1024, Height: 768, Title: "{{.Name}}", - HTML: html, + HTML: wails.BoxString(&assets, "main.html"), }) app.Run() } diff --git a/cmd/templates/custom/frontend/main.html b/cmd/templates/custom/frontend/main.html new file mode 100644 index 000000000..927697544 --- /dev/null +++ b/cmd/templates/custom/frontend/main.html @@ -0,0 +1,8 @@ +
+ +

Basic Template

+ Welcome to your basic Wails app! +
diff --git a/cmd/templates/custom/main.go.template b/cmd/templates/custom/main.go.template index d23e2cd9b..662a546bb 100644 --- a/cmd/templates/custom/main.go.template +++ b/cmd/templates/custom/main.go.template @@ -1,24 +1,21 @@ package main import ( + "github.com/gobuffalo/packr" wails "github.com/wailsapp/wails" ) -var html = ` -
-

Custom

-Welcome to your basic Wails app with added CSS! -
-` - func main() { + // Assets + assets := packr.NewBox("./frontend") + // Initialise the app app := wails.CreateApp(&wails.AppConfig{ - Width: 800, - Height: 600, + Width: 1024, + Height: 768, Title: "{{.Name}}", - HTML: html, + HTML: wails.BoxString(&assets, "main.html"), }) app.Run() }