;; Cart layout defcomps — fully self-contained via IO primitives. ;; --- cart-page layout: root + cart row + page-cart row --- (defcomp ~cart-page-layout-full (&key cart-row page-cart-row) (<> (~root-header-auto) (~header-child-sx :inner (<> cart-row (~header-child-sx :id "cart-header-child" :inner page-cart-row))))) (defcomp ~cart-page-layout-oob (&key root-header-oob cart-row-oob page-cart-row) (<> (~oob-header-sx :parent-id "cart-header-child" :row page-cart-row) cart-row-oob root-header-oob)) ;; --- cart-admin layout: root + post header + admin header --- (defcomp ~cart-admin-layout-full (&key post-header admin-header) (<> (~root-header-auto) post-header admin-header)) ;; --- orders-within-cart: root + auth-simple + orders --- (defcomp ~cart-orders-layout-full (&key list-url) (<> (~root-header-auto) (~header-child-sx :inner (<> (~auth-header-row-simple-auto) (~header-child-sx :id "auth-header-child" :inner (~orders-header-row :list-url list-url)))))) (defcomp ~cart-orders-layout-oob (&key list-url) (<> (~auth-header-row-simple-auto true) (~oob-header-sx :parent-id "auth-header-child" :row (~orders-header-row :list-url list-url)) (~root-header-auto true))) ;; --- order-detail-within-cart: root + auth-simple + orders + order --- (defcomp ~cart-order-detail-layout-full (&key list-url detail-url order-label) (<> (~root-header-auto) (~header-child-sx :inner (<> (~auth-header-row-simple-auto) (~header-child-sx :id "auth-header-child" :inner (<> (~orders-header-row :list-url list-url) (~header-child-sx :id "orders-header-child" :inner (~menu-row-sx :id "order-row" :level 3 :colour "sky" :link-href detail-url :link-label order-label :icon "fa fa-gbp")))))))) (defcomp ~cart-order-detail-layout-oob (&key detail-url order-label) (<> (~oob-header-sx :parent-id "orders-header-child" :row (~menu-row-sx :id "order-row" :level 3 :colour "sky" :link-href detail-url :link-label order-label :icon "fa fa-gbp" :oob true)) (~root-header-auto true))) ;; --- orders rows wrapper (for infinite scroll) --- (defcomp ~cart-orders-rows (&key rows next-scroll) (<> rows next-scroll))