hatmill/example/example.go

22 lines
402 B
Go
Raw Normal View History

2019-03-22 03:31:24 +00:00
package main
import (
2019-03-25 01:56:24 +00:00
"gitlab.codemonkeysoftware.net/b/hatmill"
h "gitlab.codemonkeysoftware.net/b/hatmill/html5"
"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"))(),
),
),
)
2019-03-25 01:56:24 +00:00
hatmill.WriteDocument(os.Stdout, document)
2019-03-22 03:31:24 +00:00
}