make djot divs generate arbitrary elements rather than just divs

this makes it possible to use elements like figure/figcaption
This commit is contained in:
りき萌 2025-08-31 12:54:13 +02:00
parent 32b6713269
commit 944a56800e
3 changed files with 25 additions and 18 deletions

View file

@ -236,7 +236,8 @@ tags = ["all", "programming", "graphics", "javascript"]
id = "01HQ162WWAS502000K8QZWVBDW"
- we can split this tileset up into 16 individual tiles, each one 8 × 8 pixels; people choose various resolutions, I chose a fairly low one to hide my lack of artistic skill.
::: horizontal-tile-strip
{.horizontal-tile-strip}
:::
[]{.metal .x-0 .y-0}
[]{.metal .x-1 .y-0}
[]{.metal .x-2 .y-0}
@ -260,7 +261,8 @@ tags = ["all", "programming", "graphics", "javascript"]
- the keen eyed among you have probably noticed that this is very similar to the case we had before with drawing procedural borders -
except that instead of determining which borders to draw based on a tile's neighbors, this time we'll determine which _whole tile_ to draw based on its neighbors!
::: horizontal-tile-strip
{.horizontal-tile-strip}
:::
[[E]{.east} [S]{.south}]{.metal .x-0 .y-0}
[[E]{.east} [S]{.south} [W]{.west}]{.metal .x-1 .y-0}
[[S]{.south} [W]{.west}]{.metal .x-2 .y-0}
@ -307,7 +309,8 @@ tags = ["all", "programming", "graphics", "javascript"]
id = "01HQ162WWABANND0WGT933TBMV"
- that means we'll need to arrange our tiles like so, where the leftmost tile is at index 0 (`0b0000`) and the rightmost tile is at index 15 (`0b1111`):
::: horizontal-tile-strip
{.horizontal-tile-strip}
:::
[]{.metal .x-3 .y-3}
[[E]{.east}]{.metal .x-0 .y-3}
[[S]{.south}]{.metal .x-3 .y-0}