5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:51:26 +08:00

Merge pull request #27 from wailsapp/Create-consistent-templates

update basic templates to use a frontend dir
This commit is contained in:
Lea Anthony 2019-01-29 08:29:40 +11:00 committed by GitHub
commit 529e4cc07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 19 deletions

View File

@ -0,0 +1,8 @@
<div style="text-align:center">
<div
class="wails-logo"
style="width: 25rem;margin: auto;height: 25rem;"
></div>
<h1>Basic Template</h1>
Welcome to your basic Wails app!
</div>

View File

@ -1,25 +1,21 @@
package main
import (
"github.com/gobuffalo/packr"
wails "github.com/wailsapp/wails"
)
var html = `
<div style='text-align:center'>
<div class="wails-logo" style="width: 25rem;margin: auto;height: 25rem;"></div>
<h1> Basic Template </h1>
Welcome to your basic Wails app!
</div>
`
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()
}

View File

@ -0,0 +1,8 @@
<div style="text-align:center">
<div
class="wails-logo"
style="width: 25rem;margin: auto;height: 25rem;"
></div>
<h1>Basic Template</h1>
Welcome to your basic Wails app!
</div>

View File

@ -1,24 +1,21 @@
package main
import (
"github.com/gobuffalo/packr"
wails "github.com/wailsapp/wails"
)
var html = `
<div style='text-align:center'>
<h1> Custom </h1>
Welcome to your basic Wails app with added CSS!
</div>
`
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()
}