~repos /gromer
git clone https://pyrossh.dev/repos/gromer.git
gromer is a framework and cli to build multipage web apps in golang using htmx and alpinejs.
fix NewElement
- attributes.go +1 -0
- html.go +9 -9
attributes.go
CHANGED
|
@@ -156,6 +156,7 @@ func MergeAttributes(parent *Element, uis ...interface{}) *Element {
|
|
|
156
156
|
case nil:
|
|
157
157
|
// dont need to add nil items
|
|
158
158
|
default:
|
|
159
|
+
// fmt.Printf("%v\n", v)
|
|
159
160
|
panic("unknown type in render")
|
|
160
161
|
}
|
|
161
162
|
}
|
html.go
CHANGED
|
@@ -51,39 +51,39 @@ func Script(str string) *Element {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
func Div(uis ...interface{}) *Element {
|
|
54
|
-
return NewElement("div", false, uis)
|
|
54
|
+
return NewElement("div", false, uis...)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
func A(uis ...interface{}) *Element {
|
|
58
|
-
return NewElement("a", false, uis)
|
|
58
|
+
return NewElement("a", false, uis...)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
func P(uis ...interface{}) *Element {
|
|
62
|
-
return NewElement("p", false, uis)
|
|
62
|
+
return NewElement("p", false, uis...)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
func Span(uis ...interface{}) *Element {
|
|
66
|
-
return NewElement("span", false, uis)
|
|
66
|
+
return NewElement("span", false, uis...)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
func Input(uis ...interface{}) *Element {
|
|
70
|
-
return NewElement("input", false, uis)
|
|
70
|
+
return NewElement("input", false, uis...)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
func Image(uis ...interface{}) *Element {
|
|
74
|
-
return NewElement("image", false, uis)
|
|
74
|
+
return NewElement("image", false, uis...)
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
func Button(uis ...interface{}) *Element {
|
|
78
|
-
return NewElement("button", false, uis)
|
|
78
|
+
return NewElement("button", false, uis...)
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
func Svg(uis ...interface{}) *Element {
|
|
82
|
-
return NewElement("svg", false, uis)
|
|
82
|
+
return NewElement("svg", false, uis...)
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
func SvgText(uis ...interface{}) *Element {
|
|
86
|
-
return NewElement("text", false, uis)
|
|
86
|
+
return NewElement("text", false, uis...)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
func Row(uis ...interface{}) UI {
|