Added attribute function generator and more element defs

This commit is contained in:
2019-03-21 21:49:26 -06:00
parent 8517cab0f5
commit 328e865231
9 changed files with 284 additions and 178 deletions

View File

@ -1,17 +1,20 @@
package main
import (
"os"
h "gitlab.codemonkeysoftware.com/b/hatmill"
h "gitlab.codemonkeysoftware.com/b/hatmill"
"os"
)
func main() {
document := h.Html()(
h.Div()(
h.Img(h.Id("profile-photo")),
h.Text("hello hatmill!"),
h.Div(h.Disabled())(),
),
)
h.WriteDocument(os.Stdout, document)
document := h.Html()(
h.Head()(),
h.Body()(
h.Div()(
h.Img(h.Src("./me.jpg"), h.Id("profile-photo")),
h.Text("hello hatmill!"),
h.Div(h.Disabled())(),
),
),
)
h.WriteDocument(os.Stdout, document)
}