Enable cross-subdomain htmx and purify layout to sexp
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m15s

- Disable htmx selfRequestsOnly, add CORS headers for *.rose-ash.com
- Remove same-origin guards from ~menu-row and ~nav-link htmx attrs
- Convert ~app-layout from string-concatenated HTML to pure sexp tree
- Extract ~app-head component, replace ~app-shell with inline structure
- Convert hamburger SVG from Python HTML constant to ~hamburger sexp component
- Fix cross-domain fragment URLs (events_url, market_url)
- Fix starts-with? primitive to handle nil values
- Fix duplicate admin menu rows on OOB swaps
- Add calendar admin nav links (slots, description)
- Convert slots page from Jinja to sexp rendering
- Disable page caching in development mode
- Backfill migration to clean orphaned container_relations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 12:09:00 +00:00
parent d2f1da4944
commit eda95ec58b
14 changed files with 251 additions and 160 deletions

View File

@@ -77,9 +77,23 @@ def register():
@bp.context_processor
async def inject_root():
from shared.infrastructure.fragments import fetch_fragment
container_nav_html = ""
post_data = getattr(g, "post_data", None)
if post_data:
post_id = post_data["post"]["id"]
post_slug = post_data["post"]["slug"]
container_nav_html = await fetch_fragment("relations", "container-nav", params={
"container_type": "page",
"container_id": str(post_id),
"post_slug": post_slug,
"exclude": "page->calendar",
})
return {
"calendar": getattr(g, "calendar", None),
"container_nav_html": container_nav_html,
}
# ---------- Pages ----------

View File

@@ -44,16 +44,14 @@ def register():
@bp.get("/")
async def get(**kwargs):
from shared.sexp.page import get_template_context
from sexp.sexp_components import render_slots_page, render_slots_oob
tctx = await get_template_context()
if not is_htmx_request():
# Normal browser request: full page with layout
html = await render_template(
"_types/slots/index.html",
)
html = await render_slots_page(tctx)
else:
html = await render_template(
"_types/slots/_oob_elements.html",
)
html = await render_slots_oob(tctx)
return await make_response(html)