Component names now reflect filesystem location using / as path separator and : as namespace separator for shared components: ~sx-header → ~layouts/header ~layout-app-body → ~shared:layout/app-body ~blog-admin-dashboard → ~admin/dashboard 209 files, 4,941 replacements across all services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
984 B
Plaintext
23 lines
984 B
Plaintext
;; Market container-nav fragment handler
|
|
;; returns: sx
|
|
;;
|
|
;; Renders marketplace link nav items for blog post pages.
|
|
|
|
(defhandler container-nav (&key container_type container_id post_slug)
|
|
(let ((ct (or container_type "page"))
|
|
(cid (parse-int (or container_id "0")))
|
|
(slug (or post_slug ""))
|
|
(markets (service "market" "marketplaces-for-container"
|
|
:container-type ct :container-id cid)))
|
|
(when (not (empty? markets))
|
|
(let ((styles (or (jinja-global "styles") (dict)))
|
|
(nav-class (or (get styles "nav_button") ""))
|
|
(sel-colours (or (jinja-global "select_colours") "")))
|
|
(<> (map (fn (m)
|
|
(let ((href (app-url "market" (str "/" slug "/" (get m "slug") "/"))))
|
|
(~shared:navigation/market-link-nav
|
|
:href href
|
|
:name (get m "name")
|
|
:nav-class nav-class
|
|
:select-colours sel-colours))) markets))))))
|