TailwindCSS for Prolog - Replies

Thanks for sharing! Does tailwind need javascript on the frontend or can it be turned into plain CSS?

Nope, no Javascript – just a bunch of particularly-formatted CSS classes, for which the corresponding styles are generated.

1 Like

Oh neat! I’m likely to have a few cycles soon, ping me if you want help.

1 Like

I certainly shall! As a bit of a spoiler, my new approach is based on something like Rails’ “Hotwire” or Phoenix’s “LiveView”, where all the HTML stuff is just normal Prolog & there’s a thin bit of client-side JS that replaces content asynchronously. Unlike the “Vuelog” approach, this lets you write all the server-side stuff using just normal Prolog HTML generating predicates, only adding a few extra attributes to indicate what gets replaced with what.

Still some ways to go before it’s generally useful, I think, but I’m hoping to get a little demo app together in the next week or so, at which point I’ll make it public & see what you and other folks make of it :slight_smile:

1 Like

I got a little demo together at one point of generating HTMX handlers completely automatically.
You just added the htmx to the termerized html and used htmx//1 il instead of html//1.
It generated all of the AJAX(H) handlers to send the fragments automatically.

I sort of decided it wasn’t that great an idea - you often need very different pre-html-generation code in the two cases,

1 Like

(if you want to have a look, I just made the repo public here: James Cash / prolog_web_experiments · GitLab Still a lot to nail down before I’m ready to really “release” anything yet, but you can kind of see the idea)

1 Like