diff --git a/sx/sx/layouts.sx b/sx/sx/layouts.sx index 45675db..96e550d 100644 --- a/sx/sx/layouts.sx +++ b/sx/sx/layouts.sx @@ -21,21 +21,21 @@ (shade (signal 500)) (current-family (computed (fn () (nth families (mod (deref idx) (len families))))))) - (div :style (tw "block max-w-3xl mx-auto px-4 pt-8 pb-4 text-center") + (div (~cssx/tw :tokens "block max-w-3xl mx-auto px-4 pt-8 pb-4 text-center") ;; Logo — only this navigates home (a :href "/sx/" :sx-get "/sx/" :sx-target "#main-panel" :sx-select "#main-panel" :sx-swap "outerHTML" :sx-push-url "true" - :style (tw "block no-underline") + (~cssx/tw :tokens "block no-underline") (lake :id "logo" - (span :style (tw "block mb-2 text-violet-699 text-4xl font-bold font-mono") + (span (~cssx/tw :tokens "block mb-2 text-violet-699 text-4xl font-bold font-mono") "()"))) ;; Tagline — clicking "reactive" cycles colour. - (p :style (tw "mb-1 text-stone-500 text-lg") + (p (~cssx/tw :tokens "mb-1 text-stone-500 text-lg") "The framework-free " (span + (~cssx/tw :tokens "font-bold") :style (str "color:" (colour (deref current-family) (deref shade)) ";" - (tw "font-bold") "cursor:pointer;transition:color 0.3s,font-weight 0.3s;") :on-click (fn (e) (batch (fn () @@ -45,10 +45,10 @@ " hypermedium") ;; Lake: server morphs copyright on navigation without disturbing signals. (lake :id "copyright" - (p :style (tw "text-stone-400 text-xs") + (p (~cssx/tw :tokens "text-stone-400 text-xs") "© Giles Bradshaw 2026" (when path - (span :style (str (tw "text-stone-300 text-xs") "margin-left:0.5em;") + (span (~cssx/tw :tokens "text-stone-300 text-xs") :style "margin-left:0.5em;" (str "· " path)))))))) @@ -143,6 +143,8 @@ ;; Children as button links (when (get nav-state "children") (~layouts/nav-children :items (get nav-state "children")))) + ;; Flush CSSX rules collected during header/nav rendering + (~cssx/flush) ;; Page content follows children)))