HIde Section NAV if empty#224
Closed
sekyondaMeta wants to merge 0 commit intopytorch:pytorch_sphinx_theme2from
Closed
HIde Section NAV if empty#224sekyondaMeta wants to merge 0 commit intopytorch:pytorch_sphinx_theme2from
sekyondaMeta wants to merge 0 commit intopytorch:pytorch_sphinx_theme2from
Conversation
✅ Deploy Preview for pytorchsphinxtheme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
svekars
reviewed
Feb 3, 2026
| {% block docs_sidebar %} | ||
| {% set sidebar_items = sidebars or theme_primary_sidebar_items %} | ||
| {% if theme_navbar_center or theme_navbar_end or sidebar_items or theme_primary_sidebar_end %} | ||
|
|
Contributor
There was a problem hiding this comment.
Thinking, we might be able to achieve this with .css only:
.bd-sidebar-primary:not(:has(.bd-docs-nav li)) {
display: none !important;
}
@media (min-width: 960px) {
.bd-sidebar-primary:not(:has(.bd-docs-nav li)) + .bd-main .bd-content .bd-article-container {
padding-left: 8rem !important;
}
}
svekars
reviewed
Feb 4, 2026
| {{ super() }} | ||
| {% endblock %} | ||
|
|
||
| {# PR #215: Conditional sidebar rendering - hide sidebar when no toctree content #} |
Contributor
There was a problem hiding this comment.
Need to undo all the changes to the templates
svekars
reviewed
Feb 4, 2026
| padding: 1em; | ||
| margin-bottom: 1em; | ||
| border-bottom: 2px solid black; | ||
| content: "Error: Can't find stylesheet to import.\a \2577 \a 19 \2502 @use \"@fortawesome/fontawesome-free/scss/fontawesome\";\a \2502 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\a \2575 \a pytorch_sphinx_theme2/static/scss/main.scss 19:1 root stylesheet"; |
Contributor
There was a problem hiding this comment.
You can probably just undo all the changes to the theme.css and have only laout.scss updated
733e0df to
b16339b
Compare
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.
If page has no toctree, hide the Section Nav