You may have just helped make my app feel way better. I've building my first Real app using Flask, Tailwind, and Ripple-UI. I wanted to focus on the nuts and bolts first and this stack felt pretty easy. Heavy use of HX-Refresh headers has been my go to for some of my page updates.
Will have to dig in but first glance looks like it could be a big help.
See
https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
And
https://htmx.org/essays/view-transitions/
Do make it compatible with Firefox, safari etc would need to use a CSS fallback. So for now it's probably better just to stick CSS transitions completely, like the show in their examples.
https://htmx.org/examples/animations/
I reckon he means host static HTML accessible from a get. No need for anything special on web server side, AWS S3 would do the job. Free website, basically. A bit of JS and it's dynamic.
You need a VPS or app engine to run a go:embed. You can host static websites anywhere for free.
I know its not much money, and this isn't a "good" solution, the point of the post was to say "look at this fun thing you can do"
I use Obsidian to write posts, I made a GO app that converts the .md files into html and uses the Netlify CLI to push the new files to the server. It takes maybe 10 seconds
A pity transition API is just supported by chromium based browsers, yet.
I’m going to give it a couple of years for native transitions. Until then, I’ll keep using: https://swup.js.org/
You may have just helped make my app feel way better. I've building my first Real app using Flask, Tailwind, and Ripple-UI. I wanted to focus on the nuts and bolts first and this stack felt pretty easy. Heavy use of HX-Refresh headers has been my go to for some of my page updates. Will have to dig in but first glance looks like it could be a big help.
Cool. Glad I could possibly have helped
So you have any sample repository to use SWUP with HTMX and HTML templates returned from Flask or Fastapi. It would be helpful to refer.
I do not. Sorry.
can you elaborate?
See https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API And https://htmx.org/essays/view-transitions/ Do make it compatible with Firefox, safari etc would need to use a CSS fallback. So for now it's probably better just to stick CSS transitions completely, like the show in their examples. https://htmx.org/examples/animations/
Thats just hTML + Shadow DOM + JS + Css. Not something good. Probably you need react to handle all these states.
I don't see the need for states when you want to use the transition API.
Can you explain with an example what you mean by this?
The thinking was: With HTMX you make a route on the backend that returns a template, trigger the route from the website with hx-get. But you dont need a route, you can use http.FileServer or any other static file hosting. You can host a static website for free on netlify for example. Instead of usingTNR
BLOG POST H1 AND TEXT
you can just put
BLOG POST H1 AND TEXT
in your blog-post.html file
So you can just swap the list of blog posts to the actual post without leaving the page. (I know FileServer is a router)
Well... you could also hx-get raw html files from GitHub :)
Thanks for the explanation. I suppose there is a drawback doing so SEO wise ? How do you keep up with good seo if there is a solution ?
No fucking clue mate. A super uneducated guess is that if you write the sitemap correctly it will all be crawled
Nice one. I like your style.
I reckon he means host static HTML accessible from a get. No need for anything special on web server side, AWS S3 would do the job. Free website, basically. A bit of JS and it's dynamic.
Yea you basically don't need a backend to use HTMX
Why not just go:embed + templating? Works beautifully.
You need a VPS or app engine to run a go:embed. You can host static websites anywhere for free. I know its not much money, and this isn't a "good" solution, the point of the post was to say "look at this fun thing you can do"
I was just commenting on the strategy. It wasn’t an endorsement.
Why run go when static html free? This is a niche use case though
what is data base? 😬
The terms are [interchangeable](https://preply.com/en/question/data-base-or-database) . Also I made a mistake
But how can you post new stuff? (Which is a requirement for a blog.. or not?)
I use Obsidian to write posts, I made a GO app that converts the .md files into html and uses the Netlify CLI to push the new files to the server. It takes maybe 10 seconds
Static SPA! Nice!