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>
This commit is contained in:
41
sx/sxc/examples/pp-form-full.sx
Normal file
41
sx/sxc/examples/pp-form-full.sx
Normal file
@@ -0,0 +1,41 @@
|
||||
(defcomp
|
||||
(&key name email role)
|
||||
(form
|
||||
:sx-put "/sx/(geography.(hypermedia.(example.(api.putpatch))))"
|
||||
:sx-target "#pp-target"
|
||||
:sx-swap "innerHTML"
|
||||
(~tw :tokens "space-y-3")
|
||||
(div
|
||||
(label (~tw :tokens "block text-sm font-medium text-stone-700 mb-1") "Name")
|
||||
(input
|
||||
:type "text"
|
||||
:name "name"
|
||||
:value name
|
||||
(~tw :tokens "w-full px-3 py-2 border border-stone-300 rounded text-sm")))
|
||||
(div
|
||||
(label (~tw :tokens "block text-sm font-medium text-stone-700 mb-1") "Email")
|
||||
(input
|
||||
:type "text"
|
||||
:name "email"
|
||||
:value email
|
||||
(~tw :tokens "w-full px-3 py-2 border border-stone-300 rounded text-sm")))
|
||||
(div
|
||||
(label (~tw :tokens "block text-sm font-medium text-stone-700 mb-1") "Role")
|
||||
(input
|
||||
:type "text"
|
||||
:name "role"
|
||||
:value role
|
||||
(~tw :tokens "w-full px-3 py-2 border border-stone-300 rounded text-sm")))
|
||||
(div
|
||||
(~tw :tokens "flex gap-2")
|
||||
(button
|
||||
:type "submit"
|
||||
(~tw :tokens "px-4 py-2 bg-violet-600 text-white rounded text-sm hover:bg-violet-700")
|
||||
"Save All (PUT)")
|
||||
(button
|
||||
:type "button"
|
||||
:sx-get "/sx/(geography.(hypermedia.(example.(api.putpatch-cancel))))"
|
||||
:sx-target "#pp-target"
|
||||
:sx-swap "innerHTML"
|
||||
(~tw :tokens "px-4 py-2 bg-stone-200 text-stone-700 rounded text-sm hover:bg-stone-300")
|
||||
"Cancel"))))
|
||||
Reference in New Issue
Block a user