Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set back align content for header navbar #1331

Merged
merged 3 commits into from May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -3,14 +3,14 @@
<label class="sidebar-toggle primary-toggle" for="__primary">
<span class="fa-solid fa-bars"></span>
</label>
{% set navbar_start, navbar_class, navbar_align = navbar_align_class() %}
{% if theme_navbar_start %}
<div class="navbar-header-items__start">
<div class="{{ navbar_start }} navbar-header-items__start">
{% for navbar_item in theme_navbar_start %}
<div class="navbar-item">{% include navbar_item %}</div>
{% endfor %}
</div>
{% endif %}
{% set navbar_class, navbar_align = navbar_align_class() %}
<div class="{{ navbar_class }} navbar-header-items">
{% if theme_navbar_center %}
<div class="{{ navbar_align }} navbar-header-items__center">
Expand Down
6 changes: 3 additions & 3 deletions src/pydata_sphinx_theme/toctree.py
Expand Up @@ -285,9 +285,9 @@ def navbar_align_class() -> List[str]:
"""Return the class that aligns the navbar based on config."""
align = context.get("theme_navbar_align", "content")
align_options = {
"content": ("col-lg-9", "me-auto"),
"left": ("", "me-auto"),
"right": ("", "ms-auto"),
"content": ("col-lg-3", "col-lg-9", "me-auto"),
"left": ("", "", "me-auto"),
"right": ("", "", "ms-auto"),
}
if align not in align_options:
raise ValueError(
Expand Down