Layout defcomps are now fully self-contained via IO-primitive auto-fetch macros, eliminating Python layout functions that manually threaded context values through SxExpr wrappers. Services converted: - Federation (1 layout): social - Blog (7 layouts): blog, blog-settings, blog-cache, blog-snippets, blog-menu-items, blog-tag-groups, blog-tag-group-edit - SX docs (2 layouts): sx, sx-section - Cart (2 layouts): cart-page, cart-admin + orders/order-detail - Events (9 layouts): calendar-admin, slots, slot, day-admin, entry, entry-admin, ticket-types, ticket-type, markets - Market (2 layouts): market, market-admin New IO primitives added to shared/sx/primitives_io.py: - federation-actor-ctx, cart-page-ctx, request-view-args - events-calendar-ctx, events-day-ctx, events-entry-ctx, events-slot-ctx, events-ticket-type-ctx - market-header-ctx (pre-builds desktop/mobile nav as SxExpr) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
692 B
Plaintext
18 lines
692 B
Plaintext
;; Federation layout defcomps — fully self-contained via IO primitives.
|
|
;; Registered via register_sx_layout("social", ...) in __init__.py.
|
|
|
|
;; Full page: root header + social header in header-child
|
|
(defcomp ~social-layout-full ()
|
|
(<> (~root-header-auto)
|
|
(~header-child-sx
|
|
:inner (~federation-social-header
|
|
:nav (~federation-social-nav :actor (federation-actor-ctx))))))
|
|
|
|
;; OOB (HTMX): social header oob + root header oob
|
|
(defcomp ~social-layout-oob ()
|
|
(<> (~oob-header-sx
|
|
:parent-id "root-header-child"
|
|
:row (~federation-social-header
|
|
:nav (~federation-social-nav :actor (federation-actor-ctx))))
|
|
(~root-header-auto true)))
|