ryan-roemer / sphinx-bootstrap-theme

Sphinx Bootstrap Theme
http://ryan-roemer.github.io/sphinx-bootstrap-theme/README.html
MIT License
586 stars 206 forks source link

Remove navbar-default From Navbar #188

Open thechief389 opened 5 years ago

thechief389 commented 5 years ago

Some boots watch themes like solar have different navbar colors. The one I want to use is "navbar navbar-expand-lg navbar-dark bg-primary". (bg-primary makes it yellow.)

When you convert the files to html, it adds "navbar-default" to the \

Tmpod commented 5 years ago

I've just spotted the same issue and this is quite frustrating as it's essentially removing the customisation functionality from Bootswatch themes.

Seems it would be just a matter of removing navbar-default from here

ryan-roemer commented 5 years ago

I'd take a PR that is verifiable from the demo app that changes:

  1. https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/sphinx_bootstrap_theme/bootstrap/navbar.html#L1 (probably remove navbar-default) and

  2. https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/sphinx_bootstrap_theme/bootstrap/theme.conf#L45-L47 default conf options (probably convert from navbar to navbar navbar-default)

to something that effectively does:

  1. If theme_navbar_class is set, use that straight up
  2. If theme_navbar_class is unset, default it's value to navbar-default

See https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/README.rst#contributing for how I'll test it. Feel free to give temporary options in https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/demo/source/conf.py#L90-L155 with comments for me to test out if you'd like as that will enable me to verify things faster! Thanks!