It was that simple? T_T
Ah well, live and learn I guess. If it's not too much to ask, I have a related design question. I tweaked the passage a bit, and it now looks like this:
:: equip manager puppets[nobr]
<<for _i, _puppet range $puppets>>
<div class="actor menu" @id="_i">
<div class="inmenu stats" style="padding-left: 0px">
<<if def _s>>
<<run $('#' + _s).removeClass("selected")>>
<<if _s != _i>>
<<set _s = _i>>
<<run $('#' + _s).addClass("selected")>>
<<set _s = _i>>
<<run $('#' + _i).addClass("selected")>>
<<for _k, _v range _puppet.stats>>
<span class="statname"><<print _k>>:</span>
<div class="inmenu equipment">
<<for _k, _v range _puppet.equipment>>
_k: <<if _v !== null>>
<div style="display: inline-block; font-weight: normal">_v.name
<<capture _puppet, _k>>
<<replace "#puppets">><<include "equip manager puppets">><</replace>>
What I'm trying to do here is: If a character has nothing equipped in a slot, the screen will just show "[Slot]: " with nothing after it. If the slot does have equipment in it, the name is displayed after the colon, the unequip button is printed on the same line, and then the equipment's mechanical effect is printed under it on another line.
However, if I print all of this on a single line, then when I make a line break to display the equipment's effect, that's printed directly under the "[Slot]: " display, which is unclear and looks ugly. I tried to circumvent this by turning everything relating to the equipment into an inline block element; however, that displays the opposite of the way I want, with all other elements aligned to its base rather than its top. Now the equipment's name and effect are aligned with each other, but the "[Slot]: " marker points to the effect rather than the name.
(Additionally, the unequip button doesn't move to the right of the larger "actor" container as I want it to, even when I set the equipment div to width=100%. Is there an intermediate element that's getting in the way?)
I know there are ways to change the alignment of an element to the top rather than the base, but I believe that requires adding a container element and I fear I'm just going to tangle myself up if I don't know what I'm doing. I could also make one block for all the slot listings and another for the equipment display, but that would require running two for loops since I would have to populate the blocks one at a time, which seems like bad coding practice.
How would you suggest formatting this?
(I can send you images on Discord if this is too confusing)