-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_js.go
49 lines (45 loc) · 987 Bytes
/
main_js.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// +build go1.12,wasm,js js wasm
package main
import (
"github.com/gopherjs/vecty"
"github.com/pubgo/vue2vecty/vfrontend"
"github.com/vincent-petithory/dataurl"
)
func main() {
vecty.AddStylesheet(dataurl.New([]byte(styles), "text/css").String())
app := &vfrontend.App{}
app.Init()
p := vfrontend.NewPage(app)
vecty.RenderBody(p)
}
var styles = `
html, body {
height: 100%;
}
.editor {
height: 100%;
width: 100%;
}
.split {
height: 100%;
width: 100%;
}
.gutter {
height: 100%;
background-color: #eee;
background-repeat: no-repeat;
background-position: 50%;
}
.gutter.gutter-horizontal {
cursor: col-resize;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==')
}
.split {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.split, .gutter.gutter-horizontal {
float: left;
}
`