pkw, to random
@pkw@mastodon.sdf.org avatar

I made an update to the app that allows you to see the description rendered as markdown.

(I've been using markdown the whole time intending to do this.)

There's a button "View Markdown" that swap the textarea with rendered markdown (html).

And then I just re-use the "Reset Post" button to go back.

I did this with which I haven't used before. I don't love it.
I don't hate it. I definitely could have just used axios (or fetch) and some javascript glue.

https://clue.d34d.net/

scy, to webdev
@scy@chaos.social avatar

I've spent a few days playing around with , and I'd like some insights from people who are using it in production. Doesn't need to be a paid project, but more than just "my pet experiment".

What are you using it for?

Like, to me it feels as if either the backend needs to be really tailored to HTMX, with HTML fragments and custom headers and stuff, or you need to start writing non-trivial amounts of JS in the frontend for anything but the most basic tasks.

matthew, to webdev
@matthew@opinuendo.com avatar

REST APIs ≠ JSON over HTTP! HTMX brings back true REST with hypermedia. Disappointed with your SPA complexity? Say goodbye to #JavaScriptFatigue consider giving #HTMX a try. ➡️ https://netapinotes.com/tired-of-javascript-fatige-htmx-revives-restful-apis/ #webdev #APIs #hypermedia #hypertext

djangobrew, to random
@djangobrew@fosstodon.org avatar

Grab a cuppa coffee and join us for our official DjangoCon US 2023 recap! :django: ☕️

Check out Episode 1: Fried-green introverts at https://djangobrew.com/episodes/14650534-episode-1-fried-green-introverts

We discuss all things DjangoCon US 2023, our new favorite Southern delicacy, tech conference tips, and just how much coffee is too much (hint: the limit does not exist 😉)!

Subscribe wherever you get your podcasts, check out https://djangobrew.com for show notes, and follow us here for updates.

djangobrew,
@djangobrew@fosstodon.org avatar

In https://djangobrew.com/episodes/14650534-episode-1-fried-green-introverts we discuss a few of our favorite conference talks and topics from #DjangoCon2023:

However, there were a ton of great talks and the videos are available for all of them! 📺 https://www.youtube.com/playlist?list=PL2NFhrDSOxgX41jqYSi0HmO9Wsf6WDSmf

#Django #Python #podcasts #DjangoCon

phptek, to webdev

Tired of JavaScript bloat? Don't miss Chris Tankersley's talk on unlocking the power of minimalistic and efficient web development with htmx and Alpine.js. 🏔️ php[tek] tickets are still available! https://tek.phparch.com/ #phptek #webdev #javascript #htmx #AlpineJS

changelog, to python
@changelog@changelog.social avatar

A "lightweight framework for building dynamic pages in pure Python." (For the htmx curious)

🔗 https://github.com/paveldedik/ludic

#python #htmx #webdev #frameworks

aral, to SmallWeb
@aral@mastodon.ar.al avatar
ffissore, to random

or ? we are going to invest some pretty penny in one of them, but we are not sure which one

fonts, to random
@fonts@sfba.social avatar
devolute,
@devolute@mastodon.social avatar

@fonts I do. Big #HTMX energy in this post.

caritos, to Kotlin

Experimenting with #htmx with #ktor as the backend. #kotlin

kerfuffle,
@kerfuffle@mastodon.online avatar

@caritos
How are you finding it thusfar? What is the alternetive you're comparing it to?

#htmx #ktor #kotlin

aral, to SmallWeb
@aral@mastodon.ar.al avatar

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.

https://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: https://codeberg.org/aral/draw-together

#Kitten #SmallWeb #DrawTogether #toy #game #web #dev

aral,
@aral@mastodon.ar.al avatar

I’ve also updated the readme with instructions on how to run Draw Together yourself (you could have it up and running locally in under a minute by installing Kitten, cloning the repository, and running the kitten command) and links to where you can learn more about the Streaming HTML magic in Kitten that means that the whole app is ~60 lines of code :)

https://codeberg.org/aral/draw-together#draw-together

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Minor Kitten¹ update: Even if your page routes now return nothing (e.g., null, undefined, empty string), a proper page will be rendered that includes the development-time WebSocket that powers hot reloads.

So the shortest valid page route is now:

export default () => ''  

And, more importantly, e.g.,

export default () => kitten.html`  
 <page css>  
`

Will also render.

:kitten:💕

¹ <https://codeberg.org/kitten/app>

#Kitten #SmallWeb #HTML #CSS #JavaScript #htmx #hypermedia #web #dev
aral, to SmallWeb
@aral@mastodon.ar.al avatar

🍞 Kitten toast, anyone?

A fifteen-second demo of how you can create a toast message in 42 lines of code¹ without writing any client-side JavaScript using Streaming HTML² in Kitten³.

Video:

