Layout components now self-resolve context (cart-mini, auth-menu, nav-tree, rights, URLs) via new IO primitives (root-header-ctx, select-colours, account-nav-ctx, app-rights) and defmacro wrappers (~root-header-auto, ~auth-header-row-auto, ~root-mobile-auto). This eliminates _ctx_to_env(), HELPER_CSS_CLASSES, and verbose :key threading across all 10 services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
;; Market layout defcomps — root header via ~root-header-auto,
|
|
;; market-specific headers passed as &key params.
|
|
|
|
;; --- Browse layout: root + post header + market header ---
|
|
|
|
(defcomp ~market-browse-layout-full (&key post-header market-header)
|
|
(<> (~root-header-auto)
|
|
(~header-child-sx :inner (<> post-header market-header))))
|
|
|
|
(defcomp ~market-browse-layout-oob (&key oob-header post-header-oob clear-oob)
|
|
(<> oob-header post-header-oob clear-oob))
|
|
|
|
;; --- Product layout: root + post + market + product ---
|
|
|
|
(defcomp ~market-product-layout-full (&key post-header market-header product-header)
|
|
(<> (~root-header-auto)
|
|
(~header-child-sx :inner (<> post-header market-header product-header))))
|
|
|
|
;; --- Product admin layout: root + post + market + product + admin ---
|
|
|
|
(defcomp ~market-product-admin-layout-full (&key post-header market-header product-header admin-header)
|
|
(<> (~root-header-auto)
|
|
(~header-child-sx :inner (<> post-header market-header product-header admin-header))))
|
|
|
|
;; --- Market admin layout: root + post + market + market-admin ---
|
|
|
|
(defcomp ~market-admin-layout-full (&key post-header market-header admin-header)
|
|
(<> (~root-header-auto)
|
|
(~header-child-sx :inner (<> post-header market-header admin-header))))
|
|
|
|
(defcomp ~market-admin-layout-oob (&key market-header-oob admin-oob-header clear-oob)
|
|
(<> market-header-oob admin-oob-header clear-oob))
|
|
|
|
;; --- OOB wrappers ---
|
|
|
|
(defcomp ~market-oob-wrap (&key parts)
|
|
(<> parts))
|
|
|
|
;; --- Content wrappers ---
|
|
|
|
(defcomp ~market-content-padded (&key content)
|
|
(<> content (div :class "pb-8")))
|