2023-05-12 10:57:42 +00:00
|
|
|
package navigation
|
2023-05-08 18:43:07 +00:00
|
|
|
|
|
|
|
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
import "reflect"
|
|
|
|
import "github.com/vugu/vjson"
|
|
|
|
import "github.com/vugu/vugu"
|
|
|
|
import js "github.com/vugu/vugu/js"
|
|
|
|
|
2023-05-15 06:58:12 +00:00
|
|
|
import (
|
|
|
|
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
|
|
|
|
)
|
|
|
|
|
2023-05-12 10:57:42 +00:00
|
|
|
func (c *SidebarEntry) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
|
2023-05-08 18:43:07 +00:00
|
|
|
|
|
|
|
vgout = &vugu.BuildOut{}
|
|
|
|
|
|
|
|
var vgiterkey interface{}
|
|
|
|
_ = vgiterkey
|
|
|
|
var vgn *vugu.VGNode
|
2023-05-12 20:07:04 +00:00
|
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "button", Attr: []vugu.VGAttribute(nil)}
|
2023-05-08 18:43:07 +00:00
|
|
|
vgout.Out = append(vgout.Out, vgn) // root for output
|
2023-05-15 06:58:12 +00:00
|
|
|
vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1683622560 " + c.classes})
|
2023-05-08 18:43:07 +00:00
|
|
|
vgn.DOMEventHandlerSpecList = append(vgn.DOMEventHandlerSpecList, vugu.DOMEventHandlerSpec{
|
|
|
|
EventType: "click",
|
|
|
|
Func: func(event vugu.DOMEvent) { c.handleClick(event) },
|
|
|
|
// TODO: implement capture, etc. mostly need to decide syntax
|
|
|
|
})
|
|
|
|
{
|
|
|
|
vgparent := vgn
|
|
|
|
_ = vgparent
|
|
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
|
|
|
|
vgparent.AppendChild(vgn)
|
|
|
|
{
|
|
|
|
var vgcomp vugu.Builder = c.SymbolSlot
|
|
|
|
if vgcomp != nil {
|
|
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
|
|
vgparent.AppendChild(vgn)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
var vgcomp vugu.Builder = c.DefaultSlot
|
|
|
|
if vgcomp != nil {
|
|
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
|
|
vgparent.AppendChild(vgn)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
|
|
|
|
vgparent.AppendChild(vgn)
|
|
|
|
}
|
|
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
|
|
|
|
{
|
2023-05-12 10:57:42 +00:00
|
|
|
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1683622560 {\n\t\tdisplay: flex;\n\t\tgap: 12px;\n\t\ttext-decoration: none;\n\t\tpadding: 8px;\n\t\tmargin: 8px 0;\n\t\tborder-radius: 4px;\n\t\tborder: none;\n\t\tbackground-color: white;\n\t\twidth: 100%;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t.d3c-1683622560 > * {\n\t\theight: 16px;\n\t}\n\n\t.d3c-1683622560:hover {\n\t\tbackground-color: RGBA(127, 127, 127, 0.1);\n\t}\n\n\t.d3c-1683622560-selected {\n\t\tbackground-color: RGBA(127, 127, 127, 0.2);\n\t}\n\n\t.d3c-1633357633-sidebar-minimized .d3c-1683622560 > *:not(:first-child) {\n\t\tdisplay: none;\n\t}\n", Attr: []vugu.VGAttribute(nil)})
|
2023-05-08 18:43:07 +00:00
|
|
|
}
|
|
|
|
vgout.AppendCSS(vgn)
|
|
|
|
return vgout
|
|
|
|
}
|
|
|
|
|
|
|
|
// 'fix' unused imports
|
|
|
|
var _ fmt.Stringer
|
|
|
|
var _ reflect.Type
|
|
|
|
var _ vjson.RawMessage
|
|
|
|
var _ js.Value
|