Skip to content

Commit b11ae5d

Browse files
committed
fix: hide the header in the iframe on documentation page
1 parent 32b0df7 commit b11ae5d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

core/htmlhelper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ def modernize_legacy_page(
176176
"""Modernize a legacy Boost documentation page."""
177177
HIDE_TAGS_BASE = []
178178
if not show_navbar:
179+
# Legacy navbar
179180
HIDE_TAGS_BASE.append(("div", {"class": "header-menu-bar topnavbar"})),
181+
# V3 navbar
182+
HIDE_TAGS_BASE.append(("header", {"class": "header"}))
180183

181184
if soup.html is None:
182185
# Not an HTML file we care about

templates/v3/includes/_header_v3.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
Usage:
1818
{% include "v3/includes/_header_v3.html" %}
19+
20+
Note: This header is also rendered inside the iframe on the doc page and is
21+
hidden there by core/htmlhelper.py. If you change the .header class name,
22+
update the matching HIDE_TAGS_BASE entry in core/htmlhelper.py.
1923
{% endcomment %}
2024
<header class="header">
2125
<div class="header__inner">

0 commit comments

Comments
 (0)