-
Notifications
You must be signed in to change notification settings - Fork 329
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
Option to have a (home) page with different layout (eg no left sidebar) #146
Comments
I think the big question is the search bar. It should be relatively straightforward to make the left navbar disappear if it is totally empty, but then the search bar would need to go somewhere... |
As discussed in #192 personally I do prefer aspects of the RTD layout for the front-page, at least for the amount/depth of content in the AiiDA documentation: You get a very clear understanding of the sites contents:
|
@chrisjsewell though if you don't want the topbar of the theme, then that's what either the "left-sidebar" version of the pydata theme (which needs development), or the sphinx-book-theme, would accomplish, no? Is there a reason you can't use one of those options, since they share much of the same CSS etc? Or put another way, IMO the RTD theme and the pydata sphinx theme have fundamentally different structures, so they aren't meant as replacements of one another. The pydata theme is for more complex, multi-section content, more like a full-on website than a theme proper for a small package. The single-page version of the theme, or the sphinx-book-theme are more suited for smaller packages. |
@choldgraf see some more musings in #192 (comment). |
That's an interesting idea, and might be doable for just the landing page. In the AIIDA case, it sounds like you don't want the top-bar at all then? |
I'd prefer if this were configurable on a page-by-page basis. For example, in the seaborn docs, I'd want the example gallery to take up the full horizontal width of the page. Other gallery pages for visually-oriented packages may benefit from this too. |
I think it should be possible with a sphinx "file metadata" (https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#file-wide-metadata) to choose a different layout for a certain page. For example, we could have a layout without left+right sidebar, so just the header/footer and a body that takes the full width, and then a way to select this, like putting
|
We actually already have an (undocumented) option to not show the right-side TOC on a certain page with |
using page metadata makes sense to me 👍 |
Some potentially relevant info:
|
Hello |
Would this just be as simple as copying what happens with |
A note here that if we merge #244 then we could control this behavior with logic like: {% if sidebars %}
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
{% else %}
<div class="col-12 col-md-1 bd-sidebar"></div>
{% endif %} That would check whether there are any templates to be added in |
I think we can close this since we now have sidebar control from sphinx and this will now make the content a bit wider if the sidebar is missing |
For the pandas docs, we now have this landing page with the latest version of the docs (https://pandas.pydata.org/pandas-docs/dev/index.html):
Which doesn't really look ideal. Some elements:
If we would have an option to make the content wider on such a page, how it would then work with alignment of the links in the navbar etc (which are now above the main content), is not fully clear though.
The text was updated successfully, but these errors were encountered: