Commit graph

6 commits

Author SHA1 Message Date
df3d9cf039 Oops wrong comment format 2025-08-19 10:08:17 -07:00
3248ac51d1 Take an .images list of resources in figures/fullwidth and figures/small
These two templates take a list of resources to operate on. Since these render
image figures, that list is called "images".
2025-08-19 10:02:38 -07:00
7d56bd2f78 Inline image template
This is for embedding SVGs inline.
2025-01-04 10:12:29 -08:00
05956b83b8 Make some improvements to the fullwidth-image partial
- Add some handling of SVGs so the template doesn't attempt to resize them.
- Include custom classes in the <figure class> attribute
- Do not link to SVG images
- Only include <img srcset> if there are multiple sized images. This mostly supports
  SVG figures where there's only ever one.
2024-12-31 09:37:19 -08:00
efae2acdea Simplify figure styles and markup
Remove the .figure__container element. According to Tess, putting a <figcaption>
inside a child of a <figure> "doesn't obey the content model" or some shit.
Fiiiiine.

Getting small figures to lay out the way I want them to without the container
was a bit of a trick. Instead of letting the figure span the entire width of the
grid column, let it fit the size of its contents, and then set margin-inline to
auto so it centers.

Doing this also allowed me to remove the .figure--image, etc styles because the
styles and markup are a lot more similar among figures containing different
kinds of elements. Nice!
2024-11-25 15:48:04 -08:00
502aa408d9 Refactor all the figures
There are two main sizes of figures: fullwidth and small. Full width figures take
the full content width. Usually they spread into the "wide" content area too.
Main size figures are also full width figures, but they stop at the edges of the
main content area. Small figures shrink to fit and are generally 480pts wide.

Break all these different types of figures down into separate templates for each
variant.

Add the ability for resources to specify a "source" with a link and title.
2024-11-25 09:51:32 -08:00