Commit graph

11 commits

Author SHA1 Message Date
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
e04e7dafa3 Render blockquotes in a figure
Render cite and caption too.
2024-11-06 09:31:16 -08:00
b7379f6481 Add head_js and after_js blocks to the baseof template 2024-10-27 09:57:58 -06:00
d7353308fa Figures have a few different node structures; make them all lay out correctly 2024-10-26 08:31:50 -06:00
c8191f7268 When a figure has only an <img>, center the image 2024-10-17 08:39:58 -07:00
d17ec7f48f Import the code and image shortcodes from the old website
Update the styles for code, image, and youtube figures.
2024-10-12 11:26:52 -07:00
b112558914 Add some styles for code and image figures
These elements are created with the figures/image shortcodes from the old site.
Make them wide, and give them XL block margins.

Along the way, make sure that any element with only an <img> child has a line height
of 1 to avoid a weird gap below the image.
2024-10-11 16:37:24 -07:00
e1ad32ab12 Add styles for youtube figures
Bring over the youtube shortcode from the old theme, and add styles for the figures
it creates. Add the .figure--youtube class to the <figure> element.
2024-10-08 22:24:39 -07:00
8a00cc6de9 Colors: Allow setting the color scheme explicitly
In addition to the color scheme changing based on the system setting, enable
setting the color scheme explicitly by adding a color-scheme="light | dark" attribute
on the <html> element.

Doing this was a bit tricky. I originally implemented the grayscale ramp by
reversing it when prefers-color-scheme: dark. This was convenient, but meant that
setting the color scheme explicitly didn't work.

Along the way I discovered the light-dark() CSS function. Deploy that as the preferred
style if the browser supports it. Otherwise, fall back on the prefers-color-scheme
media queries. This function only works if color-scheme: light dark is set on the
:root element.
2024-07-27 23:01:31 -07:00
737ec20e3c Meta: Remove all the block comments at the top of CSS assets 2024-07-25 13:11:40 -07:00
3837e77d63 General figure and list element styles 2024-07-23 08:55:59 -07:00