All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
Replace all 676 inline sexp() string calls across 7 services with render(component_name, **kwargs) calls backed by 46 external .sexpr component definition files (587 defcomps total). - Add render() function to shared/sexp/jinja_bridge.py - Add load_service_components() helper and update load_sexp_dir() for *.sexpr - Update parser keyword regex to support HTMX hx-on::event syntax - Convert remaining inline HTML in route files to render() calls - Add shared/sexp/templates/misc.sexp for cross-service utility components Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
1.7 KiB
Plaintext
27 lines
1.7 KiB
Plaintext
;; Cart summary / checkout components
|
|
|
|
(defcomp ~cart-checkout-form (&key action csrf label)
|
|
(form :method "post" :action action :class "w-full"
|
|
(input :type "hidden" :name "csrf_token" :value csrf)
|
|
(button :type "submit" :class "w-full inline-flex items-center justify-center px-4 py-2 text-xs sm:text-sm rounded-full border border-emerald-600 bg-emerald-600 text-white hover:bg-emerald-700 transition"
|
|
(i :class "fa-solid fa-credit-card mr-2" :aria-hidden "true") (raw! label))))
|
|
|
|
(defcomp ~cart-checkout-signin (&key href)
|
|
(div :class "w-full flex"
|
|
(a :href href :class "w-full cursor-pointer flex flex-row items-center justify-center p-3 gap-2 rounded bg-stone-200 text-black hover:bg-stone-300 transition"
|
|
(i :class "fa-solid fa-key") (span "sign in or register to checkout"))))
|
|
|
|
(defcomp ~cart-summary-panel (&key item-count subtotal checkout-html)
|
|
(aside :id "cart-summary" :class "lg:pl-2"
|
|
(div :class "rounded-2xl bg-white shadow-sm border border-stone-200 p-4 sm:p-5"
|
|
(h2 :class "text-sm sm:text-base font-semibold text-stone-900 mb-3 sm:mb-4" "Order summary")
|
|
(dl :class "space-y-2 text-xs sm:text-sm"
|
|
(div :class "flex items-center justify-between"
|
|
(dt :class "text-stone-600" "Items") (dd :class "text-stone-900" (raw! item-count)))
|
|
(div :class "flex items-center justify-between"
|
|
(dt :class "text-stone-600" "Subtotal") (dd :class "text-stone-900" (raw! subtotal))))
|
|
(div :class "flex flex-col items-center w-full"
|
|
(h1 :class "text-5xl mt-2" "This is a test - it will not take actual money")
|
|
(div "use dummy card number: 5555 5555 5555 4444"))
|
|
(div :class "mt-4 sm:mt-5" (raw! checkout-html)))))
|