Make post header row generic: admin cog + container_nav in shared helper

Move admin cog generation and container_nav border wrapping from
blog-specific wrapper into shared post_header_html so all services
render identical post header rows. Blog, events, cart all delegate
to the shared helper now. Cart admin pages fetch container_nav_html
via fragments. Village Hall always links to blog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 22:37:24 +00:00
parent 2e4fbd5777
commit f628b35fc3
4 changed files with 53 additions and 38 deletions

View File

@@ -37,10 +37,8 @@ _oob_header_html = oob_header_html
# ---------------------------------------------------------------------------
def _post_header_html(ctx: dict, *, oob: bool = False) -> str:
"""Build the post-level header row (events-specific: calendar links + admin cog)."""
admin_nav = _post_nav_html(ctx)
effective_ctx = {**ctx, "post_admin_nav_html": admin_nav} if admin_nav else ctx
return _shared_post_header_html(effective_ctx, oob=oob)
"""Build the post-level header row — delegates to shared helper."""
return _shared_post_header_html(ctx, oob=oob)
def _post_nav_html(ctx: dict) -> str: