Added a few more elements
This commit is contained in:
parent
797d92a96b
commit
22fe88873a
26
elements.go
26
elements.go
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,3 +4,5 @@ body parent
|
||||
div parent
|
||||
img empty
|
||||
span parent
|
||||
ul parent
|
||||
li parent
|
||||
|
Loading…
Reference in New Issue
Block a user