Remove horizontal header bar and improve responsive layout for PyTorch docs#223
Merged
svekars merged 21 commits intopytorch_sphinx_theme2from Jan 30, 2026
Merged
Remove horizontal header bar and improve responsive layout for PyTorch docs#223svekars merged 21 commits intopytorch_sphinx_theme2from
svekars merged 21 commits intopytorch_sphinx_theme2from
Conversation
This PR removes the horizontal header bar (LF header) and introduces a cleaner wider layout that uses white space more efficiently. - Disabled the horizontal header bar (show_lf_header = False) - Added a new "Go to pytorch.org" link in the navbar (desktop) and mobile sidebar for navigation back to the main site - Created custom navbar-logo.html that displays PyTorch logo by default while allowing sites to override with custom logos - Custom header.html template to properly inject the pytorch.org link and handle mobile/desktop logo visibility - Made header container full-width (max-width: 100%) with consistent padding - Reduced sidebar widths (15% with min-width constraints) to give more space to main content - Added proper content alignment when primary sidebar is hidden, aligning with navbar items - Improved padding for sidebars with proper responsive breakpoints - Added dedicated mobile logo that appears next to hamburger menu - Version/version-switcher now appears in mobile sidebar instead of header - Custom sidebar-primary.html ensures consistent navigation on mobile - pytorch.org link appears in mobile sidebar navigation - Hidden the "Hide Search Matches" button that Sphinx displays - Removed search highlighting from footer and sidebars (only shows in main content)
✅ Deploy Preview for pytorchsphinxtheme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
sekyondaMeta
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the horizontal header bar (LF header) and introduces a cleaner wider layout that uses white space more efficiently.
Header & Navigation:
Layout Improvements:
Mobile Responsiveness:
Search Improvements:
CSS Variables:
Fixed right sidebar border continuity: