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

Merge branch 'master' into Move-headless-capability-into-own-library

This commit is contained in:
Lea Anthony 2019-01-29 08:36:27 +11:00
commit 847842504b
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 package main
import ( import (
"github.com/gobuffalo/packr"
wails "github.com/wailsapp/wails" 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() { func main() {
// Assets
assets := packr.NewBox("./frontend")
// Initialise the app // Initialise the app
app := wails.CreateApp(&wails.AppConfig{ app := wails.CreateApp(&wails.AppConfig{
Width: 1024, Width: 1024,
Height: 768, Height: 768,
Title: "{{.Name}}", Title: "{{.Name}}",
HTML: html, HTML: wails.BoxString(&assets, "main.html"),
}) })
app.Run() 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>Custom CSS Template</h1>
Welcome to your basic Wails app with custom CSS!
</div>

View File

@ -1,24 +1,21 @@
package main package main
import ( import (
"github.com/gobuffalo/packr"
wails "github.com/wailsapp/wails" 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() { func main() {
// Assets
assets := packr.NewBox("./frontend")
// Initialise the app // Initialise the app
app := wails.CreateApp(&wails.AppConfig{ app := wails.CreateApp(&wails.AppConfig{
Width: 800, Width: 1024,
Height: 600, Height: 768,
Title: "{{.Name}}", Title: "{{.Name}}",
HTML: html, HTML: wails.BoxString(&assets, "main.html"),
}) })
app.Run() app.Run()
} }