embed mode: force embed-mode class via JS since Jinja2 context not flowing
The embed_mode variable set in board.py context wasn't reaching base.html through Jinja2 extends. Added document.body.classList.add in page_editor_embed.html content block to force the class, which triggers the CSS rules hiding sidebar, topbar, and header.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
{% block topbar %}{% endblock %}
|
||||
{% block content %}
|
||||
{% include '_page_editor_content.html' %}
|
||||
<script>document.body.classList.add('embed-mode');</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="application/json" id="page-data">
|
||||
|
||||
Reference in New Issue
Block a user