|
@@ -59,9 +59,21 @@ func (b *CardBuilder) Outlined(v bool) (r *CardBuilder) {
|
|
|
|
|
|
func (b *CardBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
|
|
func (b *CardBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
|
|
var sb h.HTMLComponent
|
|
var sb h.HTMLComponent
|
|
|
|
+ var hr h.HTMLComponent
|
|
if len(b.systemBar) > 0 {
|
|
if len(b.systemBar) > 0 {
|
|
sb = v.VSystemBar(b.systemBar...).Class("mx-2 pt-4").Color("white").Height(32)
|
|
sb = v.VSystemBar(b.systemBar...).Class("mx-2 pt-4").Color("white").Height(32)
|
|
}
|
|
}
|
|
|
|
+ if len(b.children) > 0 {
|
|
|
|
+ empty := true
|
|
|
|
+ for _, c := range b.children {
|
|
|
|
+ if c != nil {
|
|
|
|
+ empty = false
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if !empty {
|
|
|
|
+ hr = v.VDivider()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
return v.VCard(
|
|
return v.VCard(
|
|
sb,
|
|
sb,
|
|
@@ -69,6 +81,6 @@ func (b *CardBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
|
|
v.VToolbarTitle("").Children(b.header...),
|
|
v.VToolbarTitle("").Children(b.header...),
|
|
v.VSpacer(),
|
|
v.VSpacer(),
|
|
).Flat(true).AppendChildren(b.actions...),
|
|
).Flat(true).AppendChildren(b.actions...),
|
|
- v.VDivider(),
|
|
|
|
|
|
+ hr,
|
|
).Outlined(b.outlined).Class(b.classNames...).AppendChildren(b.children...).MarshalHTML(ctx)
|
|
).Outlined(b.outlined).Class(b.classNames...).AppendChildren(b.children...).MarshalHTML(ctx)
|
|
}
|
|
}
|