{# Layout primitives. These exist to keep one promise: an app using fjkit never writes a raw utility class. Components alone do not reach it — two cards side by side means `grid gap-4`, and the closed vocabulary is broken on page one. So arrangement is a component too. Every spacing and column value is a closed lookup whose entries appear verbatim below. Never build a class by interpolation (`gap-{{ n }}`): Tailwind finds classes by scanning source text, so an interpolated one is absent from the stylesheet. An unknown key falls back to the default rather than emitting a class that does not exist. #} {% from "ui/attrs.html" import attrs %} {% set _GAP = { 0: "gap-0", 1: "gap-1", 2: "gap-2", 3: "gap-3", 4: "gap-4", 5: "gap-5", 6: "gap-6", 8: "gap-8", } %} {% set _ALIGN = { "start": "items-start", "center": "items-center", "end": "items-end", "stretch": "items-stretch", "baseline": "items-baseline", } %} {% set _JUSTIFY = { "start": "justify-start", "center": "justify-center", "end": "justify-end", "between": "justify-between", "around": "justify-around", } %} {# stack(gap, align) — vertical flow. {% call stack(4) %} {{ card_a }} {{ card_b }} {% endcall %} flex + gap rather than `space-y-*`: gap cannot collapse, cannot double up when a child is conditionally absent, and reads the same as row(). #} {% macro stack(gap=4, align=none) -%}
{{ description }}
{% endif %}{{ description }}
{% endif %}