Skip to content

Commit c08af58

Browse files
12rambauivanov
authored andcommitted
fix: remove Site navigation header (pydata#1615)
* fix: remove Site navigation header * test: edit the test suit
1 parent 642a338 commit c08af58

File tree

6 files changed

+4
-22
lines changed

6 files changed

+4
-22
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss

-5
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,3 @@
5353
}
5454
}
5555
}
56-
57-
// Don't display the `site navigation` in the header menu
58-
.bd-header .navbar-nav > p.sidebar-header-items__title {
59-
display: none;
60-
}

src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html

-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{# Displays links to the top-level TOCtree elements, in the header navbar. #}
22
<nav class="navbar-nav">
3-
<p class="sidebar-header-items__title"
4-
role="heading"
5-
aria-level="1"
6-
aria-label="{{ _('Site Navigation') }}">
7-
{{ _("Site Navigation") }}
8-
</p>
93
<ul class="bd-navbar-elements navbar-nav">
104
{{ generate_header_nav_html(n_links_before_dropdown=theme_header_links_before_dropdown, dropdown_text=theme_header_dropdown_text) }}
115
</ul>

tests/test_build.py

-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,6 @@ def test_translations(sphinx_build_factory) -> None:
964964
index = sphinx_build.html_tree("section1/index.html")
965965

966966
sidebar_primary = index.select(".bd-sidebar-primary")[0]
967-
assert "Navigation du site" in str(sidebar_primary)
968967
assert "Navigation de la section" in str(sidebar_primary)
969968

970969
sidebar_secondary = index.select(".bd-sidebar-secondary")[0]

tests/test_build/navbar_ix.html

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<div class="me-auto navbar-header-items__center">
22
<div class="navbar-item">
33
<nav class="navbar-nav">
4-
<p aria-label="Site Navigation" aria-level="1" class="sidebar-header-items__title" role="heading">
5-
Site Navigation
6-
</p>
74
<ul class="bd-navbar-elements navbar-nav">
85
<li class="nav-item">
96
<a class="nav-link nav-internal" href="page1.html">

tests/test_build/sidebar_subpage.html

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<div class="sidebar-header-items__center">
44
<div class="navbar-item">
55
<nav class="navbar-nav">
6-
<p aria-label="Site Navigation" aria-level="1" class="sidebar-header-items__title" role="heading">
7-
Site Navigation
8-
</p>
96
<ul class="bd-navbar-elements navbar-nav">
107
<li class="nav-item">
118
<a class="nav-link nav-internal" href="../page1.html">

0 commit comments

Comments
 (0)