mastodon.ar.al is one of the many independent Mastodon servers you can use to participate in the fediverse.
This is my personal fediverse server.

Administered by:

Server stats:

1
active users

So given it’s Saturday night, I thought I’d have a little fun with Kitten and make a tiny collaborative drawing toy.

You have a 20×20 grid and only black and white to draw with and everyone shares the same canvas.

draw-together.small-web.org

Have fun + looking forward to seeing what we all, umm, draw together.

:kitten:💕

PS. It took about 60 lines of code.

View source: codeberg.org/aral/draw-togethe

@aral@mastodon.ar.al where does the "pixel" event on line 12 get emitted from?

Aral Balkan

@scott It gets emitted from each of the buttons, all of which have the same name attribute (`pixel`).

In Kitten’s Streaming HTML workflow, element names are mapped to events on the server (when either the default event type – in this case `click` – or a custom event you specify gets fired). Under the hood, it’s htmx + WebSocket + some Kitten magic (auto-generated WebSocket route, syntactic sugar, etc.)

I have a whole write up that peels away the magic here:

ar.al/2024/03/08/streaming-htm

Aral Balkan · Streaming HTMLSorry, your browser doesn't support embedded videos. But that doesn’t mean you can’t watch it! You can download the video and watch it with your favourite video player. Building the Streaming HTML counter example. Estimated reading time: 25 minutes. Kitten has a new experimental workflow for creating web apps called Streaming HTML that I want to introduce you to today. Kitten, uniquely, enables you to build Small Web apps (peer-to-peer web apps).