diff --git a/cmd/wsh/cmd/wshcmd-html.go b/cmd/wsh/cmd/wshcmd-html.go index cd48216ef..6c8345128 100644 --- a/cmd/wsh/cmd/wshcmd-html.go +++ b/cmd/wsh/cmd/wshcmd-html.go @@ -34,51 +34,51 @@ var htmlCmd = &cobra.Command{ func StyleTag(ctx context.Context, props map[string]any) any { return vdom.Bind(` - - `, nil) + .bg-label { + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + } + + `, nil) } func BgItemTag(ctx context.Context, props map[string]any) any { @@ -124,27 +124,27 @@ func AllBgItemsTag(ctx context.Context, props map[string]any) any { bgElems = append(bgElems, elem) } return vdom.Bind(` -
-
- -
-
- `, map[string]any{"bgElems": bgElems}) +
+
+ +
+
+ `, map[string]any{"bgElems": bgElems}) } func MakeVDom() *vdom.VDomElem { vdomStr := ` -
- -

Set Background

-
- -
-
- -
-
- ` +
+ +

Set Background

+
+ +
+
+ +
+
+ ` elem := vdom.Bind(vdomStr, nil) return elem } @@ -166,9 +166,6 @@ func htmlRun(cmd *cobra.Command, args []string) error { GlobalVDomClient = client client.SetGlobalEventHandler(GlobalEventHandler) log.Printf("created client: %v\n", client) - client.SetAtomVal("bgcolor", "#0000ff77") - client.SetAtomVal("text", "initial text") - client.SetAtomVal("num", 0) client.RegisterComponent("StyleTag", StyleTag) client.RegisterComponent("BgItemTag", BgItemTag) client.RegisterComponent("AllBgItemsTag", AllBgItemsTag)