142 lines
3.3 KiB
Go
142 lines
3.3 KiB
Go
// GENERATED BY gitlab.codemonkeysoftware.net/b/hatmill/internal/codegen
|
|
// DO NOT EDIT!
|
|
|
|
package html5
|
|
|
|
import "gitlab.codemonkeysoftware.net/b/hatmill"
|
|
|
|
// Body creates a <body> element.
|
|
func Body(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "body",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Div creates a <div> element.
|
|
func Div(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "div",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Head creates a <head> element.
|
|
func Head(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "head",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Html creates a <html> element.
|
|
func Html(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "html",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Img creates a <img> element.
|
|
func Img(attribs ...hatmill.Attrib) hatmill.EmptyElement {
|
|
return hatmill.EmptyElement{
|
|
TagName: "img",
|
|
Attribs: attribs,
|
|
}
|
|
}
|
|
|
|
// Li creates a <li> element.
|
|
func Li(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "li",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Span creates a <span> element.
|
|
func Span(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "span",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Title creates a <title> element.
|
|
func Title(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "title",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Ul creates a <ul> element.
|
|
func Ul(attribs ...hatmill.Attrib) func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return func(children ...hatmill.Term) hatmill.ParentElement {
|
|
return hatmill.ParentElement{
|
|
EmptyElement: hatmill.EmptyElement{
|
|
TagName: "ul",
|
|
Attribs: attribs,
|
|
},
|
|
Children: children,
|
|
}
|
|
}
|
|
}
|
|
|
|
// Disabled creates a "disabled" attribute
|
|
func Disabled() hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "disabled",
|
|
}
|
|
}
|
|
|
|
// Id creates a "id" attribute
|
|
func Id(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "id",
|
|
Value: value,
|
|
}
|
|
}
|
|
|
|
// Src creates a "src" attribute
|
|
func Src(value string) hatmill.Attrib {
|
|
return hatmill.Attrib{
|
|
Key: "src",
|
|
Value: value,
|
|
}
|
|
}
|