hatmill/elements.go

117 lines
2.5 KiB
Go
Raw Normal View History

2019-03-22 03:31:24 +00:00
// GENERATED BY gitlab.codemonkeysoftware.net/b/hatmill/internal/elementgen
// DO NOT EDIT!
package hatmill
// Html creates a <html> element.
func Html(attribs ...Attrib) func(children ...Term) *ParentElement {
2019-03-22 03:31:24 +00:00
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "html",
2019-03-22 03:31:24 +00:00
Attribs: attribs,
},
Children: children,
}
}
}
// Head creates a <head> element.
func Head(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "head",
Attribs: attribs,
},
Children: children,
}
2019-03-22 03:31:24 +00:00
}
}
// Body creates a <body> element.
func Body(attribs ...Attrib) func(children ...Term) *ParentElement {
2019-03-22 03:31:24 +00:00
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "body",
2019-03-22 03:31:24 +00:00
Attribs: attribs,
},
Children: children,
}
}
}
// Div creates a <div> element.
func Div(attribs ...Attrib) func(children ...Term) *ParentElement {
2019-03-22 03:31:24 +00:00
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "div",
Attribs: attribs,
},
Children: children,
}
}
}
// Img creates a <img> element.
func Img(attribs ...Attrib) EmptyElement {
return EmptyElement{
TagName: "img",
Attribs: attribs,
}
}
// Span creates a <span> element.
func Span(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "span",
2019-03-22 03:31:24 +00:00
Attribs: attribs,
},
Children: children,
}
}
}
2019-03-23 06:42:05 +00:00
// Ul creates a <ul> element.
func Ul(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "ul",
Attribs: attribs,
},
Children: children,
}
}
}
// Li creates a <li> element.
func Li(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "li",
Attribs: attribs,
},
Children: children,
}
}
}
2019-03-23 06:43:48 +00:00
// Title creates a <title> element.
func Title(attribs ...Attrib) func(children ...Term) *ParentElement {
return func(children ...Term) *ParentElement {
return &ParentElement{
EmptyElement: EmptyElement{
TagName: "title",
Attribs: attribs,
},
Children: children,
}
}
}