embed mode: pass embed_mode to context, add conditional body class + CSS
- board.py: pass embed_mode=True to template context when ?embed=1 - base.html: <body class="embed-mode"> when embed_mode is true - CSS: body.embed-mode hides .sidebar, .topbar, .unified-header, .header-actions; removes app-layout margin/padding; adjusts editor padding and max-width for peek panel - Sidebar and header now properly hidden in iframe via CSS
This commit is contained in:
@@ -1005,7 +1005,8 @@ async def view_page(request: Request, page_id: int):
|
||||
"page_data": page_data,
|
||||
"breadcrumb_items": nav_crumbs,
|
||||
"nav_workspace_id": page.get("workspace_id") or 0,
|
||||
"nav_page_id": page_id}
|
||||
"nav_page_id": page_id,
|
||||
"embed_mode": embed}
|
||||
template = env.get_template("page_editor_embed.html" if embed else "page_editor.html")
|
||||
response = template.render(**ctx)
|
||||
return HTMLResponse(content=response, headers={"Cache-Control": "no-store, max-age=0"})
|
||||
|
||||
Reference in New Issue
Block a user