Added a few more elements

This commit is contained in:
Brandon Dyck 2019-03-23 00:42:05 -06:00
parent 797d92a96b
commit 22fe88873a
2 changed files with 28 additions and 0 deletions

View File

@ -75,3 +75,29 @@ func Span(attribs ...Attrib) func(children ...Term) *ParentElement {
} }
} }
} }
// 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,
}
}
}

View File

@ -4,3 +4,5 @@ body parent
div parent div parent
img empty img empty
span parent span parent
ul parent
li parent