diff --git a/sx/sx/layouts.sx b/sx/sx/layouts.sx index 0716ca0..1b8f598 100644 --- a/sx/sx/layouts.sx +++ b/sx/sx/layouts.sx @@ -15,7 +15,7 @@ ;; The server can update these during navigation morphs without disturbing ;; the reactive colour-cycling state. This is Level 2-3: the water (server ;; content) flows through the island, around the rocks (reactive signals). -(defisland ~sx-header () +(defisland ~sx-header (&key path) (let ((families (list "violet" "rose" "blue" "emerald" "amber" "cyan" "red" "teal" "pink" "indigo")) (idx (signal 0)) (shade (signal 500)) @@ -45,10 +45,16 @@ (reset! shade (+ 400 (* (mod (* (deref idx) 137) 5) 50)))))) "reactive") " hypermedia") - ;; Lake: server can update the copyright + ;; Lake: server morphs this on every navigation — the path updates + ;; while the reactive colour above persists. Visible proof that + ;; server content flows through the island without disturbing signals. (lake :id "copyright" (p :style (cssx (:text (colour "stone" 400) (size "xs"))) - "© Giles Bradshaw 2026"))))) + "© Giles Bradshaw 2026" + (when path + (span :style (str (cssx (:text (colour "stone" 300) (size "xs"))) + "margin-left:0.5em;") + (str "· " path)))))))) ;; @css grid grid-cols-3 @@ -115,7 +121,7 @@ (trail-len (len trail))) (<> (div :id "sx-nav" :class "mb-6" - (~sx-header) + (~sx-header :path (or path "/")) ;; Sibling arrows for EVERY level in the trail ;; Last row (leaf) gets is-leaf for larger current page title (map-indexed (fn (i crumb) diff --git a/sx/sxc/pages/helpers.py b/sx/sxc/pages/helpers.py index 558e5a5..11144a9 100644 --- a/sx/sxc/pages/helpers.py +++ b/sx/sxc/pages/helpers.py @@ -44,7 +44,7 @@ def _component_source(name: str) -> str: comp = get_component_env().get(name) if isinstance(comp, Island): - param_strs = list(comp.params) + param_strs = (["&key"] + list(comp.params)) if comp.params else [] if comp.has_children: param_strs.extend(["&rest", "children"]) params_sx = "(" + " ".join(param_strs) + ")"