All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m13s
Move 24 defcomp definitions from Python string constants in components.py to 7 grouped .sexp files under shared/sexp/templates/. Add load_sexp_dir() to jinja_bridge.py for file-based loading. Migrate events and market link-card fragment handlers from render_template to sexp. Delete 9 superseded Jinja HTML fragment templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
677 B
Common Lisp
16 lines
677 B
Common Lisp
(defcomp ~relation-attach (&key create-url label icon)
|
|
(a :href create-url
|
|
:hx-get create-url
|
|
:hx-target "#main-panel"
|
|
:hx-swap "outerHTML"
|
|
:hx-push-url "true"
|
|
:class "flex items-center gap-2 text-sm p-2 rounded hover:bg-stone-100 text-stone-500 hover:text-stone-700 transition-colors"
|
|
(when icon (i :class icon))
|
|
(span (or label "Add"))))
|
|
|
|
(defcomp ~relation-detach (&key detach-url name)
|
|
(button :hx-delete detach-url
|
|
:hx-confirm (str "Remove " (or name "this item") "?")
|
|
:class "text-red-500 hover:text-red-700 text-sm p-1 rounded hover:bg-red-50 transition-colors"
|
|
(i :class "fa fa-times" :aria-hidden "true")))
|