[issue3143] development docs waste a lot of horizontal space on left nav bar

Ezio Melotti report at bugs.python.org
Thu Aug 27 17:07:40 CEST 2009


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

I just did a quick test about making the sidebar collapsible.
Add these lines at the end of default.css to see how the page might look
like with the sidebar collapsed:

/* collapse the sidebar */
div.sphinxsidebar {
    /* border: 3px solid red; */
    width: 1em !important;
}
/* hide the content of the sidebar */
div.sphinxsidebarwrapper {
    display: none;
}
/* expand the page to use the sidebar space */
div.bodywrapper{
    /* border: 3px solid blue; */
    margin-left: 1em !important;
}

A "<<" / ">>" button has to be added (via JS) to collapse and restore
the sidebar. The CSS properties have to be changed via JS too, the users
without JS won't notice any difference at all.
When the sidebar is collapsed, it is possible to make it appear again
clicking anywhere on the 1em-wide collapsed sidebar on the left (and not
only on the ">>").
The sidebar could be hidden completely by placing the "<<" / ">>" button
or an "Hide/Show sidebar" link in the top-left corner, but I don't know
exactly where (before the small python icon? just under it in a
"floating box"?).

The WebDeveloper plug-in of Firefox can be used to see the changes on
the fly (CSS -> Edit CSS -> paste the code at the end of default.css),
otherwise you can edit the CSS manually.
Feedback and comments appreciated.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3143>
_______________________________________


More information about the Python-bugs-list mailing list