-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTMX addition #10
Comments
I'm a fan of HTMX and I toyed with an idea here: https://github.com/joshday/HTMX.jl (but I still think it's too verbose). If it's simple/small enough, I don't mind having the code live here. |
OK. Since I want to implement it for myself anyway - I'd like to try it, and you can decide later if it is worth accommodating here. |
@joshday Do you know of a better interface, or have any specific ideas as to what the HTMX integration should look like? |
Out of the box, there isn't much that needs to be done in terms of integration: <button hx-post="/clicked" hx-swap="outerHTML">
Click Me
</button> Is this: using Cobweb: h
h.button(var"hx-post"="/clicked", var"hx-swap"="outerHTML",
"Click Me"
) I'm actually surprised I haven't already done automatic translation of underscores to dashes. I'll make that change so then it's just this: using Cobweb: h
h.button(hx_post="/clicked", hx_swap="outerHTML",
"Click Me"
) |
This looks great! 😀 |
@joshday Does documenting this as a usage example somewhere, along with installing htmx sound good? head = h.head(
h.script(
src="https://unpkg.com/htmx.org@2.0.2",
integrity="sha384-Y7hw+L/jvKeWIRRkqWYfPcvVxHzVzn5REgzbawhxAuQGwX1XWe70vji+VSeHOThJ",
crossorigin="anonymous"
)
) (taken from https://htmx.org/docs/#installing ) |
I want to integrate HTMX closely with Cobweb.jl.
I will do this anyway for my own needs - in one way or another - but I think it can be nice to have this in a public repo so other Julia users can benefit from it.
HTMX can already be used with Cobweb.jl (it is just a matter of adding attributes). However, I would like to add some dedicated types and functions to make the process smoother.
Would you consider a PR (given I don't touch the already implemented functionality)?
Or should I do it as a standalone extension wrapping the Cobweb.jl?
More about HTMX here: https://htmx.org/docs/
The text was updated successfully, but these errors were encountered: