Phase 5: Page layouts as s-expressions — components, fragments, error pages
Add 9 new shared s-expression components (cart-mini, auth-menu, account-nav-item, calendar-entry-nav, calendar-link-nav, market-link-nav, post-card, base-shell, error-page) and wire them into all fragment route handlers. 404/403 error pages now render entirely via s-expressions as a full-page proof-of-concept, with Jinja fallback on failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,12 +14,11 @@ def register():
|
||||
|
||||
async def _account_nav_item():
|
||||
from shared.infrastructure.urls import orders_url
|
||||
href = orders_url("/")
|
||||
return (
|
||||
'<div class="relative nav-group">'
|
||||
f'<a href="{href}" class="justify-center cursor-pointer flex flex-row '
|
||||
'items-center gap-2 rounded bg-stone-200 text-black p-3" data-hx-disable>'
|
||||
'orders</a></div>'
|
||||
from shared.sexp.jinja_bridge import sexp as render_sexp
|
||||
|
||||
return render_sexp(
|
||||
'(~account-nav-item :href href :label "orders")',
|
||||
href=orders_url("/"),
|
||||
)
|
||||
|
||||
_handlers = {
|
||||
|
||||
Reference in New Issue
Block a user