hatmill/example/example.go

21 lines
347 B
Go
Raw Normal View History

2019-03-22 03:31:24 +00:00
package main
import (
2019-03-22 04:30:27 +00:00
h "gitlab.codemonkeysoftware.net/b/hatmill"
"os"
2019-03-22 03:31:24 +00:00
)
func main() {
document := h.Html()(
h.Head()(),
h.Body()(
h.Div()(
h.Img(h.Src("./me.jpg"), h.Id("profile-photo")),
h.Text("hello hatmill!"),
2019-03-22 03:58:23 +00:00
h.Div(h.Disabled(), h.Data("coolness", "awesome"))(),
),
),
)
h.WriteDocument(os.Stdout, document)
2019-03-22 03:31:24 +00:00
}