Files
rose-ash/sx/sxc/docs/nav.sx
giles a7da235459 SXC content: docs/examples/home/reference pages + SX testing runner
New sxc/ content tree with 120 page files across docs, examples, home,
and reference demos. sx/sx/testing/ adds page-runner.sx (317L) and
index-runner.sx (394L) — SX-native test runner pages for
browser-based evaluation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 09:08:47 +00:00

23 lines
617 B
Plaintext

(defcomp
(&key items current)
(nav
(~tw :tokens "flex flex-wrap gap-2 mb-8")
(map
(fn
(item)
(a
:href (nth item 1)
:sx-get (nth item 1)
:sx-target "#sx-content"
:sx-select "#sx-content"
:sx-swap "outerHTML"
:sx-push-url "true"
:class (str
"px-3 py-1.5 rounded text-sm font-medium no-underline "
(if
(= (nth item 0) current)
"bg-violet-100 text-violet-800"
"bg-stone-100 text-stone-600 hover:bg-stone-200"))
(nth item 0)))
items)))