Ease into htmx with htmx-get ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ I recently attended python web conf 2022 and after seeing some incredible presentations on it I am excited to give htmx a try. Date: March 25, 2022 I recently attended python web conf 2022 <https://2022.pythonwebconf.com/> and after seeing some incredible presentations on it I am excited to give htmx <https://htmx.org/> a try. The base page ───────────── Start with some html </html/> boilerplate, pop in a script tag to add the htmx </htmx/>.org script, and a button that says click me. I added just a tish of style so that it does not sear your delicate developer your eyes. [code] Save this as index.html and fire up a webserver and you will be presented with this big beefcake of a button. Image: big beefcake of a button If you don’t have a development server preference I reccomend opening the terminal and running python -m http.server 8000 then opening your browser to localhost:8000 The Partial ─────────── Now the page has a button that is ready to replace itself, notice the hx-swap="outerHTML">, with the contents of /partial. To create a static api of sorts we can simply host a partial page in a file at /partial/index.html with the following contents. [code]

hello

Image: the final results Tree ──── To make it a bit clearer here is what the file tree looks like after setting this up. [code] ~/git/htmx  v3.9.7 (git) ❯ tree . ├── clicked │   └── index.html └── index.html Demo ──── I added htmx to this page and setup a partial below, check out this easter egg. Click Me Links ───── - python web conf 2022 - htmx - big beefcake of a button - the final results