All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 5m35s
- Server sends sexp source text, client (sexp.js) renders everything - SexpExpr marker class for nested sexp composition in serialize() - sexp_page() HTML shell with data-mount="body" for full page loads - sexp_response() returns text/sexp for OOB/partial responses - ~app-body layout component replaces ~app-layout (no raw!) - ~rich-text is the only component using raw! (for CMS HTML content) - Fragment endpoints return text/sexp, auto-wrapped in SexpExpr - All _*_html() helpers converted to _*_sexp() returning sexp source - Head auto-hoist: sexp.js moves meta/title/link/script[ld+json] from rendered body to document.head automatically - Unknown components render warning box instead of crashing page - Component kwargs preserve AST for lazy rendering (fixes <> in kwargs) - Fix unterminated paren in events/sexp/tickets.sexpr Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
2.7 KiB
Plaintext
43 lines
2.7 KiB
Plaintext
;; Cart ticket components
|
|
|
|
(defcomp ~cart-ticket-type-name (&key name)
|
|
(p :class "mt-0.5 text-[0.7rem] sm:text-xs text-stone-500" name))
|
|
|
|
(defcomp ~cart-ticket-type-hidden (&key value)
|
|
(input :type "hidden" :name "ticket_type_id" :value value))
|
|
|
|
(defcomp ~cart-ticket-article (&key name type-name date-str price qty-url csrf entry-id type-hidden minus qty plus line-total)
|
|
(article :class "flex flex-col sm:flex-row gap-3 sm:gap-4 rounded-2xl bg-white shadow-sm border border-stone-200 p-3 sm:p-4"
|
|
(div :class "flex-1 min-w-0"
|
|
(div :class "flex flex-col sm:flex-row sm:items-start justify-between gap-2 sm:gap-3"
|
|
(div :class "min-w-0"
|
|
(h3 :class "text-sm sm:text-base font-semibold text-stone-900" name)
|
|
type-name
|
|
(p :class "mt-0.5 text-[0.7rem] sm:text-xs text-stone-500" date-str))
|
|
(div :class "text-left sm:text-right"
|
|
(p :class "text-sm sm:text-base font-semibold text-stone-900" price)))
|
|
(div :class "mt-3 flex flex-col sm:flex-row sm:items-center justify-between gap-2 sm:gap-4"
|
|
(div :class "flex items-center gap-2 text-xs sm:text-sm text-stone-700"
|
|
(span :class "text-[0.65rem] sm:text-xs uppercase tracking-wide text-stone-500" "Quantity")
|
|
(form :action qty-url :method "post" :sx-post qty-url :sx-swap "none"
|
|
(input :type "hidden" :name "csrf_token" :value csrf)
|
|
(input :type "hidden" :name "entry_id" :value entry-id)
|
|
type-hidden
|
|
(input :type "hidden" :name "count" :value minus)
|
|
(button :type "submit" :class "inline-flex items-center justify-center w-8 h-8 text-sm font-medium rounded-full border border-emerald-600 text-emerald-700 hover:bg-emerald-50 text-xl" "-"))
|
|
(span :class "inline-flex items-center justify-center px-2 py-1 rounded-full bg-stone-100 text-[0.7rem] sm:text-xs font-medium" qty)
|
|
(form :action qty-url :method "post" :sx-post qty-url :sx-swap "none"
|
|
(input :type "hidden" :name "csrf_token" :value csrf)
|
|
(input :type "hidden" :name "entry_id" :value entry-id)
|
|
type-hidden
|
|
(input :type "hidden" :name "count" :value plus)
|
|
(button :type "submit" :class "inline-flex items-center justify-center w-8 h-8 text-sm font-medium rounded-full border border-emerald-600 text-emerald-700 hover:bg-emerald-50 text-xl" "+")))
|
|
(div :class "flex items-center justify-between sm:justify-end gap-3"
|
|
(p :class "text-sm sm:text-base font-semibold text-stone-900" line-total))))))
|
|
|
|
(defcomp ~cart-tickets-section (&key items)
|
|
(div :class "mt-6 border-t border-stone-200 pt-4"
|
|
(h2 :class "text-base font-semibold mb-2"
|
|
(i :class "fa fa-ticket mr-1" :aria-hidden "true") " Event tickets")
|
|
(div :class "space-y-3" items)))
|