photog.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for your photos and banter. Photog first is our motto Please refer to the site rules before posting.

Administered by:

Server stats:

258
active users

#htmx

2 posts2 participants0 posts today
Continued thread

…And there are more interesting tid-bits in there too:

• See how I’m pushing Kitten’s Streaming HTML to its logical conclusion and streaming JavaScript from the server to the client to keep all logic on the server while implementing a client-side feature (copy to clipboard): codeberg.org/small-web/look-ov

• Following on from that, note how the Toast component that’s triggered when something is copied looks (under the hood, Streaming HTML is htmx + WebSockets + some Kitten-specific magic and glues it all together and adds syntactic sugar): codeberg.org/small-web/look-ov

• Finally, check out how layout components and slots work: codeberg.org/small-web/look-ov

I think that’s all the intersting stuff I can spot at the moment.

Have fun!

:kitten:💕

codeberg.orgMaking sure you're not a bot!

I really don't understand the enthusiasm around #htmx. Why would anyone want to put html and css classes in their backend code? It probably works for tiny projects but can you imagine a large company doing that? Oh the frontend team needs this button bigger? Better ask the backend team to change their API! That kind of coupling seems very unergonomic. Just my two cents... #webdev #html #backend

New Kitten release 🎉

kitten.small-web.org

• New: Lovely new icons¹ and new callouts in Kitten Settings²

• New: Markdown now supports attributes and bracketed spans³

• New: client-side `kitten` global with `trigger` function for triggering events on the server from the client. (Useful when streaming client-side JavaScript when using Kitten’s Streaming HTML⁴ workflow. e.g., when you have to use a client-only web API like the Clipboard API but you want to keep all your logic on your server-side page.⁵)

• Fixed: The bound render function returned by `KittenComponent` class’s `component` getter now correctly awaits asynchronous templates. (In Kitten, you don’t have to care whether your templates contain promises. Kitten handles all that for you.)

Enjoy! :kitten:💕

¹ kitten.small-web.org/reference

² mastodon.ar.al/@aral/114381983

³ kitten.small-web.org/reference (also see mastodon.ar.al/@aral/114381462)

kitten.small-web.org/tutorials

⁵ e.g., See how I use this to implement a copy to clipboard button in the database page of Kitten’s Settings: codeberg.org/kitten/app/src/br Of course, you don’t have to use this and you can just write client-side JavaScript or use the built-in Alpine.js integration. e.g., how I do it on the (older) settings/identity page: codeberg.org/kitten/app/src/br

#Kitten#SmallWeb#web

Hallo #Westfalen! 👋

Wenn ihr Interesse an der #Frontend-Entwicklung habt, habe ich zwei (ganz uneigennützige 😎) Tipps für euch:

👉 Morgen, Dienstag, 15. April, stelle ich euch #NextJS beim tech&talk-Meetup in #Dortmund vor: meetup.com/codecentric-dortmun

👉 Am Mittwoch (16.4.) diskutieren wir auf der #Java User Group #Münster über #HTMX und JavaScript-Lösungen für moderne Webanwendungen: meetup.com/java-usergroup-muns

Würde mich freuen, euch zu sehen 😊

New Kitten Release

• Automatic message routing: if the element that triggers an event on the client does not have a `name` attribute, Kitten now falls back to using its `id` instead to route the event to the correct server-side event handler on your live Kitten pages.

If neither attribute exists, Kitten will fail to route the message but no longer crash as it was due to a regression introduced when I implemented support for colons in element names.¹

kitten.small-web.org

For more details on Kitten’s live pages and automatic message routing, please see the Streaming HTML tutorial:

kitten.small-web.org/tutorials

Enjoy!

:kitten:💕

¹ A colon in an element name is ignored for message routing purposes, letting you, for example, give unique names to <details> elements, allowing more than one to be open at a time, while having their events be handled by the same handler.