Swap Bulma for DaisyUI (Tailwind) (#111)

This commit is contained in:
Mike Stefanello 2025-06-17 20:19:58 -04:00 committed by GitHub
parent 2a546dfe3d
commit 79a589da65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 1124 additions and 632 deletions

View file

@ -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),
)