Template Fragments
https://htmx.org/essays/template-fragments/Outlines template-fragments as a way to tackle nicely structuring your HTML templates in applications like HTMX and Unpoly.
The basic idea of template fragments is that you write your template as a full page template, but have a structured way to pull out specific fragments from the page for use in a context where you only want to render part of the page. This avoids having to maintain lots of little templates for different purposes - just define the full page and grab fragments from that as needed.
This does seem to need some way for your template library to be aware of more of the structure of your documents? I'm also wondering where to use this next to things like template macros and other nice things, such as Jinja provides.
Tags
Related By Tags
- 🔗 Grid for layout, Flexbox for components
- 🔗 The right tag for the job: why you should use semantic HTML - localghost
- 🔗 Fixed Table Headers | Adrian Roselli
- 🔗 Quickstart — goose3 3.1.10 documentation
- 🔗 Lissa Explains it All -- HTML Help and Tutorial for Kids
- 🔗 Marc J. Zeitlin's UNOFFICIAL "COZY" Web Page
- 🔗 John Doe’s page
- 🔗 Sanitizing text fragments — Bleach 4.0.0 20210803 documentation
- 🔗 html - How to style dt and dd so they are on the same line? - Stack Overflow
- 🔗 CSS Scroll Snap Carousel
Details
- Revised
- Created
- Edited