Add app label to root header and auto-reload sexp templates in dev
Show current subdomain name (blog, cart, events, etc.) next to the site title in the root header row. Remove the redundant second "cart" menu row from cart overview and checkout error pages. Add dev-mode hot-reload for sexp templates: track file mtimes and re-read changed files per-request when RELOAD=true, so .sexp edits are picked up without restarting services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -511,17 +511,13 @@ async def render_overview_page(ctx: dict, page_groups: list) -> str:
|
||||
"""Full page: cart overview."""
|
||||
main = _overview_main_panel_html(page_groups, ctx)
|
||||
hdr = root_header_html(ctx)
|
||||
hdr += render("cart-header-child", inner_html=_cart_header_html(ctx))
|
||||
return full_page(ctx, header_rows_html=hdr, content_html=main)
|
||||
|
||||
|
||||
async def render_overview_oob(ctx: dict, page_groups: list) -> str:
|
||||
"""OOB response for cart overview."""
|
||||
main = _overview_main_panel_html(page_groups, ctx)
|
||||
oobs = (
|
||||
_cart_header_html(ctx, oob=True)
|
||||
+ root_header_html(ctx, oob=True)
|
||||
)
|
||||
oobs = root_header_html(ctx, oob=True)
|
||||
return oob_page(ctx, oobs_html=oobs, content_html=main)
|
||||
|
||||
|
||||
@@ -717,7 +713,6 @@ def _checkout_error_content_html(error: str | None, order: Any | None) -> str:
|
||||
async def render_checkout_error_page(ctx: dict, error: str | None = None, order: Any | None = None) -> str:
|
||||
"""Full page: checkout error."""
|
||||
hdr = root_header_html(ctx)
|
||||
hdr += render("cart-header-child", inner_html=_cart_header_html(ctx))
|
||||
filt = _checkout_error_filter_html()
|
||||
content = _checkout_error_content_html(error, order)
|
||||
return full_page(ctx, header_rows_html=hdr, filter_html=filt, content_html=content)
|
||||
|
||||
Reference in New Issue
Block a user