https://vimeo.com/925828491

Source code:

https://codeberg.org/kitten/app/src/branch/main/examples/streaming-html/toast/index.page.js

Enjoy!

:kitten: 💕

¹ Almost half of which is CSS.
² https://ar.al/2024/03/08/streaming-html/
³ https://codeberg.org/kitten/app

#Kitten #SmallWeb #StreamingHTML #web #dev #htmx #hypermedia #WebSocket #html #css #JavaScript #toast

aral,
@aral@mastodon.ar.al avatar

PS. Those 42 lines are all the source code.

That’s it.

No scaffolding. No npm create this-or-that.

  1. Create a folder called toast.
  2. Add those 42 lines of code to a file called index.page.js in that folder.
  3. Run kitten¹.

Now hit https://localhost in your browser and you will see the example running just like in the video in the first post.

:kitten: 💕

¹ https://codeberg.org/kitten/app

Kitten

aral,
@aral@mastodon.ar.al avatar

Update: I forgot to make the toast message div into an aria-live region so toast messages are read out when they arrive for people who use screen readers.

Now fixed.

Source code: https://codeberg.org/kitten/app/src/branch/main/examples/streaming-html/toast/index.page.js

Thanks to @hi_mayank for catching that one. Appreciate it!

:kitten: 💕

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Kitten ❤️ morphs

You can now add settle, swap, etc., attributes to Kitten morphs using Kitten’s morph syntactic sugar¹

e.g.,

&lt;div morph='settle:2s'&gt;  

Is syntactic sugar for:

&lt;div hx-swap-oob='morph settle:2s'&gt;  

Morphs are an important part of Kitten’s Streaming HTML workflow which you can learn more about in the attached video (https://vimeo.com/920601063) and this blog post:

https://ar.al/2024/03/08/streaming-html/

#Kitten #SmallWeb #web #dev #htmx

¹ https://codeberg.org/kitten/app#to-whet-your-appetite

talkpython, to python

Have you tried our latest and free course?

Build An Audio AI App
https://training.talkpython.fm/courses/build-an-audio-ai-app-with-python-and-assemblyai

So many fun things to learn. Obviously working with audio data, speech to text, but also LLMs from AssemblyAI, , Beanie, , , , and plenty more. cc @mkennedy

aral, (edited ) to SmallWeb
@aral@mastodon.ar.al avatar

:kitten: Kitten goes htmx 2

htmx 2 is pre-release but so is Kitten¹ so what better time than the present to upgrade?

As of today, Kitten runs my fork of htmx 2 & htmx-ws which, thanks to Denis and Jeff², include features/fixes that aren’t in htmx 2 yet. Once they are, I’ll move to the official version.

Useful htmx 2 links:

💕

¹ https://codeberg.org/kitten/app
² https://codeberg.org/kitten/app/src/branch/main/CONTRIBUTORS.md

frankel, to random
@frankel@mastodon.top avatar
mblayman, to python
@mblayman@mastodon.social avatar

🐍 On this Building SaaS with and , we did some template work to build a UI for the bulk task delete feature. With a bit of , we added a confirmation step to the deletion process. https://www.youtube.com/watch?v=7bTihRro5Q0

mukulmantosh, to django

Django + HTMX, the ultimate tag team! Cheers to @sarahboyce for putting these two coding superheroes in the same ring!

#django #htmx

https://www.youtube.com/shorts/-Mn9z8BIlbo

frankel, to javascript
@frankel@mastodon.top avatar
pythonbynight, to python
@pythonbynight@fosstodon.org avatar

Been slowly tinkering on a Litestar app I'm building just for the hell of it. My local amateur soccer league could really use a website, and I could also stand to learn a new web framework. (I mean, why not?)

While I've been plugging away at it (over-engineering and all), I decided to continue building in public.

Lots of fun stuff in here, but a pretty good "real world" use case for the PyHAT stack (htmx/Tailwind).

https://github.com/tataraba/soccerlite

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Kitten update: session IDs now available in the request.session objects you get in your routes.

Kitten lets you persist arbitrary data in session objects to make it easy to work with sessions but you cannot store custom objects (instances of custom classes) as Kitten’s default database is not aware of custom classes in your application. Now, keyed to the session id, you can store custom objects in your app’s own database.

https://codeberg.org/kitten/app#sessions

:kitten: 💕

#Kitten #SmallWeb #sessions

aral,
@aral@mastodon.ar.al avatar

(The use case for this is pretty neat: keep your interface state in custom state class instances persisted in session objects and, using the Streaming HTML workflow*, send back pieces of the interface that take those state objects as their only prop. Quite a neat separation of concerns and state is maintained only on the server in those objects.)

#Kitten #SmallWeb #state #sessions #StreamingHTML #web #dev #html #JavaScript #NodeJS #WebSockets #htmx #hypermedia

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines