Swap Bulma for DaisyUI (Tailwind) (#111)
This commit is contained in:
parent
fc5db0e95a
commit
c1e9baabe6
53 changed files with 1124 additions and 632 deletions
|
|
@ -22,21 +22,22 @@ func (f *Cache) Render(r *ui.Request) Node {
|
|||
ID("cache"),
|
||||
Method(http.MethodPost),
|
||||
Attr("hx-post", r.Path(routenames.CacheSubmit)),
|
||||
Message(
|
||||
"is-info",
|
||||
"Test the cache",
|
||||
Group{
|
||||
P(Text("This route handler shows how the default in-memory cache works. Try updating the value using the form below and see how it persists after you reload the page.")),
|
||||
P(Text("HTMX makes it easy to re-render the cached value after the form is submitted.")),
|
||||
Card(CardParams{
|
||||
Title: "Test the cache",
|
||||
Body: Group{
|
||||
Span(Text("This route handler shows how the default in-memory cache works. Try updating the value using the form below and see how it persists after you reload the page.")),
|
||||
Span(Text("HTMX makes it easy to re-render the cached value after the form is submitted.")),
|
||||
},
|
||||
),
|
||||
Color: ColorInfo,
|
||||
Size: SizeMedium,
|
||||
}),
|
||||
Label(
|
||||
For("value"),
|
||||
Class("value"),
|
||||
Text("Value in cache: "),
|
||||
),
|
||||
If(f.CurrentValue != "", Span(Class("tag is-success"), Text(f.CurrentValue))),
|
||||
If(f.CurrentValue == "", I(Text("(empty)"))),
|
||||
If(f.CurrentValue != "", Badge(ColorSuccess, f.CurrentValue)),
|
||||
If(f.CurrentValue == "", Badge(ColorWarning, "empty")),
|
||||
InputField(InputFieldParams{
|
||||
Form: f,
|
||||
FormField: "Value",
|
||||
|
|
@ -46,7 +47,7 @@ func (f *Cache) Render(r *ui.Request) Node {
|
|||
Value: f.Value,
|
||||
}),
|
||||
ControlGroup(
|
||||
FormButton("is-link", "Update cache"),
|
||||
FormButton(ColorPrimary, "Update cache"),
|
||||
),
|
||||
CSRF(r),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue