bashtage / sphinx-material

A material-based, responsive theme inspired by mkdocs-material
Other
317 stars 91 forks source link

Idea: option to remove nav_title from the sidebar #104

Closed Yura52 closed 3 years ago

Yura52 commented 3 years ago

Currently, the title (which is typically something like f"{project_name} {version}") is duplicated in the "header" and TOC.

Screenshot 2021-05-09 at 14 44 43

Is it possible to add an option that allows to remove the duplication from TOC?

bashtage commented 3 years ago

Probably should be easy to do. Might have side effects though in mobile.

bashtage commented 3 years ago

This is not easy because you need it for mobile. Can be done with some custom CSS.

label.md-nav__title.md-nav__title--site {
    visibility: hidden;
        display: none;
}

@media only screen and (max-width:76.1875em) {
    label.md-nav__title.md-nav__title--site {
        visibility: visible;
                display: block;
    }
}

Some other tweaks to CSS might help in this case, but this really is the best solution.