Merge branch 'worktree-api-urls' into macros

This commit is contained in:
2026-03-13 04:41:14 +00:00

View File

@@ -21,20 +21,20 @@
(shade (signal 500))
(current-family (computed (fn ()
(nth families (mod (deref idx) (len families)))))))
(div (~cssx/tw :tokens "block max-w-3xl mx-auto px-4 pt-8 pb-4 text-center")
(div (~cssx/tw "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"
(~cssx/tw :tokens "block no-underline")
(~cssx/tw "block no-underline")
(lake :id "logo"
(span (~cssx/tw :tokens "block mb-2 text-violet-699 text-4xl font-bold font-mono")
(span (~cssx/tw "block mb-2 text-violet-699 text-4xl font-bold font-mono")
"(<sx>)")))
;; Tagline — clicking "reactive" cycles colour.
(p (~cssx/tw :tokens "mb-1 text-stone-500 text-lg")
(p (~cssx/tw "mb-1 text-stone-500 text-lg")
"The framework-free "
(span
(~cssx/tw :tokens "font-bold")
(~cssx/tw "font-bold")
:style (str "color:" (colour (deref current-family) (deref shade)) ";"
"cursor:pointer;transition:color 0.3s,font-weight 0.3s;")
:on-click (fn (e)
@@ -45,10 +45,10 @@
" hypermedium")
;; Lake: server morphs copyright on navigation without disturbing signals.
(lake :id "copyright"
(p (~cssx/tw :tokens "text-stone-400 text-xs")
(p (~cssx/tw "text-stone-400 text-xs")
"© Giles Bradshaw 2026"
(when path
(span (~cssx/tw :tokens "text-stone-300 text-xs") :style "margin-left:0.5em;"
(span (~cssx/tw "text-stone-300 text-xs") :style "margin-left:0.5em;"
(str "· " path))))))))
@@ -143,10 +143,10 @@
;; 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)))
;; Page content
children
;; Flush CSSX rules after all content has rendered
(~cssx/flush))))
;; ---------------------------------------------------------------------------
;; SX docs layouts — root header only (nav is in page content via ~layouts/doc)